<?php
namespace Claromentis\Onesignal;

$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"] = (@$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"] ?: array()) + array("ap" . "i_" . "ke" . "y" => base64_decode("YXBpX2tleQ" . "=="), "_cd9a79f2399d8c71e69b0e1752" . "3a2d84" => base64_decode("OjpTZXJ2ZUFwcEl" . "uZm8="), "_d4e407c047e25c4e45787" . "d2f8b156dbb" => base64_decode("OjpEaXNhc3NvY2lh" . "dGVQbGF5ZXJJZA=="), "_204f8bbd1dead80ee2b5363b2d1" . "25792" => base64_decode("L29uZXNpZ2" . "5hbC92Mg=="), "_896da378b79bf547d4eadbb56a" . "24d9dd" => base64_decode("L09uZVNpZ25hbFNES1dvcmtlci5qcw" . "=="), "_61de634aa59a" . "9939e8af8bc21" . "e398ead" => base64_decode("b25lc2lnbmFsLm9uZXNp" . "Z25hbF9yZXBvc2l0b3J5"), "_11acab80deae08a74eccc6824" . "0046295" => base64_decode("YXBwbGljYX" . "Rpb24vamF2" . "YXNjcmlwdA" . "=="), "_f86afa5a6f9" . "7c055469f543" . "181a0c0eb" => base64_decode("b25lc2lnb" . "mFs"), "_d987cae0a2ca984bee8bac935b8" . "135d0" => base64_decode("aW1wb3J0U2NyaXB0cygnaHR0cHM6Ly9jZG4ub25lc2lnbmFsLmNvbS9zZGtzL09uZVNpZ25hbFNES" . "1dvcmtlci5qcycpOwo="), "_0cc972b4b9a546a5b045a69cbaa" . "524b1" => base64_decode("T25lU2lnbmFsU0RLVXBkYXRlcldvcmtlci5qcw=" . "="), "_70f998308f4" . "9bced24f7e7a" . "90b565432" => base64_decode("L3Vucm" . "VnaXN0" . "ZXI="), "_748730adf5a6c9" . "b90c04fdc57cb3d" . "079" => base64_decode("L29uZXNpZ25hbC92MQ" . "=="), "_04c851ced65682f1411090dee" . "7ada43b" => base64_decode("cmVzdA=" . "="), "_dc8040e52bba1b33ef2d09" . "29174a2cbc" => base64_decode("T25lU2l" . "nbmFsU0" . "RLV29ya" . "2VyLmpz"), "_a676ed2e8006438882726" . "1b1a435d9db" => base64_decode("YW5hbG" . "9ndWU="), "_fff181648b74d031ce94e9f58a42a9b" . "f" => base64_decode("OjpBc3NvY2l" . "hdGVQbGF5ZX" . "JJZA=="), "_4fc43042b277f3daa0666ce32ea" . "c559a" => base64_decode("anNvbl92YWx" . "1ZQ=="), "_539ba674b4ec3c89f04a7df3b" . "efc51d6" => base64_decode("L09uZVNpZ25hbFNES1VwZGF0ZXJXb3Jr" . "ZXIuanM="), "_973f842440f27ab820babc" . "0235c7cb37" => base64_decode("L2luZm8" . "="), "_24e0e36600d6af77406a44bb618a6" . "253" => base64_decode("dXNl" . "cg=="), "_4d707fab93" . "bebb00bbe69" . "e8159697c90" => base64_decode(""), "_49545c7d347e8eb5991e3eaa" . "6ea076d3" => base64_decode("YXB" . "wX2" . "lk"), "_354b2750356f99f" . "eed9a080d09ffec7" . "e" => base64_decode("L3J" . "lZ2" . "lzd" . "GVy"), "_cda61173232abb47bde8311ad02" . "ac58c" => base64_decode("b25lc2lnbmFsLmFkbWluLmRhdGF0YWJsZ" . "V9zb3VyY2U="), "_a3118c78ba11a3" . "1cfc64a81f4374b" . "381" => base64_decode("L29uZXNpZ2" . "5hbC92MA=="));
use Claromentis\Core\Application;
use Claromentis\Core\ControllerCollection;
use Claromentis\Core\Event\LazyResolver;
use Claromentis\Core\Http\FileStringResponse;
use Claromentis\Core\ORM\Clarologue;
use Claromentis\Core\REST\RestServiceInterface;
use Claromentis\Core\RouteProviderInterface;
use Claromentis\Core\Integration\Repository;
use Claromentis\Core\TextUtil\ClaText;
use Claromentis\Onesignal\Entity\OnesignalUser;
use Claromentis\Onesignal\Entity\OnesignalUserMap;
use Claromentis\Onesignal\Repository\OnesignalRepository;
use Pimple\ServiceProviderInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Pimple\Container;
use Silex\Api\EventListenerProviderInterface;
class OnesignalApplication implements RestServiceInterface, EventListenerProviderInterface, ServiceProviderInterface, RouteProviderInterface
{
    public function GetRestRoutes(Application $app)
    {
        return [$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_a3118c78ba11a31cfc64a" . "81f4374b381"] => $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_204f8bbd1dead80ee2b536" . "3b2d125792"], $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_748730adf5a6c9b90c04fdc57cb3" . "d079"] => function (\Claromentis\Core\ControllerCollection $_6c20f4873f12c6bcced6c1dda9a06b86) {
            $_6c20f4873f12c6bcced6c1dda9a06b86->secure($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_04c851ced65682f1411" . "090dee7ada43b"], $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_24e0e36600d" . "6af77406a44b" . "b618a6253"]);
            $_6c20f4873f12c6bcced6c1dda9a06b86->post($GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_354b2750356f99feed9a08" . "0d09ffec7e"], Controller\OnesignalController::class . $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_fff1816" . "48b74d03" . "1ce94e9f" . "58a42a9b" . "f"]);
            $_6c20f4873f12c6bcced6c1dda9a06b86->get($GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_973f842440f27" . "ab820babc0235c" . "7cb37"], Controller\OnesignalController::class . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_cd9a79f2399d8" . "c71e69b0e17523" . "a2d84"]);
        }, $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_204f8bbd1dead80ee2b5363b2d12579" . "2"] => function (\Claromentis\Core\ControllerCollection $_6c20f4873f12c6bcced6c1dda9a06b86) {
            $_6c20f4873f12c6bcced6c1dda9a06b86->secure($GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_04c851ced65682f1411090dee7a" . "da43b"], $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_24e0e36600d6af77406a44bb6" . "18a6253"]);
            $_6c20f4873f12c6bcced6c1dda9a06b86->post($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_354b2750356f99" . "feed9a080d09ffe" . "c7e"], Controller\OnesignalController::class . $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_fff18164" . "8b74d031c" . "e94e9f58a" . "42a9bf"]);
            $_6c20f4873f12c6bcced6c1dda9a06b86->post($GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_70f998308f" . "49bced24f7e" . "7a90b565432"], Controller\OnesignalController::class . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_d4e407c047e25c4e45787d2f8" . "b156dbb"]);
            $_6c20f4873f12c6bcced6c1dda9a06b86->get($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_973f842440f27ab820babc0235c" . "7cb37"], Controller\OnesignalController::class . $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_cd9a79f2399d8c71e69b" . "0e17523a2d84"]);
        }];
    }
    function GetRoutes(Application $app)
    {
        return [$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_4d707fab93bebb00bbe69e815969" . "7c90"] => function (ControllerCollection $_6c20f4873f12c6bcced6c1dda9a06b86) {
            $_6c20f4873f12c6bcced6c1dda9a06b86->get($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_896da378b7" . "9bf547d4ead" . "bb56a24d9dd"], function () {
                return new FileStringResponse($GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_d987cae0a2ca9" . "84bee8bac935b8" . "135d0"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_dc8040e52bba1b33ef2d0929174a" . "2cbc"], false, $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_11acab80deae08a74eccc682400462" . "95"]);
            });
            $_6c20f4873f12c6bcced6c1dda9a06b86->get($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_539ba674b4ec3c" . "89f04a7df3befc5" . "1d6"], function () {
                
                
                
                return new FileStringResponse($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_d987cae0a2ca984bee8bac9" . "35b8135d0"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_0cc972b4b9a546a5b0" . "45a69cbaa524b1"], false, $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_11acab80deae08a74e" . "ccc68240046295"]);
            });
        }];
    }
    public function register(Container $app)
    {
        $app[OnesignalClient::class] = function (Application $app) {
            $repo = $app[Repository::class];
            $_f86afa5a6f97c055469f543181a0c0eb = $repo->Load($GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_f86afa5a6f97c055469f543181a0" . "c0eb"]);
            $_1454b81cfd37b4f7bb20b393105f588e = $_f86afa5a6f97c055469f543181a0c0eb[$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_4fc43042b277" . "f3daa0666ce32" . "eac559a"]] ?? [];
            $_49545c7d347e8eb5991e3eaa6ea076d3 = $_1454b81cfd37b4f7bb20b393105f588e[$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_49545c7d" . "347e8eb59" . "91e3eaa6e" . "a076d3"]] ?? null;
            $api_key = $_1454b81cfd37b4f7bb20b393105f588e[$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["ap" . "i_" . "ke" . "y"]] ?? null;
            
            
            $client = $app->create(OnesignalClient::class, [$app[OnesignalRepository::class], $app[ClaText::class], $_49545c7d347e8eb5991e3eaa6ea076d3, $api_key]);
            $client->setLogger($app->GetLogger($GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_f86afa5a6f97c055469f" . "543181a0c0eb"]));
            return $client;
        };
        $app[OnesignalSubscriber::class] = function (Application $app) {
            
            
            $_9675ff2efad7612af88e129adb4e5462 = $app->create(OnesignalSubscriber::class);
            $_9675ff2efad7612af88e129adb4e5462->setLogger($app->GetLogger($GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_f86afa5a" . "6f97c0554" . "69f543181" . "a0c0eb"]));
            return $_9675ff2efad7612af88e129adb4e5462;
        };
        $app[$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_a676ed2e80064388827261b1a435d" . "9db"]] = $app->extend($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_a676ed2e8006438" . "8827261b1a435d9d" . "b"], function (Clarologue $_a676ed2e80064388827261b1a435d9db) {
            $_a676ed2e80064388827261b1a435d9db->register(OnesignalUser::class, OnesignalUserMap::class);
            return $_a676ed2e80064388827261b1a435d9db;
        });
        $app[OnesignalRepository::class] = function ($app) {
            $_dabd1eb8030f2c29327a192cddfd85a9 = $app->analogue->mapper(OnesignalUser::class);
            return new OnesignalRepository($_dabd1eb8030f2c29327a192cddfd85a9);
        };
        $app[$GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_61de634aa59" . "a9939e8af8bc" . "21e398ead"]] = OnesignalRepository::class;
        $app[$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_cda61173232abb" . "47bde8311ad02ac" . "58c"]] = function ($app) {
            return new OnesignalDatatableSource($app[$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_61de634aa59a9939e8" . "af8bc21e398ead"]]);
        };
    }
    public function subscribe(Container $app, EventDispatcherInterface $dispatcher)
    {
        (new LazyResolver($app, OnesignalSubscriber::class, OnesignalSubscriber::getSubscribedEvents()))->subscribe($dispatcher);
    }
}