<?php
$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] ?: array()) + array("_18c85900143ab0285ab3222" . "91123bd10" => base64_decode("dHl" . "wZV" . "8="), "_bd71c3b5c201fc11d" . "b82ed14ce424de5" => base64_decode("aW5fYXJyYX" . "k="), "_03a6e918caa558" . "56d5fac0ad6894d" . "f58" => base64_decode("Y29yZS5hZ2dyZWdhdG" . "lvbnNfZmlsdGVy"), "_0c5123aa744f69bbc0e8b3" . "ea2f6e847d" => base64_decode("bG1" . "zZw" . "=="), "_8000452ad4cc87e072d" . "26d41b87de321" => base64_decode("Y29tbW9uLnR5cGUud" . "W5rbm93bg=="), "_7f628626dd1d55c71b1fc0932" . "ffd1d2c" => base64_decode("aXNfYXJy" . "YXk="));
use Claromentis\Core\Aggregation\AggregationFilterEvent;
use Claromentis\Core\Aggregation\AggregationConfig;
use Claromentis\Core\Event\EventDispatcher;






class ClaAggregations
{
    
    
    
    
    protected static $aggregations_info;
    
    
    
    
    protected static function Init()
    {
        if (!self::$aggregations_info) {
            self::$aggregations_info = new AggregationConfig();
            EventDispatcher::Shared()->dispatch($GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_03a6e918caa558" . "56d5fac0ad6894d" . "f58"], new AggregationFilterEvent(self::$aggregations_info));
        }
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    public static function GetName($aggregation)
    {
        self::Init();
        $_fa4acfe76e324ce56a458c338cef3ed1 = self::$aggregations_info->GetNames($aggregation);
        if ($_fa4acfe76e324ce56a458c338cef3ed1) {
            return $_fa4acfe76e324ce56a458c338cef3ed1;
        }
        return array($GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_0c5123aa744" . "f69bbc0e8b3e" . "a2f6e847d"]($GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_8000452a" . "d4cc87e07" . "2d26d41b8" . "7de321"]), $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_0c5123aa744f69bbc0" . "e8b3ea2f6e847d"]($GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_8000452ad4c" . "c87e072d26d4" . "1b87de321"]), $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_18c85900143ab028" . "5ab322291123bd10"] . $aggregation);
    }
    
    
    
    
    
    public static function GetNameSingular($aggregation)
    {
        list($_4866d6ee6087d5ffee4d6cbe0257808b) = self::GetName($aggregation);
        return $_4866d6ee6087d5ffee4d6cbe0257808b;
    }
    
    
    
    
    
    public static function GetNamePlural($aggregation)
    {
        list(, $_6453438a36eec215995d5f3c99014bb8) = self::GetName($aggregation);
        return $_6453438a36eec215995d5f3c99014bb8;
    }
    
    
    
    
    
    public static function GetCode($aggregation)
    {
        list(, , $code) = self::GetName($aggregation);
        return $code;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    public static function GetNames($_6d47c451cff575a3b8af354e1fa29d61)
    {
        $_f274035cf280fb57c0c9ef54d849a83d = array();
        foreach ($_6d47c451cff575a3b8af354e1fa29d61 as $aggregation) {
            $_f274035cf280fb57c0c9ef54d849a83d[$aggregation] = self::GetName($aggregation);
        }
        return $_f274035cf280fb57c0c9ef54d849a83d;
    }
    
    
    
    
    
    
    public static function GetNamesSingular($_6d47c451cff575a3b8af354e1fa29d61)
    {
        $_f274035cf280fb57c0c9ef54d849a83d = array();
        foreach ($_6d47c451cff575a3b8af354e1fa29d61 as $aggregation) {
            list($_2984f5d2e76f2b8d04438c6a8a74222f) = self::GetName($aggregation);
            $_f274035cf280fb57c0c9ef54d849a83d[$aggregation] = $_2984f5d2e76f2b8d04438c6a8a74222f;
        }
        return $_f274035cf280fb57c0c9ef54d849a83d;
    }
    
    
    
    
    
    public static function GetNamesPlural($_6d47c451cff575a3b8af354e1fa29d61)
    {
        $_f274035cf280fb57c0c9ef54d849a83d = array();
        foreach ($_6d47c451cff575a3b8af354e1fa29d61 as $aggregation) {
            list(, $_b0c4ee8f3aff152dedc397f0c93fcc6f) = self::GetName($aggregation);
            $_f274035cf280fb57c0c9ef54d849a83d[$aggregation] = $_b0c4ee8f3aff152dedc397f0c93fcc6f;
        }
        return $_f274035cf280fb57c0c9ef54d849a83d;
    }
    
    
    
    
    
    public static function GetCodes($_6d47c451cff575a3b8af354e1fa29d61)
    {
        $_f274035cf280fb57c0c9ef54d849a83d = array();
        foreach ($_6d47c451cff575a3b8af354e1fa29d61 as $aggregation) {
            list(, , $code) = self::GetName($aggregation);
            $_f274035cf280fb57c0c9ef54d849a83d[$aggregation] = $code;
        }
        return $_f274035cf280fb57c0c9ef54d849a83d;
    }
    
    
    
    
    
    
    
    public static function GetNumByCodes($_2fa93201ac3ea6a8714aa6209f17fcaf)
    {
        if (!$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_7f628626dd1d55c71b1fc0932f" . "fd1d2c"]($_2fa93201ac3ea6a8714aa6209f17fcaf) || empty($_2fa93201ac3ea6a8714aa6209f17fcaf)) {
            return array();
        }
        self::Init();
        $_98f020f9e828c587202bb54213af6c3f = self::$aggregations_info->GetAllNames();
        $_1f24efd4735b7a11b391147435e7d35d = array();
        foreach ($_98f020f9e828c587202bb54213af6c3f as $_d5318194ce3a421f28748e4e16700690 => $_2420ec9da53978a4e391100f2c6ab9f1) {
            if ($GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_bd71c3b5c2" . "01fc11db82e" . "d14ce424de5"]($_2420ec9da53978a4e391100f2c6ab9f1[2], $_2fa93201ac3ea6a8714aa6209f17fcaf)) {
                $_1f24efd4735b7a11b391147435e7d35d[$_2420ec9da53978a4e391100f2c6ab9f1[2]] = $_d5318194ce3a421f28748e4e16700690;
            }
        }
        return $_1f24efd4735b7a11b391147435e7d35d;
    }
    
    
    
    
    
    
    
    public static function GetNumByCode($code)
    {
        $_d96b572510a4b2ffefb08e7fd4c0786a = self::GetNumByCodes(array($code));
        if (!isset($_d96b572510a4b2ffefb08e7fd4c0786a[$code])) {
            return null;
        }
        return $_d96b572510a4b2ffefb08e7fd4c0786a[$code];
    }
    
    
    
    
    
    
    
    public static function GetParentsAggregations($aggregation)
    {
        self::Init();
        return self::$aggregations_info->GetParents($aggregation);
    }
    
    
    
    
    
    
    
    public static function GetChildrenAggregations($aggregation)
    {
        self::Init();
        return self::$aggregations_info->GetChildren($aggregation);
    }
}