<?php
namespace Claromentis\Core\Audit;

$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"] ?: array()) + array("_99c2b8034d3861ecf0404e4b1b44" . "c9a9" => base64_decode("YXVkaXRfZnVuY3Rp" . "b25zLnBocA=="), "au" . "di" . "t" => base64_decode("YX" . "Vk" . "aX" . "Q="), "_c3af724dc88eee" . "2a40b430b151834" . "627" => base64_decode("YXVkaXQuYXBwbGljY" . "XRpb24u"), "_c0ecf3677721377afb8e" . "78efcd093a83" => base64_decode("X25h" . "bWU="), "_6b36962d18969b83" . "ca18c3d6c4352b61" => base64_decode("Y2ZnX2F1ZGl0X2FyY2hpdmV" . "fZGly"), "_aa0553266235d1e7c43a6e88694" . "64820" => base64_decode("REF" . "UQV" . "9ES" . "VI="), "con" . "fig" => base64_decode("Y29" . "uZm" . "ln"), "_310a3763368c1" . "d4658339d1a86d" . "75631" => base64_decode("Y29yZS5hdWRpdF9ldmVudHNfZmlsd" . "GVy"), "_047f92759337fde8891e0f36edc3" . "5a7a" => base64_decode("YXVkaXQuYXBwbGlj" . "YXRpb25z"), "_6912fad503c" . "e2ea9187bad6" . "1a8eb9d1d" => base64_decode("L2F1ZGl0X2FyY2hp" . "dmU="));
use Claromentis\Core\Application;
use Claromentis\Core\Config\WritableConfig;
use Claromentis\Core\DAL\Interfaces\DbInterface;
use Claromentis\Core\DAL\QueryFactory;
use Claromentis\Core\Lock;
use Claromentis\People\Repository\UserRepository;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
class AuditServiceProvider implements ServiceProviderInterface
{
    
    
    
    
    
    
    
    
    
    public function register(Container $app)
    {
        
        
        $app->extend($GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["confi" . "g"], function (WritableConfig $config) {
            $data = $config->get($GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_aa0553266235d" . "1e7c43a6e88694" . "64820"]);
            $config->set($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_6b36962d18969b83ca" . "18c3d6c4352b61"], $data . $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_6912fad5" . "03ce2ea91" . "87bad61a8" . "eb9d1d"]);
            return $config;
        });
        $app[Audit::class] = function ($app) {
            
            
            return new Audit($app[Repository::class], $app[AuditFilesystem::class], $app[AuditConfig::class], $app[Lock\LockInterface::class], $app->GetLogger(Audit::LOG_NAME));
        };
        $app[$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["audi" . "t"]] = Audit::class;
        $app[$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_047f9275933" . "7fde8891e0f3" . "6edc35a7a"]] = function ($app) {
            
            
            $_d554007f45ad6daab728c53d83ab4148 = new AuditConfig($app, $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_c3af724dc88" . "eee2a40b430b" . "151834627"]);
            
            
            require_once $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_99c2b8034d3861ecf0404e4b1" . "b44c9a9"];
            
            
            global $audit_structure;
            foreach ($audit_structure as $_d901b83ea3a884001dad5ede20f9b05e => $events) {
                $_8e8b612ee6d95dd763c14b4c52a5063e = $events[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_c0ecf367772137" . "7afb8e78efcd093" . "a83"]];
                unset($events[$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_c0ecf3677721377afb8e78" . "efcd093a83"]]);
                $_d554007f45ad6daab728c53d83ab4148->AddApplication($_d901b83ea3a884001dad5ede20f9b05e, $_8e8b612ee6d95dd763c14b4c52a5063e, $events);
            }
            $event = new EventsFilterEvent($_d554007f45ad6daab728c53d83ab4148);
            $app->dispatcher->dispatch($GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_310a376" . "3368c1d4" . "658339d1" . "a86d7563" . "1"], $event);
            return $_d554007f45ad6daab728c53d83ab4148;
        };
        $app[AuditConfig::class] = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_047f92759337fde8891e0" . "f36edc35a7a"];
        $app[Repository::class] = function ($app) {
            
            
            return new Repository($app[DbInterface::class], $app[QueryFactory::class], $app[UserRepository::class], $app->GetLogger(Audit::LOG_NAME));
        };
        $app[AuditFilesystem::class] = function ($app) {
            
            
            return new AuditFilesystem($app->config->Get($GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_6b36962d18969b83ca18c3d" . "6c4352b61"]), $app->GetLogger(Audit::LOG_NAME));
        };
    }
}