<?php
namespace Claromentis\Core\Mail;

$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"] ?: array()) + array("_531570e0c20fa5749e" . "5e6170df94fbd8" => base64_decode("YmVo" . "YXQ="), "_2551f00ca7fd" . "427eb00eea172" . "bea3296" => base64_decode("bG9nZ2VyX2Z" . "hY3Rvcnk="), "_f69812ed2c66c3cd2e502c9eac359" . "1ee" => base64_decode("bWFpbA=" . "="), "_6ae3783b9ad544a6c31a979683" . "fed870" => base64_decode("ZmlsZQ" . "=="), "_cd0d13803184a50d686a257" . "e5cbd8e1c" => base64_decode("TUFJTF9ESVI" . "="), "_c83b65e43d7fb" . "b9f4f45e194ed5" . "c7a54" => base64_decode("c210c" . "A=="), "d" . "b" => base64_decode("Z" . "G" . "I" . "="), "_df945ac2fbdd1576202fb48096e" . "b43f9" => base64_decode("YWRtaW4ucGFuZWxzX2xp" . "c3Q="), "_aa0553266235" . "d1e7c43a6e886" . "9464820" => base64_decode("REFUQV9ESV" . "I="), "_aa161623d32" . "ac0f30a9b5cb" . "07f0f83fa" => base64_decode("bWljcm9zb2Z0X2dyYX" . "Bo"), "_d232c09225ab7537746a466328f" . "f4d12" => base64_decode("L21" . "haW" . "w="), "_6c495b6d" . "0dcad746e" . "6b7638acd" . "2f5f46" => base64_decode("bWFpbF9hY2NvdW50LnJlcG9zaX" . "Rvcnk="), "_0995370913cd44391d39fdba6ce20" . "6c0" => base64_decode("bG9jYWxpemF0aW9uLmRvbWFpbl9mcm9tX2Zp" . "bGVzX2ZhY3Rvcnk="), "_12dc001a9ad" . "5eec9b02198f" . "903676641" => base64_decode("bG9jYWxpemF0aW9uLmRvbW" . "Fpbi4="), "_1b31f59b3b3da40182cfd1c08" . "1617d22" => base64_decode("bWFpbC5zZW5kLmRya" . "XZlcnM="), "_5e04798e31e7" . "eb1aeabad98c6" . "ec9d072" => base64_decode("c2VuZG1haWw" . "="), "confi" . "g" => base64_decode("Y29uZml" . "n"), "_a964878b22b4d20e" . "f3f1c74ab82513c8" => base64_decode("c2VuZGdyaWQ" . "="));
use Claromentis\Core\Audit\Audit;
use Claromentis\Core\Config\LayeredConfig;
use Claromentis\Core\Config\WritableConfig;
use Claromentis\Core\DAL\Interfaces\DbInterface;
use Claromentis\Core\DAL\QueryFactory;
use Claromentis\Core\Mail\Fetch\MailAccountRepository;
use Claromentis\Core\Mail\Fetch\MailServer;
use Claromentis\Core\Mail\Send\Api\MailConnectionTester;
use Claromentis\Core\Mail\Send\MailFactory;
use Claromentis\Core\Mail\Send\MailQueue;
use Claromentis\Core\TextUtil\ClaText;
use Claromentis\Core\Config\Config;
use Claromentis\Core\Localization\Lmsg;
use Claromentis\Core\Mail\Send\Driver;
use Claromentis\Core\MicrosoftGraph\ClientFactory;
use Claromentis\Core\Variable\DbVarService;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
class MailServiceProvider implements ServiceProviderInterface
{
    public const NAME = 'mail';
    public function register(Container $app)
    {
        $app->extend($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["confi" . "g"], function (WritableConfig $config) {
            $data = $config->get($GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_aa0553266235d1e7" . "c43a6e8869464820"]);
            $config->set($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_cd0d13803184a50d686a257e5cbd8e1" . "c"], $data . $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_d232c09225" . "ab7537746a4" . "66328ff4d12"]);
            return $config;
        });
        $app[MailQueue::class] = function ($app) {
            return new MailQueue($app[MailFactory::class], $app[Utility::class], $app[QueryFactory::class], $app[DbInterface::class], $app[$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_2551f00ca7fd427eb00eea172" . "bea3296"]]->GetLogger($GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_f69812ed2" . "c66c3cd2e5" . "02c9eac359" . "1ee"]));
        };
        $app[Api::class] = function ($app) {
            return new Api($app[MailFactory::class], $app[MailQueue::class], $app[Utility::class], $app->config, $app[ClaText::class], $app[Audit::class], $app[$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_df945ac2fbdd1576202fb48096eb43" . "f9"]], $app[$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_2551f00ca7fd427eb00eea172b" . "ea3296"]]->GetLogger($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_f69812ed2c66c3cd2e502c" . "9eac3591ee"]));
        };
        $app[MailFactory::class] = function ($app) {
            return new MailFactory($app[$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_1b31f59b3b3da4" . "0182cfd1c081617" . "d22"]], $app[Utility::class]);
        };
        $app[$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_12dc001a9ad5e" . "ec9b02198f9036" . "76641"] . self::NAME] = function ($app) {
            return $app[$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_0995370913cd" . "44391d39fdba6" . "ce206c0"]](self::NAME);
        };
        $app[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_6c495b6d0dcad746e6b7638a" . "cd2f5f46"]] = function ($app) {
            return new MailAccountRepository($app[$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["d" . "b"]]);
        };
        $app[MailServer::class] = function ($app) {
            return new MailServer();
        };
        $app[ClientFactory::class] = function ($app) {
            return new ClientFactory($app[DbVarService::class]);
        };
        $app[$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_1b31f59b3b3da401" . "82cfd1c081617d22"]] = function ($app) {
            $drivers = [$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_c83b65e43d7fbb9f4f" . "45e194ed5c7a54"] => new Driver\SendDriverSmtp(), $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_5e04798e31e7eb1ae" . "abad98c6ec9d072"] => new Driver\SendDriverSendmail(), $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_a964878b2" . "2b4d20ef3f" . "1c74ab8251" . "3c8"] => new Driver\SendDriverSendgrid(), $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_aa161623d32ac0f3" . "0a9b5cb07f0f83fa"] => new Driver\SendDriverMicrosoftGraph($app[ClientFactory::class], $app[Lmsg::class]), $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_f69812ed2c" . "66c3cd2e502" . "c9eac3591ee"] => new Driver\SendDriverPhp(), $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_6ae3783b9" . "ad544a6c31" . "a979683fed" . "870"] => new Driver\SendDriverFile($app[Config::class]), $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_531570e0c20fa5749" . "e5e6170df94fbd8"] => new Driver\SendDriverBehat()];
            foreach ($drivers as $_1689db965dcd5989e8faf51389aad5c4) {
                $_1689db965dcd5989e8faf51389aad5c4->setLogger($app[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_2551f00ca7fd427eb" . "00eea172bea3296"]]->GetLogger($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_f69812ed2c6" . "6c3cd2e502c9" . "eac3591ee"]));
            }
            return $drivers;
        };
    }
}