<?php
$GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"] = (@$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"] ?: array()) + array("_008bf2db978" . "7ce9ce15cab9" . "e1a2ed37a" => base64_decode("R2l2ZW4gb2xkX2lzc3VlIGlzIG5vdCBpbnN0YW5jZ" . "SBvZiBIRElzc3Vl"), "_052f001b9de630858d858ef" . "71f5be9d5" => base64_decode("RmllbGQgJ" . "w=="), "_7a32db383acd0c8bdf115d2bfd9c" . "afde" => base64_decode("R2l2ZW4gcHJvamVj" . "dCBpcyBub3QgaW5z" . "dGFuY2Ugb2YgSERQ" . "cm9qZWN0"), "_a67b7cfa233" . "f8972066333e" . "bbf80977c" => base64_decode("JyBkb2Vzbid0IGV4a" . "XN0IGluIGZvcm0="), "_3b5754d" . "4df7891d" . "929988c5" . "ac777a0b" . "e" => base64_decode("LCM" . "="), "_5e9a99dc0dd49b90" . "7abf1b35e96965f8" => base64_decode("dH" . "Jp" . "bQ" . "=="), "_7f628626dd1d55c71b" . "1fc0932ffd1d2c" => base64_decode("aXNfYXJyYXk" . "="), "_60bf41900e07190847af73" . "ae3165e29b" => base64_decode("QXR0ZW1wdCB0byB1c2UgaXNzdWUsIGJ1dCBpdCdzIG5vdCBwYXNzZWQgd" . "G8gcGx1Z2lu"), "_cfec9d6808fd6ffa4e646528559e" . "98e8" => base64_decode("YXNzaWduZW" . "Q="), "_a591754a8ddcdbda9c80f1db4d911e" . "14" => base64_decode("aXNfbnVs" . "bA=="), "_4d707fab93bebb00bb" . "e69e8159697c90" => base64_decode(""), "statu" . "s" => base64_decode("c3RhdH" . "Vz"), "_ca6c5f624ca5c8" . "225400b1ec17340" . "95f" => base64_decode("R2l2ZW4gaXNzdWUgaXMgbm90IGluc3" . "RhbmNlIG9mIEhESXNzdWU="), "_29133f4e79c6aadb6d2" . "de353856bd922" => base64_decode("ZmllbGRzX3ZhbHVlcw" . "=="), "_8384a6b1adf68" . "2aa6c01ca47ee4" . "afdf7" => base64_decode("QXR0ZW1wdCB0byB1c2Ugb2xkIGlzc3VlLCBidXQgaX" . "QncyBub3QgcGFzc2VkIHRvIHBsdWdpbg=="), "_db3b2f9b43b74a" . "94fb9abadd3195f" . "b4f" => base64_decode("Rm9ybSBk" . "b2Vzbid0" . "IGV4aXN0"), "_e258c5dc52" . "2b65a064571" . "1c5089a8e9c" => base64_decode("aX" . "Rl" . "bX" . "M="), "_b742a00ae87756f850c77e" . "0daf4e7a3a" => base64_decode("C" . "g" . "=" . "="));
use Claromentis\Core\DAL;






abstract class ICPluginBase
{
    
    
    
    
    
    
    protected $project;
    
    
    
    
    
    
    protected $add_params;
    
    
    
    
    
    
    
    public function Enabled()
    {
        return true;
    }
    
    
    
    
    
    
    
    
    
    public function ModifyForm()
    {
    }
    
    
    
    
    
    
    
    
    
    public function ModifyData()
    {
    }
    
    
    
    
    
    
    
    
    
    public function ValidateData()
    {
        
        
    }
    
    
    
    
    
    
    
    
    
    
    public function OnIssueAddUpdate()
    {
    }
    
    
    
    
    
    
    
    
    
    public function OnIssueDelete()
    {
    }
    
    
    
    
    
    
    
    
    
    
    
    public function OnFileUpload($_ab4a84d38986787e58597ed7091af8ca)
    {
    }
    
    
    
    
    
    
    
    
    
    
    
