<?php
namespace Claromentis\Projects;

$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"] ?: array()) + array("_4cfe17fc" . "2516abcf0" . "39dd28485" . "79d320" => base64_decode("bGl" . "zdA" . "=="), "_680cc2b8220e94c8c32b8bc7c6" . "5519b4" => base64_decode("aXNfa" . "W50"), "_653d814a74cb0f6ccf483fd8ef1fce" . "d2" => base64_decode("aWNvbnM" . "="), "_af66268e41c5634df3c880" . "07939cbf33" => base64_decode("ZG93bmxv" . "YWQ="), "_34dd56ea628f6a96" . "d56c5189eb450b23" => base64_decode("cHJldmll" . "dw=="), "_bd71c3b5c201fc11db82ed14ce" . "424de5" => base64_decode("aW5fYXJyYX" . "k="), "_5e30c4717ced36cff9e9" . "3e19a5c576cc" => base64_decode("aXNfc3RyaW" . "5n"));
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["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_5e30c4717ced36cff9" . "e93e19a5c576cc"]($_4eba7123fcddc4f01c504628a68f3142) && !$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_680cc2b8220e94c8c32b8bc7c65" . "519b4"]($_4eba7123fcddc4f01c504628a68f3142)) {
            throw ProjectsFolderException::Undefined();
        }
        return (int) $_4eba7123fcddc4f01c504628a68f3142;
    }
    
    
    
    
    
    
    public function GetProjectsFilesDmsvViewStyle() : string
    {
        return $this->db_var->Get(self::PROJECTS_FILES_DMSV_VIEW_STYLE, false) ?? $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_653d814a74cb0f6ccf483fd8ef1" . "fced2"];
    }
    
    
    
    
    
    
    public function GetProjectsFilesDmsvAction() : string
    {
        return $this->db_var->Get(self::PROJECTS_FILES_DMSV_ACTION, false) ?? $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_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["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_bd71c3b5c201fc11" . "db82ed14ce424de5"]($_ec5506f22f4380697838f5559d75d370, [$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_653d814a7" . "4cb0f6ccf4" . "83fd8ef1fc" . "ed2"], $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_4cfe17fc2516abcf039dd28485" . "79d320"]])) {
            throw new ProjectsViewException();
        }
        $this->db_var->Set(self::PROJECTS_FILES_DMSV_VIEW_STYLE, $_ec5506f22f4380697838f5559d75d370);
    }
    
    
    
    
    
    
    
    public function SetProjectsFilesDmsvAction(string $_8e7f4b5c8440c0a24fb1b632eee28538) : void
    {
        if (!$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_bd71c3b5c201fc11db82e" . "d14ce424de5"]($_8e7f4b5c8440c0a24fb1b632eee28538, [$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_af66268e41c5634df3c8" . "8007939cbf33"], $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_34dd56ea628f6" . "a96d56c5189eb4" . "50b23"]])) {
            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);
    }
}