<?php
namespace Claromentis\Projects;

$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"] ?: array()) + array("_bd71c3b5c201fc11db82ed14ce424de" . "5" => base64_decode("aW5fY" . "XJyYX" . "k="), "_34dd56ea628f6a96" . "d56c5189eb450b23" => base64_decode("cHJld" . "mlldw" . "=="), "_5e30c4717ced36cff9e" . "93e19a5c576cc" => base64_decode("aXNfc3RyaW" . "5n"), "_af66268e41c5634df3c88007939c" . "bf33" => base64_decode("ZG93bmxv" . "YWQ="), "_680cc2b8220e94c8c" . "32b8bc7c65519b4" => base64_decode("aX" . "Nf" . "aW" . "50"), "_4cfe17fc2516abcf039dd" . "2848579d320" => base64_decode("bGlz" . "dA=="), "_653d814a74cb0f6ccf483fd8e" . "f1fced2" => base64_decode("aW" . "Nv" . "bn" . "M="));
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["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_5e30c4717ced36cff9e93" . "e19a5c576cc"]($_4eba7123fcddc4f01c504628a68f3142) && !$GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_680cc2b8220e9" . "4c8c32b8bc7c65" . "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["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_653d814a74cb0f6cc" . "f483fd8ef1fced2"];
    }
    
    
    
    
    
    
    public function GetProjectsFilesDmsvAction() : string
    {
        return $this->db_var->Get(self::PROJECTS_FILES_DMSV_ACTION, false) ?? $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_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["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_bd71c3b5c201fc1" . "1db82ed14ce424de" . "5"]($_ec5506f22f4380697838f5559d75d370, [$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_653d814a74cb0f6c" . "cf483fd8ef1fced2"], $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_4cfe17fc" . "2516abcf0" . "39dd28485" . "79d320"]])) {
            throw new ProjectsViewException();
        }
        $this->db_var->Set(self::PROJECTS_FILES_DMSV_VIEW_STYLE, $_ec5506f22f4380697838f5559d75d370);
    }
    
    
    
    
    
    
    
    public function SetProjectsFilesDmsvAction(string $_8e7f4b5c8440c0a24fb1b632eee28538) : void
    {
        if (!$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_bd71c3b5c20" . "1fc11db82ed1" . "4ce424de5"]($_8e7f4b5c8440c0a24fb1b632eee28538, [$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_af66268e41c5634df" . "3c88007939cbf33"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_34dd56ea6" . "28f6a96d56" . "c5189eb450" . "b23"]])) {
            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);
    }
}