<?php
namespace Claromentis\Projects;

$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"] ?: array()) + array("_af66268e41c5634d" . "f3c88007939cbf33" => base64_decode("ZG9" . "3bm" . "xvY" . "WQ="), "_653d814a74cb0f6ccf483fd8ef1f" . "ced2" => base64_decode("aWNvbnM" . "="), "_5e30c4717ced36cff" . "9e93e19a5c576cc" => base64_decode("aXNfc3Ry" . "aW5n"), "_4cfe17fc2516a" . "bcf039dd284857" . "9d320" => base64_decode("bGlzdA" . "=="), "_34dd56ea628f6a96d56c5189eb" . "450b23" => base64_decode("cHJldmlld" . "w=="), "_bd71c3b5c201fc11db82ed14ce424" . "de5" => base64_decode("aW5fYXJyYXk" . "="), "_680cc2b8220e94c8c32b8bc7c65519b" . "4" => base64_decode("aXN" . "faW" . "50"));
use Claromentis\Core\Variable\DbVarService;
use Claromentis\Projects\Exceptions\ProjectsActionException;
use Claromentis\Projects\Exceptions\ProjectsFolderException;
use Claromentis\Projects\Exceptions\ProjectsViewException;
class ProjectsRepository
{
    const PROJECTS_ROOT_FOLDER = 'project_module_root_folder_id';
    const PROJECTS_FILES_DMSV_VIEW_STYLE = 'projects_files_dmsv_view_style';
    const PROJECTS_FILES_DMSV_ACTION = 'projects_files_dmsv_action';
    const PROJECTS_FILES_DMSV_DETAILED_UPLOAD = 'projects_files_dmsv_detailed_upload';
    const PROJECTS_FILES_DMSV_NEW_WINDOW = 'projects_files_dmsv_new_window';
    
    
    
    
    private $db_var;
    public function __construct(DbVarService $_0b8990bd6c1bb6b5aa2d44f462f2dbeb)
    {
        $this->db_var = $_0b8990bd6c1bb6b5aa2d44f462f2dbeb;
    }
    
    
    
    
    
    
    
    public function GetProjectsRootFolderId() : int
    {
        $_4eba7123fcddc4f01c504628a68f3142 = $this->db_var->Get(self::PROJECTS_ROOT_FOLDER, false);
        if (!$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_5e30c4717ced36c" . "ff9e93e19a5c576c" . "c"]($_4eba7123fcddc4f01c504628a68f3142) && !$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_680cc2b8220e94" . "c8c32b8bc7c6551" . "9b4"]($_4eba7123fcddc4f01c504628a68f3142)) {
            throw ProjectsFolderException::Undefined();
        }
        return (int) $_4eba7123fcddc4f01c504628a68f3142;
    }
    
    
    
    
    
    
    public function GetProjectsFilesDmsvViewStyle() : string
    {
        return $this->db_var->Get(self::PROJECTS_FILES_DMSV_VIEW_STYLE, false) ?? $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_653d814a74cb0f6" . "ccf483fd8ef1fced" . "2"];
    }
    
    
    
    
    
    
    public function GetProjectsFilesDmsvAction() : string
    {
        return $this->db_var->Get(self::PROJECTS_FILES_DMSV_ACTION, false) ?? $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_af66268e41c5634df" . "3c88007939cbf33"];
    }
    
    
    
    
    
    
    public function GetProjectsFilesDmsvDetailedUpload() : bool
    {
        return $this->db_var->Get(self::PROJECTS_FILES_DMSV_DETAILED_UPLOAD, false) ?? false;
    }
    
    
    
    
    
    
    public function GetProjectsFilesDmsvNewWindow() : bool
    {
        return $this->db_var->Get(self::PROJECTS_FILES_DMSV_NEW_WINDOW, false) ?? false;
    }
    
    
    
    
    
    
    
    public function SetProjectsRootFolderId(int $_4eba7123fcddc4f01c504628a68f3142) : void
    {
        if (!($_4eba7123fcddc4f01c504628a68f3142 > 0)) {
            throw ProjectsFolderException::InvalidFolderId($_4eba7123fcddc4f01c504628a68f3142);
        }
        $this->db_var->Set(self::PROJECTS_ROOT_FOLDER, $_4eba7123fcddc4f01c504628a68f3142);
    }
    
    
    
    
    
    
    
    public function SetProjectsFilesDmsvViewStyle(string $_ec5506f22f4380697838f5559d75d370) : void
    {
        if (!$GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_bd71c3b5c201fc11db82ed" . "14ce424de5"]($_ec5506f22f4380697838f5559d75d370, [$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_653d814a" . "74cb0f6cc" . "f483fd8ef" . "1fced2"], $GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_4cfe17fc2516abcf039dd28" . "48579d320"]])) {
            throw new ProjectsViewException();
        }
        $this->db_var->Set(self::PROJECTS_FILES_DMSV_VIEW_STYLE, $_ec5506f22f4380697838f5559d75d370);
    }
    
    
    
    
    
    
    
    public function SetProjectsFilesDmsvAction(string $_8e7f4b5c8440c0a24fb1b632eee28538) : void
    {
        if (!$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_bd71c3b5c" . "201fc11db8" . "2ed14ce424" . "de5"]($_8e7f4b5c8440c0a24fb1b632eee28538, [$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_af66268e41c5634df3c8" . "8007939cbf33"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_34dd56ea628f6a9" . "6d56c5189eb450b2" . "3"]])) {
            throw new ProjectsActionException();
        }
        $this->db_var->Set(self::PROJECTS_FILES_DMSV_ACTION, $_8e7f4b5c8440c0a24fb1b632eee28538);
    }
    
    
    
    
    
    
    
    public function SetProjectsFilesDmsvNewWindow(bool $_354b3b07bdaa4e702886b2fdf9dd11ce) : void
    {
        $this->db_var->Set(self::PROJECTS_FILES_DMSV_NEW_WINDOW, $_354b3b07bdaa4e702886b2fdf9dd11ce);
    }
    
    
    
    
    
    
    
    public function SetProjectsFilesDmsvDetailedUpload(bool $_088ad1d986dcc070d4615e87ab4c9651) : void
    {
        $this->db_var->Set(self::PROJECTS_FILES_DMSV_DETAILED_UPLOAD, $_088ad1d986dcc070d4615e87ab4c9651);
    }
}