<?php
namespace Claromentis\Search;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"] ?: array()) + array("_8ec8f26c742278f9" . "0615f50d682eea79" => base64_decode("UE9TVA" . "=="), "_7f628626dd1d55c7" . "1b1fc0932ffd1d2c" => base64_decode("aXNfYX" . "JyYXk="));
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["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_8ec8f26c" . "742278f90" . "615f50d68" . "2eea79"]) {
            $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["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_7f628626dd" . "1d55c71b1fc" . "0932ffd1d2c"]($_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);
    }
}