<?php
$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"] ?: array()) + array("_418e110" . "6a8cc0ff" . "7d3a2b82" . "d6936ad1" . "1" => base64_decode("dXNlcnMuZXhfYXJlYV" . "9pZCBJTiBpbjppbnQ6" . "YXJlYXM="), "_6ef4717df5dbc77a3a6c75e3" . "c6d87521" => base64_decode("IE9SIA=" . "="), "_f149cf29770e" . "82095e992315e" . "2ab26e2" => base64_decode("K" . "A" . "=" . "="), "_faf4ec11b443d169ac01679aaa1" . "c1601" => base64_decode("M" . "T" . "0" . "w"), "_d706c16" . "0e45bf74" . "34fff82a" . "5976f0e1" . "9" => base64_decode("YXJyYXlfa2V5" . "cw=="), "_0284d38f97f9e8b9c7b03bb8" . "928afae1" => base64_decode("KQ" . "=="), "_3368261835e304e7507d8" . "ee26c6f7ee9" => base64_decode("dXNlcnMuaWQgSU4gKFNFTEVDVCB1c2VyaWQgRlJPTSB1c2VyX3JvbGVzIFdIRVJFIHJvbGVpZCBJTiBpbjppbnQ6cm9s" . "ZWlkcyk="), "_f73dab606630b388645c4f7d3fbb" . "13bb" => base64_decode("YXJyYXlfbWV" . "yZ2U="), "_800c9c64f48b6361550f5b6b11d2b" . "45c" => base64_decode("dXNlcnMuaWQgSU4gKFNFTEVDVCB1c2Vya" . "WQgRlJPTSB1c2VyX2dyb3VwcyBXSEVSRS" . "Bncm91cGlkIElOIGluOmludDpncm91cGl" . "kcyk="), "_ec396afcbd56cc8f2fe" . "8cf8705a93682" => base64_decode("dXNlcnMuaWQgSU4gaW46aW50Omlu" . "ZGl2aWR1YWxz"));
use Claromentis\Core\DAL;
class ICUsersPickerFilter implements UsersListFilterInterface
{
    protected $perms_obj = null;
    protected $perms_rights = null;
    protected $searialized_items = null;
    protected $ids_filter = null;
    public function __construct($_65cc2d6542f9e0cd8125a4d3e6264960)
    {
        $this->searialized_items = $_65cc2d6542f9e0cd8125a4d3e6264960;
        $this->perms_rights = PERM_VIEW;
        $this->perms_obj = new Permissions(PERM_CLASS_FORM_FIELD_USERLIST, 0);
    }
    public function Apply(DAL\QueryBuilder $_7f5aa4e96d4b415a86ed72ebff677cbe)
    {
        if (!$this->perms_obj) {
            return $_7f5aa4e96d4b415a86ed72ebff677cbe;
        }
        $this->perms_obj->Unserialize($this->searialized_items);
        $_1ac0335a1f605e216d9ffde5545a81e3 = $this->perms_obj->GetOwnersList(PERM_VIEW, PERM_OCLASS_ALL);
        $_f365d394f839fddd4250d517ee1ca5ea = $this->perms_obj->GetOwnersList(PERM_VIEW, PERM_OCLASS_PUBLIC);
        if (!empty($_1ac0335a1f605e216d9ffde5545a81e3) || !empty($_f365d394f839fddd4250d517ee1ca5ea)) {
            return $_7f5aa4e96d4b415a86ed72ebff677cbe;
        }
        $_f40b3c6e78c5f0aed2aeec92d4ef9fd6 = [];
        $_af347b798c30485ed2d75e9ce0617ad9 = $this->perms_obj->GetOwnersList(PERM_VIEW, PERM_OCLASS_EXAREA);
        if (!empty($_af347b798c30485ed2d75e9ce0617ad9)) {
            $_f40b3c6e78c5f0aed2aeec92d4ef9fd6[] = new DAL\QueryPart($GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_418e1106a8cc0ff7d3a2b82d6936a" . "d11"], $_af347b798c30485ed2d75e9ce0617ad9);
        }
        $_14e7d5dee412ccf516939d1e99c87733 = $this->perms_obj->GetOwnersList(PERM_VIEW, PERM_OCLASS_GROUP);
        $_a523ddfe502a2d6e090750f9e2f4f5a1 = $this->perms_obj->GetOwnersList(PERM_VIEW, PERM_OCLASS_GROUPTREE);
        if (!empty($_a523ddfe502a2d6e090750f9e2f4f5a1)) {
            $_14e7d5dee412ccf516939d1e99c87733 = $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_f73dab606630b388645c4f7d3" . "fbb13bb"]($_14e7d5dee412ccf516939d1e99c87733, $GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_d706c160e45bf7434fff82a5976f" . "0e19"](UserGroup::GetAllSubgroups($_a523ddfe502a2d6e090750f9e2f4f5a1)));
        }
        if (!empty($_14e7d5dee412ccf516939d1e99c87733)) {
            $_f40b3c6e78c5f0aed2aeec92d4ef9fd6[] = new DAL\QueryPart($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_800c9c64f48b636" . "1550f5b6b11d2b45" . "c"], $_14e7d5dee412ccf516939d1e99c87733);
        }
        $_23ab4dd81b6c619f47099ef7c2485a12 = $this->perms_obj->GetOwnersList(PERM_VIEW, PERM_OCLASS_ROLE);
        if (!empty($_23ab4dd81b6c619f47099ef7c2485a12)) {
            $_f40b3c6e78c5f0aed2aeec92d4ef9fd6[] = new DAL\QueryPart($GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_3368261835e304" . "e7507d8ee26c6f7" . "ee9"], $_23ab4dd81b6c619f47099ef7c2485a12);
        }
        $_42bd27b9278b903b69a725b320c945c2 = $this->perms_obj->GetOwnersList(PERM_VIEW, PERM_OCLASS_INDIVIDUAL);
        if (!empty($_42bd27b9278b903b69a725b320c945c2)) {
            $_f40b3c6e78c5f0aed2aeec92d4ef9fd6[] = new DAL\QueryPart($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_ec396afcbd56cc8f2fe8c" . "f8705a93682"], $_42bd27b9278b903b69a725b320c945c2);
        }
        if (empty($_f40b3c6e78c5f0aed2aeec92d4ef9fd6)) {
            $_7f5aa4e96d4b415a86ed72ebff677cbe->AddWhereAndClause($GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_faf4ec11b443d169ac01679aaa1c16" . "01"]);
            return $_7f5aa4e96d4b415a86ed72ebff677cbe;
        }
        $_202eaecdf712cbd73fab59761820fe4b = new DAL\QueryPart($GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_f149cf29" . "770e82095" . "e992315e2" . "ab26e2"] . DAL\QueryBuilder::JoinQueryParts($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_6ef4717" . "df5dbc77" . "a3a6c75e" . "3c6d8752" . "1"], $_f40b3c6e78c5f0aed2aeec92d4ef9fd6) . $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_0284d38f97f9e8b9c7b03bb8" . "928afae1"]);
        $_202eaecdf712cbd73fab59761820fe4b = DAL\QueryBuilder::BindQueryParts($_202eaecdf712cbd73fab59761820fe4b, $_f40b3c6e78c5f0aed2aeec92d4ef9fd6);
        $_7f5aa4e96d4b415a86ed72ebff677cbe->AddWhereAndClause($_202eaecdf712cbd73fab59761820fe4b);
        return $_7f5aa4e96d4b415a86ed72ebff677cbe;
    }
}