<?php
namespace Claromentis\Mailgun\Model;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"] ?: array()) + array("_6e1c717cf3c" . "bf1af982ed74" . "d4336b7f1" => base64_decode("Ym9keS1odG1" . "s"), "_44e986c04f41a08b56a383c7b3a88ee" . "2" => base64_decode("c2VuZ" . "GVy"), "_8c575917cbaedf1e7efae" . "84939402bff" => base64_decode("U3ViamV" . "jdA=="), "_f39f5346e313e4dd1ac3a7bd8032" . "beda" => base64_decode("c3Vic3RyX2NvbXBh" . "cmU="), "_956cd32298a229f9768f" . "1096f077ace3" => base64_decode("Ym9keS1wbGFp" . "bg=="), "_618a4aeb9fecc" . "4592a4521f3487" . "6fa29" => base64_decode("ZnJvbQ" . "=="), "_97ea09a7faf27c5" . "2c6eff69773df1d8" . "a" => base64_decode("dGltZXN0YW1" . "w"), "_9c050c786fc87170cbb84fc6a8" . "b13cb6" => base64_decode("YXR0YWNobWVu" . "dC0="), "_1d6c68a0262e8fa0" . "bed1215b7224a98e" => base64_decode("cmVjaX" . "BpZW50"), "_f589476007fa133f4" . "57c3ef29ddfa566" => base64_decode("VG" . "8="), "_d706c160e45bf7434fff82a5976f" . "0e19" => base64_decode("YXJy" . "YXlf" . "a2V5" . "cw=="), "_a1e707d02a236dadebd15a45e6" . "5ebdb6" => base64_decode("YXR0YWNobWVudC1jb3" . "VudA=="));
use Claromentis\Core\Mail\Receive\Contract\MailAttachment;
use Claromentis\Core\Mail\Receive\Contract\MailMessage;
use Claromentis\Core\Util\ArrayUtil;




class MailgunMessage implements MailMessage
{
    protected $message_data;
    protected $attachments_data;
    protected $attachments;
    
    
    
    
    
    public function __construct($_a3d82c5df38e194c9c73e3ccb4223bbc = [], $_4e7ab34a53ffb13eb0838003f33034d4 = [])
    {
        $this->message_data = $_a3d82c5df38e194c9c73e3ccb4223bbc;
        $this->attachments = $_4e7ab34a53ffb13eb0838003f33034d4;
        foreach ($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_d706c160e45bf7434fff82a5976" . "f0e19"]($this->message_data) as $key) {
            if ($key !== $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_a1e707d02" . "a236dadebd" . "15a45e65eb" . "db6"] && $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_f39f5346e313e4dd1ac3a7bd8" . "032beda"]($key, $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_9c050c786fc87170cbb" . "84fc6a8b13cb6"], 0, 11) === 0) {
                $this->attachments[] = new MailgunAttachmentString($key, $this->message_data[$key]);
            }
        }
    }
    
    
    
    
    public function GetRecipientAddress() : string
    {
        return ArrayUtil::getScalarValue($this->message_data, $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_1d6c68a0262e8fa0b" . "ed1215b7224a98e"]);
    }
    
    
    
    
    
    
    public function GetFrom() : string
    {
        return ArrayUtil::getScalarValue($this->message_data[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_618a4aeb9fecc4592a4521" . "f34876fa29"]], null);
    }
    
    
    
    
    
    
    
    public function GetTo() : string
    {
        return ArrayUtil::getScalarValue($this->message_data[$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_f589476007fa133f457c3ef29ddfa" . "566"]], null);
    }
    
    
    
    
    public function GetSubject() : string
    {
        return ArrayUtil::getScalarValue($this->message_data, $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_8c575917c" . "baedf1e7ef" . "ae84939402" . "bff"]);
    }
    
    
    
    
    public function GetBodyHtml() : string
    {
        return ArrayUtil::getScalarValue($this->message_data, $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_6e1c717cf3cbf1af982ed74d" . "4336b7f1"]);
    }
    
    
    
    
    public function GetBodyText() : string
    {
        return ArrayUtil::getScalarValue($this->message_data, $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_956cd32298a229f9768f1096f077ace" . "3"]);
    }
    
    
    
    
    public function GetDate() : \Date
    {
        $_67a0d624aebcceb0abd5ce56a53ff06f = new \Date(ArrayUtil::getScalarValue($this->message_data, $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_97ea09a7faf27c52c6eff69773df1d8" . "a"]));
        return $_67a0d624aebcceb0abd5ce56a53ff06f;
    }
    
    
    
    
    public function GetSenderAddress() : string
    {
        return ArrayUtil::getScalarValue($this->message_data, $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_44e986c04f" . "41a08b56a38" . "3c7b3a88ee2"]);
    }
    public function GetAttachments()
    {
        return $this->attachments;
    }
}