<?php
namespace Claromentis\Projects;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"] ?: array()) + array("_653d814a74cb0f6" . "ccf483fd8ef1fced" . "2" => base64_decode("aWNv" . "bnM="), "_bd71c3b5c201" . "fc11db82ed14c" . "e424de5" => base64_decode("aW5fYXJyYX" . "k="), "_4cfe17fc2516abcf039dd" . "2848579d320" => base64_decode("bGlz" . "dA=="), "_34dd56ea628f6a96d56c5189eb450b" . "23" => base64_decode("cHJl" . "dmll" . "dw=="), "_5e30c4717ced36cff9e93e19a5c576" . "cc" => base64_decode("aXN" . "fc3" . "Rya" . "W5n"), "_af66268e41c5634df3c88007" . "939cbf33" => base64_decode("ZG93bmxvYW" . "Q="), "_680cc2b82" . "20e94c8c32" . "b8bc7c6551" . "9b4" => 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["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_5e30c4717ced36cff9" . "e93e19a5c576cc"]($_4eba7123fcddc4f01c504628a68f3142) && !$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_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["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_653d814a74cb0f6ccf483fd8" . "ef1fced2"];
    }
    
    
    
    
    
    
    public function GetProjectsFilesDmsvAction() : string
    {
        return $this->db_var->Get(self::PROJECTS_FILES_DMSV_ACTION, false) ?? $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_af66268e41c5634df3c88007939cbf3" . "3"];
    }
    
    
    
    
    
    
    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["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_bd71c3b5c201fc11db82ed14ce424de" . "5"]($_ec5506f22f4380697838f5559d75d370, [$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_653d814a74cb0f" . "6ccf483fd8ef1fc" . "ed2"], $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_4cfe17fc2" . "516abcf039" . "dd2848579d" . "320"]])) {
            throw new ProjectsViewException();
        }
        $this->db_var->Set(self::PROJECTS_FILES_DMSV_VIEW_STYLE, $_ec5506f22f4380697838f5559d75d370);
    }
    
    
    
    
    
    
    
    public function SetProjectsFilesDmsvAction(string $_8e7f4b5c8440c0a24fb1b632eee28538) : void
    {
        if (!$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_bd71c3b5c201fc11db8" . "2ed14ce424de5"]($_8e7f4b5c8440c0a24fb1b632eee28538, [$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_af66268e41c5634df3c8800793" . "9cbf33"], $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_34dd56ea628f6a96d56c5189" . "eb450b23"]])) {
            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);
    }
}