<?php
$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"] ?: array()) + array("_0c5123aa744f69bbc0e8b3ea2f6" . "e847d" => base64_decode("bG" . "1z" . "Zw" . "=="), "_bd71c3b5c201fc11" . "db82ed14ce424de5" => base64_decode("aW5fYXJyYXk" . "="), "_7f628626dd1d55c71b1f" . "c0932ffd1d2c" => base64_decode("aXNfYX" . "JyYXk="), "_03a6e918caa5" . "5856d5fac0ad6" . "894df58" => base64_decode("Y29yZS5hZ2dyZWdhdGlvbnNfZmlsdGV" . "y"), "_18c85900143ab0285ab32229112" . "3bd10" => base64_decode("dH" . "lw" . "ZV" . "8="), "_8000452ad4cc87e072d26d41b8" . "7de321" => base64_decode("Y29tbW9uL" . "nR5cGUudW" . "5rbm93bg=" . "="));
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["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_03a6e918caa55" . "856d5fac0ad689" . "4df58"], 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["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_0c5123aa744f69bbc0" . "e8b3ea2f6e847d"]($GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_8000452ad4cc87e072d26" . "d41b87de321"]), $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_0c5123aa744f69" . "bbc0e8b3ea2f6e8" . "47d"]($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_8000452ad4cc87e07" . "2d26d41b87de321"]), $GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_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["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_7f628626dd1d55c71b1f" . "c0932ffd1d2c"]($_2fa93201ac3ea6a8714aa6209f17fcaf) || empty($_2fa93201ac3ea6a8714aa6209f17fcaf)) {
            return array();
        }
        self::Init();
        $_98f020f9e828c587202bb54213af6c3f = self::$aggregations_info->GetAllNames();
        $_1f24efd4735b7a11b391147435e7d35d = array();
        foreach ($_98f020f9e828c587202bb54213af6c3f as $_d5318194ce3a421f28748e4e16700690 => $_2420ec9da53978a4e391100f2c6ab9f1) {
            if ($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_bd71c3b5c201fc11" . "db82ed14ce424de5"]($_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);
    }
}