<?php
namespace Claromentis\Search;

$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"] ?: array()) + array("_8ec8f26c742278f90615f50d68" . "2eea79" => base64_decode("UE9TVA" . "=="), "_7f628626dd1d55c71b1fc0932ffd1d" . "2c" => base64_decode("aXNfYXJyYXk" . "="));
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["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_8ec8f26c742278f90615f50d682ee" . "a79"]) {
            $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["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_7f628626dd1d55c7" . "1b1fc0932ffd1d2c"]($_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);
    }
}