<?php
namespace Claromentis\Core\License;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"] = (@$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"] ?: array()) + array("_9c20a8bd3" . "e616676336" . "560dcefc49" . "4d7" => base64_decode("SW52YWxpZCBBcmd1bWVudCBwYXNzZWQgdG8gQ29udmVydExpY2Vuc2VTZXR0aW5nLCBsaWNlbnNlX2tleSBtdXN0IGJlIGEgc3RyaW5" . "n"), "_5fe58e40acf285a7aa9fe59fea511" . "c35" => base64_decode("XzM2MmU2ZmE5ZjE3OT" . "A3NzA1OTU4ZTZlZTMw" . "YzBmZGQ4"), "_5e30c47" . "17ced36c" . "ff9e93e1" . "9a5c576c" . "c" => base64_decode("aXNfc3Rya" . "W5n"), "_69e1f4ed84e29bc8d7d91c54b6e5cb2" . "2" => base64_decode("X2I3OWU3ZGNjMW" . "NkNWI3MTZjNTY4" . "ZWEzNDdiYzRkMD" . "Nh"), "_b44fa125e86e406bdc991c938c1068" . "14" => base64_decode("SW52YWxpZCBBcmd1bWVudCBwYXNzZWQgdG8gQ29udmVydExpY2Vuc2VTZXR" . "0aW5nLCBjb25maWdfbmFtZSBtdXN0IGJlIGEgc3RyaW5n"));
use Claromentis\Core\Config\WritableConfig;











class LicenseToConfig
{
    private $config;
    
    
    
    
    
    
    public function __construct(WritableConfig $config)
    {
        $this->SetConfig($config);
    }
    
    
    
    
    
    
    
    
    public function ConvertLicenseSetting($_763dbeca8f2ee71108ce44281ce43d97, $_31a83eb535865754cf8e8cafda930c1c = null, $_c78e2cab04076935f26a6364a06dc390 = null)
    {
        
        
        if (!isset($_31a83eb535865754cf8e8cafda930c1c)) {
            $_31a83eb535865754cf8e8cafda930c1c = $_763dbeca8f2ee71108ce44281ce43d97;
        }
        if (!$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_5e30c4717ced36cff9e93e19a5" . "c576cc"]($_763dbeca8f2ee71108ce44281ce43d97)) {
            throw new \InvalidArgumentException($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_9c20a8b" . "d3e61667" . "6336560d" . "cefc494d" . "7"]);
        }
        if (!$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_5e30c4717ced36cff9e93e19a5c576" . "cc"]($_31a83eb535865754cf8e8cafda930c1c)) {
            throw new \InvalidArgumentException($GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_b44fa125e" . "86e406bdc9" . "91c938c106" . "814"]);
        }
        
        
        if ($this->config->Get($_31a83eb535865754cf8e8cafda930c1c) !== null) {
            return true;
        }
        $_e8c514c501c0788c7df8b5682e2a8dfc = $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_5fe58e40acf285a7aa9fe59fea511" . "c35"]();
        $_28d2607075b352d52b45daf2a256f773 = $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_69e1f4ed84e29b" . "c8d7d91c54b6e5c" . "b22"]($_e8c514c501c0788c7df8b5682e2a8dfc);
        if (isset($_28d2607075b352d52b45daf2a256f773[$_763dbeca8f2ee71108ce44281ce43d97])) {
            $_5a84efe1559a69d20ecee20cfbafd49e = $_28d2607075b352d52b45daf2a256f773[$_763dbeca8f2ee71108ce44281ce43d97];
        } elseif (isset($_c78e2cab04076935f26a6364a06dc390)) {
            $_5a84efe1559a69d20ecee20cfbafd49e = $_c78e2cab04076935f26a6364a06dc390;
        }
        if (!isset($_5a84efe1559a69d20ecee20cfbafd49e)) {
            return false;
        }
        $this->config->Set($_31a83eb535865754cf8e8cafda930c1c, $_5a84efe1559a69d20ecee20cfbafd49e);
        $this->config->Save();
        return true;
    }
    
    
    
    
    public function GetConfig()
    {
        return $this->config;
    }
    
    
    
    
    private function SetConfig(WritableConfig $config)
    {
        $this->config = $config;
    }
}