<?php
namespace Claromentis\Infocapture\UseCase;

$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"] = (@$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"] ?: array()) + array("_b9c76f4913f802b79c8b5533163" . "0045d" => base64_decode("U0VMRUNUIGlkIEZST00gaGRfcHJvamVjdCBXSEVSRSB1c2VfbWFpbF9zZXJ2aWNlID0gMSBBTkQgaGFuZGxlX2luY29taW5nX21haWwgPSAxIEFORCBtYWlsZ3VuX3" . "JlY2lwaWVudF9hZGRyZXNzIGVxOnN0cjpmcm9tX2FkZHJlc3M="), "i" . "d" => base64_decode("aW" . "Q="));
use Claromentis\Core\DAL;
use Claromentis\Mailgun\Repository\MailgunRepository;
class GetProjectByEmailAddress
{
    protected $db;
    protected $mailgun_repository;
    public function __construct(DAL\Db $db, MailgunRepository $_05ff363b87e638cbaf11926eb334bf80)
    {
        $this->db = $db;
        $this->mailgun_repository = $_05ff363b87e638cbaf11926eb334bf80;
    }
    public function GetMailgunProject($_539cf4259a149ca9dbb739b2cdb7c608)
    {
        if (!$this->mailgun_repository->IsMailgunAvailable()) {
            return null;
        }
        $project = null;
        $_1f24efd4735b7a11b391147435e7d35d = $this->db->query($GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_b9c76f4913f802b79c8" . "b55331630045d"], $_539cf4259a149ca9dbb739b2cdb7c608);
        if ($_1f24efd4735b7a11b391147435e7d35d->numRows() === 1) {
            $_343a395319323dd7609bcbc465b4d034 = $_1f24efd4735b7a11b391147435e7d35d->fetchArray();
            $project = new \HDProject();
            $project->Load($_343a395319323dd7609bcbc465b4d034[$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["i" . "d"]]);
        }
        return $project;
    }
}