<?php
namespace Claromentis\Search;

$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"] ?: array()) + array("_7f628626d" . "d1d55c71b1" . "fc0932ffd1" . "d2c" => base64_decode("aXNfYXJyYXk" . "="), "_8ec8f26c742278f906" . "15f50d682eea79" => base64_decode("UE9TVA" . "=="));
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["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_8ec8f26c742" . "278f90615f50" . "d682eea79"]) {
            $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["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_7f628626dd1d55c71b1fc0932f" . "fd1d2c"]($_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);
    }
}