<?php
namespace Claromentis\Search;

$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"] ?: array()) + array("_7f628626dd1d55c71b1fc0932ffd1d" . "2c" => base64_decode("aXNfYXJy" . "YXk="), "_8ec8f26" . "c742278f" . "90615f50" . "d682eea7" . "9" => base64_decode("UE9TV" . "A=="));
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["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_8ec8f26c742278f90615f5" . "0d682eea79"]) {
            $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["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_7f628626dd1d55c71b" . "1fc0932ffd1d2c"]($_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);
    }
}