    public function OnFilesUpload($_00f2055c7cbd408ef56949f35c62b721)
    {
    }
    
    
    
    
    
    
    
    
    
    
    public function CheckIssueRights($_1ac701da0834eb6c188cf3ef004a1aca, $_ba1fef14652ca4006bd99d4fb79ddcab)
    {
        return null;
    }
    
    
    
    
    
    
    
    
    
    public function IssuesListFilter()
    {
        return null;
    }
    
    
    
    
    
    
    private $issue;
    
    
    
    
    private $old_issue;
    
    
    
    
    private $data_modifications;
    
    
    
    
    private $form_modifications;
    
    
    
    
    
    
    
    
    
    
    
    public function __construct(HDProject $project, $issue, $_279e1044fce2137914e09a214fbc8fce, $_e4bf1e70e6d9b11e2cf0fe9ce843e56b)
    {
        if (!$project instanceof HDProject) {
            throw new ICPluginException($GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_7a32db3" . "83acd0c8" . "bdf115d2" . "bfd9cafd" . "e"]);
        }
        $this->project = $project;
        if (!$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_a591754a8ddc" . "dbda9c80f1db4" . "d911e14"]($issue) && !$issue instanceof HDIssue) {
            throw new ICPluginException($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_ca6c5f624c" . "a5c8225400b" . "1ec1734095f"]);
        }
        $this->issue = $issue;
        if (!$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_a591754a8ddcdb" . "da9c80f1db4d911" . "e14"]($_279e1044fce2137914e09a214fbc8fce) && !$_279e1044fce2137914e09a214fbc8fce instanceof HDIssue) {
            throw new ICPluginException($GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_008bf2db97" . "87ce9ce15ca" . "b9e1a2ed37a"]);
        }
        $this->old_issue = $_279e1044fce2137914e09a214fbc8fce;
        $this->add_params = $_e4bf1e70e6d9b11e2cf0fe9ce843e56b;
        $this->data_modifications = [];
        $this->form_modifications = [];
    }
    
    
    
    
    
    
    
    
    
    private final function GetIssueFormDataObj($_caa259ad65bbfa500bfd3c05c9bab914)
    {
        $issue = $_caa259ad65bbfa500bfd3c05c9bab914 ? $this->old_issue : $this->issue;
        if (!$issue instanceof HDIssue) {
            throw new ICPluginException($_caa259ad65bbfa500bfd3c05c9bab914 ? $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_8384a6b1adf682aa6c01ca" . "47ee4afdf7"] : $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_60bf41900e0719" . "0847af73ae3165e" . "29b"]);
        }
        $_207516c2cd51fe5dddab5e58b495c3b6 = $issue->GetFormData();
        if (!$_207516c2cd51fe5dddab5e58b495c3b6) {
            throw new ICPluginException($issue->GetErrMsg());
        }
        return $_207516c2cd51fe5dddab5e58b495c3b6;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    protected final function GetIssueFieldValue($symname, $_caa259ad65bbfa500bfd3c05c9bab914 = false)
    {
        $_207516c2cd51fe5dddab5e58b495c3b6 = $this->GetIssueFormDataObj($_caa259ad65bbfa500bfd3c05c9bab914);
        $_c96f552040dea8086bf8bdd70059542f = $_207516c2cd51fe5dddab5e58b495c3b6->GetValue($symname);
        if ($_c96f552040dea8086bf8bdd70059542f === false && $_207516c2cd51fe5dddab5e58b495c3b6->IsError()) {
            throw new ICPluginException($_207516c2cd51fe5dddab5e58b495c3b6->GetErrMsg());
        }
        return $_c96f552040dea8086bf8bdd70059542f;
    }
    
    
    
    
    
    
    
    
    protected final function GetIssueFieldValueVisible($symname, $_caa259ad65bbfa500bfd3c05c9bab914 = false)
    {
        $_d9dec3fec40d714836246e2dbbaa7deb = $this->GetIssueFieldValue($symname, $_caa259ad65bbfa500bfd3c05c9bab914);
        $_d7b5013009820764c63c00b86012a139 = $this->GetFormFieldItems($symname);
        return $_d7b5013009820764c63c00b86012a139[$_d9dec3fec40d714836246e2dbbaa7deb];
    }
    
    
    
    
    
    
    
    protected final function SetIssueFieldValue($symname, $value)
    {
        $this->data_modifications[$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_29133f4" . "e79c6aad" . "b6d2de35" . "3856bd92" . "2"]][$symname] = $value;
    }
    
    
    
    
    
    
    
    
    
    
    protected final function GetIssueProperty($_ce76a91ef2b7be07d7d04e74d4da9b6a, $_caa259ad65bbfa500bfd3c05c9bab914 = false)
    {
        $issue = $_caa259ad65bbfa500bfd3c05c9bab914 ? $this->old_issue : $this->issue;
        if (!$issue instanceof HDIssue) {
            throw new ICPluginException($_caa259ad65bbfa500bfd3c05c9bab914 ? $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_8384a6b1adf682aa6c01ca" . "47ee4afdf7"] : $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_60bf41900e07190847af73ae3165e29" . "b"]);
        }
        return $issue->GetProperty($_ce76a91ef2b7be07d7d04e74d4da9b6a);
    }
    
    
    
    
    
    
    
    protected final function SetIssueProperty($_ce76a91ef2b7be07d7d04e74d4da9b6a, $value)
    {
        $this->data_modifications[$_ce76a91ef2b7be07d7d04e74d4da9b6a] = $value;
    }
    
    
    
    
    
    
    
    protected final function GetIssueFieldsValues($_caa259ad65bbfa500bfd3c05c9bab914 = false)
    {
        $_207516c2cd51fe5dddab5e58b495c3b6 = $this->GetIssueFormDataObj($_caa259ad65bbfa500bfd3c05c9bab914);
        return $_207516c2cd51fe5dddab5e58b495c3b6->GetFieldsData();
    }
    
    
    
    
    
    
    
    protected final function IsIssueGiven($_caa259ad65bbfa500bfd3c05c9bab914 = false)
    {
        return $_caa259ad65bbfa500bfd3c05c9bab914 ? $this->old_issue instanceof HDIssue : $this->issue instanceof HDIssue;
    }
    
    
    
    
    
    
    
    
    protected final function GetIssueHandler($_caa259ad65bbfa500bfd3c05c9bab914 = false)
    {
        return $this->GetIssueProperty($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_cfec9d680" . "8fd6ffa4e6" . "46528559e9" . "8e8"], $_caa259ad65bbfa500bfd3c05c9bab914);
    }
    
    
    
    
    
    
    protected final function AssignIssue($user_id)
    {
        $this->SetIssueProperty($GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_cfec9d6808fd6ffa4e6465285" . "59e98e8"], $user_id);
    }
    
    
    
    
    
    
    
    protected final function GetIssueStatus($_caa259ad65bbfa500bfd3c05c9bab914 = false)
    {
        return $this->GetIssueProperty($GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["st" . "at" . "us"], $_caa259ad65bbfa500bfd3c05c9bab914);
    }
    
    
    
    
    
    
    protected final function SetIssueStatus($_91dc1dd3b98a0196c76dbe68e619aa89)
    {
        $this->SetIssueProperty($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["sta" . "tus"], $_91dc1dd3b98a0196c76dbe68e619aa89);
    }
    
    
    
    
    
    
    
    protected final function GetNextStatuses()
    {
        $_13d133c615714d50832f54e91fea8fb0 = $this->GetFormField(HD_FIELD_STATUS);
        if (!$_13d133c615714d50832f54e91fea8fb0) {
            return false;
        }
        return $_13d133c615714d50832f54e91fea8fb0->GetValuesArray();
    }
    
    
    
    
    
    
    protected final function SetNextStatuses($_354ade7121deb022b926fb0c68fd259c)
    {
        $this->SetFormFieldItems(HD_FIELD_STATUS, $_354ade7121deb022b926fb0c68fd259c);
    }
    
    
    
    
    
    
    
    
    
    
    
    
    protected final function GetFormField($symname)
    {
        if (!($form = $this->project->GetForm())) {
            throw new ICPluginException($GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_db3b2f9b43b74a94fb9aba" . "dd3195fb4f"]);
        }
        if (!($_13d133c615714d50832f54e91fea8fb0 = $form->GetFieldBySymname($symname))) {
            throw new ICPluginException($GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_052f001b9de630858d858e" . "f71f5be9d5"] . $symname . $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_a67b7cfa233f8972066" . "333ebbf80977c"]);
        }
        return clone $_13d133c615714d50832f54e91fea8fb0;
    }
    
    
    
    
    
    
    
    
    
    protected final function GetFormFieldInfo($symname)
    {
        $_13d133c615714d50832f54e91fea8fb0 = $this->GetFormField($symname);
        return $_13d133c615714d50832f54e91fea8fb0->info;
    }
    
    
    
    
    
    
    
    
    protected final function GetFormFieldItems($symname)
    {
        return $this->GetFormField($symname)->GetValuesArray();
    }
    
    
    
    
    
    
    
    protected final function SetFormFieldItems($_083135d58cba2106d77bbb72da5a4a2d, $_9ef25b4b2abdcae54e1f3f856d2af5dc)
    {
        $this->SetFormFieldProperty($_083135d58cba2106d77bbb72da5a4a2d, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_e258c5dc522b65a0" . "645711c5089a8e9c"], $this->CombineArrayToString($_9ef25b4b2abdcae54e1f3f856d2af5dc));
    }
    
    
    
    
    
    
    
    
    protected final function SetFormFieldProperty($_083135d58cba2106d77bbb72da5a4a2d, $key, $value)
    {
        $this->form_modifications[$_083135d58cba2106d77bbb72da5a4a2d][$key] = $value;
    }
    
    
    
    
    
    
    
    
    
    protected final function SetFormFieldProperties($_083135d58cba2106d77bbb72da5a4a2d, $_809a58dc73011173c031a53c0b40ef0e, $_373004876d083ce7541bfa22a122ec1e = false)
    {
        if ($_373004876d083ce7541bfa22a122ec1e || !$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_7f628626dd1d55c71b1fc0" . "932ffd1d2c"]($this->form_modifications[$_083135d58cba2106d77bbb72da5a4a2d])) {
            $this->form_modifications[$_083135d58cba2106d77bbb72da5a4a2d] = $_809a58dc73011173c031a53c0b40ef0e;
        } else {
            $this->form_modifications[$_083135d58cba2106d77bbb72da5a4a2d] = $_809a58dc73011173c031a53c0b40ef0e + $this->form_modifications[$_083135d58cba2106d77bbb72da5a4a2d];
        }
    }
    
    
    
    
    
    
    
    
    protected final function CombineArrayToString($_fd62bc4eaaf7d58dea9bada3e30443b9)
    {
        $_1f24efd4735b7a11b391147435e7d35d = $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_4d707fab93bebb" . "00bbe69e8159697" . "c90"];
        foreach ($_fd62bc4eaaf7d58dea9bada3e30443b9 as $key => $value) {
            $_1f24efd4735b7a11b391147435e7d35d .= $value . $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_3b5754d4df7891d9" . "29988c5ac777a0be"] . $key . $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_b742a00ae87756f850c77e0d" . "af4e7a3a"];
        }
        return $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_5e9a99dc0dd49b907" . "abf1b35e96965f8"]($_1f24efd4735b7a11b391147435e7d35d);
    }
    
    
    
    
    
    
    public final function GetDataModificationsList()
    {
        return $this->data_modifications;
    }
    
    
    
    
    
    
    public final function GetFormModificationsList()
    {
        return $this->form_modifications;
    }
    public final function ResetDataModificationsList()
    {
        $this->data_modifications = [];
    }
    public final function ResetFormModificationsList()
    {
        $this->form_modifications = [];
    }
}