<?php
namespace Claromentis\People\Entity\Scope;

$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"] ?: array()) + array("_78b1cddfa1" . "ac292de05ff" . "82ba43b53a7" => base64_decode("YXBwbHlFe" . "HRyYW5ldE" . "ZpbHRlcg=" . "="));
use Analogue\ORM\System\Query;
use Analogue\ORM\System\ScopeInterface;
use Claromentis\Core\Security\SecurityContext;
use Claromentis\People\Repository\ExtranetRepository;




class ExtranetFilterScope implements ScopeInterface
{
    
    
    
    
    protected $extranet_repository;
    
    
    
    
    public function __construct(ExtranetRepository $_4af3095f20a1f91b94a8762557924437)
    {
        $this->extranet_repository = $_4af3095f20a1f91b94a8762557924437;
    }
    public function apply(Query $_30f942154645a3deca356c5cbdef7313)
    {
        $_30f942154645a3deca356c5cbdef7313->macro($GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_78b1cddfa1ac292de05ff82ba43b" . "53a7"], function (Query $_7f5aa4e96d4b415a86ed72ebff677cbe, SecurityContext $context, $_16e904583014a98ae3677f33f097518d = 'ex_area_id') {
            
            
            if ($context->IsPrimaryExtranet()) {
                return $_7f5aa4e96d4b415a86ed72ebff677cbe;
            }
            
            
            $_a50b89f7a699cedab7cc721b2e6008e5 = $this->extranet_repository->getPrimaryExtranet()->id;
            $_7f5aa4e96d4b415a86ed72ebff677cbe->whereIn($_16e904583014a98ae3677f33f097518d, [0, $_a50b89f7a699cedab7cc721b2e6008e5, $context->GetExtranetAreaId()]);
            return $_7f5aa4e96d4b415a86ed72ebff677cbe;
        });
    }
    public function remove(Query $_30f942154645a3deca356c5cbdef7313)
    {
        
        
    }
}