<?php
namespace Claromentis\Projects;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"] = (@$GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"] ?: array()) + array("_680cc2b8220e94c8c32b8bc7c6551" . "9b4" => base64_decode("aXNfaW" . "50"), "_4cfe17fc25" . "16abcf039dd" . "2848579d320" => base64_decode("bGlz" . "dA=="), "_bd71c3b5c201fc11db82ed14ce4" . "24de5" => base64_decode("aW5fY" . "XJyYX" . "k="), "_34dd56ea628f6a96d56c" . "5189eb450b23" => base64_decode("cHJ" . "ldm" . "lld" . "w=="), "_5e30c4717ced36cf" . "f9e93e19a5c576cc" => base64_decode("aXNfc3R" . "yaW5n"), "_af66268e41c5634df" . "3c88007939cbf33" => base64_decode("ZG93b" . "mxvYW" . "Q="), "_653d814a74cb0f6ccf" . "483fd8ef1fced2" => 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["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_5e30c4717ced36cff9e93e19a" . "5c576cc"]($_4eba7123fcddc4f01c504628a68f3142) && !$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_680cc2b8220e94c8c32b" . "8bc7c65519b4"]($_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"]["_653d814a74cb0f6ccf483fd8ef1f" . "ced2"];
    }
    
    
    
    
    
    
    public function GetProjectsFilesDmsvAction() : string
    {
        return $this->db_var->Get(self::PROJECTS_FILES_DMSV_ACTION, false) ?? $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_af66268e41c5634df3c8800793" . "9cbf33"];
    }
    
    
    
    
    
    
    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"]["_bd71c3b5c201fc11d" . "b82ed14ce424de5"]($_ec5506f22f4380697838f5559d75d370, [$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_653d814a74cb0f6ccf483fd" . "8ef1fced2"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_4cfe17fc2516abcf039dd2848" . "579d320"]])) {
            throw new ProjectsViewException();
        }
        $this->db_var->Set(self::PROJECTS_FILES_DMSV_VIEW_STYLE, $_ec5506f22f4380697838f5559d75d370);
    }
    
    
    
    
    
    
    
    public function SetProjectsFilesDmsvAction(string $_8e7f4b5c8440c0a24fb1b632eee28538) : void
    {
        if (!$GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_bd71c3b5c201fc11db8" . "2ed14ce424de5"]($_8e7f4b5c8440c0a24fb1b632eee28538, [$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_af66268e41c5634df" . "3c88007939cbf33"], $GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_34dd56ea628f6a96d56c5189e" . "b450b23"]])) {
            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);
    }
}