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

$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"] ?: array()) + array("_78b1cddf" . "a1ac292de" . "05ff82ba4" . "3b53a7" => base64_decode("YXBwbHlFeH" . "RyYW5ldEZp" . "bHRlcg=="));
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["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_78b1cddfa1ac" . "292de05ff82ba" . "43b53a7"], 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)
    {
        
        
    }
}