<?php
namespace Claromentis\Search;

$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"] = (@$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"] ?: array()) + array("_8ec8f26c742278f90615f50d682eea" . "79" => base64_decode("UE9" . "TVA" . "=="), "_7f628626dd1d" . "55c71b1fc0932" . "ffd1d2c" => base64_decode("aXNfYXJyYX" . "k="));
use ErrorHandler;
use Psr\Http\Message\ServerRequestInterface as Request;
use AdminPanel;




class GlobalSearchDialog extends ErrorHandler
{
    
    
    
    
    protected $sp;
    protected $default_page_size;
    protected $default_obj_types;
    public function __construct(Parameters $_a2203fd840679f8e86b59b15cde7e240)
    {
        $this->sp = $_a2203fd840679f8e86b59b15cde7e240;
    }
    public function Update(Request $request)
    {
        if ($request->getMethod() === $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_8ec8f26c742278f90615f50d682e" . "ea79"]) {
            $handler = new HttpInterop\StandardDialog();
        } else {
            $handler = new HttpInterop\StandardQueryString();
        }
        $this->SetDefaults();
        return $this->PassError($handler->ReadFromRequest($this->sp, $request), $handler);
    }
    public function Show()
    {
        $args = array();
        $_a848b7ea96346727f85d65a942a911e7 = new HttpInterop\StandardDialog();
        $_295b44a19a452a2dce391fbb5273bc53 = $_a848b7ea96346727f85d65a942a911e7->Show($this->sp);
        if ($_295b44a19a452a2dce391fbb5273bc53 === false) {
            return $this->SetErrMsg($_a848b7ea96346727f85d65a942a911e7->GetErrMsg());
        }
        if ($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_7f62862" . "6dd1d55c" . "71b1fc09" . "32ffd1d2" . "c"]($_295b44a19a452a2dce391fbb5273bc53)) {
            $args = $_295b44a19a452a2dce391fbb5273bc53 + $args;
        }
        return $args;
    }
    public function SetDefaultPageSize($page_size)
    {
        $this->default_page_size = $page_size;
    }
    public function GetDefaultPageSize()
    {
        return !empty($this->default_page_size) ? $this->default_page_size : 20;
    }
    public function SetDefaultObjTypes($_dc2b75048b800aebd70fa1ad1a3c27a8)
    {
        $this->default_obj_types = $_dc2b75048b800aebd70fa1ad1a3c27a8;
    }
    public function GetDefaultObjTypes()
    {
        return !empty($this->default_obj_types) ? $this->default_obj_types : null;
        
        
    }
    private function SetDefaults()
    {
        $this->sp->SetObjectTypesList($this->default_obj_types);
        $this->sp->SetPagesize($this->default_page_size);
    }
}