<?php
namespace Claromentis\Core\Assets\Storage;

$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"] ?: array()) + array("_418406d16c" . "6e7afe5a5c3" . "5008623ca3a" => base64_decode("Y29weQ" . "=="), "_3ce655ae4a14421967cc023a6e907" . "ed5" => base64_decode("aXNfZ" . "mlsZQ" . "=="), "_6bf19ac66af25b2e2" . "dab6bd4e14c324d" => base64_decode("aXNf" . "ZGly"), "_f103591560e" . "bc2f5d5b8a98" . "97d10fee9" => base64_decode("ZmlsZW10aW" . "1l"), "_f2c48e9313746f8d37d4c876be7851e" . "a" => base64_decode("Y2h" . "tb2" . "Q="), "_8a36a84baeffc0085672f9" . "bf9c064f67" => base64_decode("ZmlsZV9wdXRfY29udGVudHM" . "="), "_ca831b25ce7fffea9cf441" . "f762c7d154" => base64_decode("ZmlsZV9leGlz" . "dHM="), "_8a541226dcdfe6bff96c3e7f19" . "9904f1" => base64_decode("dG91Y" . "2g="), "_c61584fc3580dd88e33b6" . "fb5cfbc0325" => base64_decode("bWtkaX" . "I="), "_87daa84e346f6420a3f3426" . "e05d16a7b" => base64_decode("Lw=" . "="));
use Claromentis\Core\Filesystem\Exception\FileNotFoundException;




class NativeStorage implements StorageInterface
{
    
    
    
    
    
    
    protected string $cache_path;
    
    
    
    
    
    
    protected string $cache_url;
    
    
    
    
    
    
    protected ?string $public_cache_path;
    
    
    
    
    
    
    
    
    public function __construct(string $_97dcb980872ef5ddd551c02d81b4e8ae, string $_92d8dfbd2f5d72bf3831907d3771001d, ?string $_d03bcea98d5dd93ba7561c9865612cb9 = null)
    {
        $this->cache_path = $_97dcb980872ef5ddd551c02d81b4e8ae;
        $this->cache_url = $_92d8dfbd2f5d72bf3831907d3771001d;
        $this->public_cache_path = $_d03bcea98d5dd93ba7561c9865612cb9;
    }
    
    
    
    
    
    
    
    
    
    
    
    public function GetCacheFileLocalPath(string $filename) : string
    {
        if (!$this->CacheFileExists($filename)) {
            throw new FileNotFoundException();
        }
        $_c52bbd17a1963ef1954f5ada98102e06 = $this->GetCacheFilePath($filename);
        $_911c0b062de431dc2ab525c23c80a114 = $this->GetPublicCacheFilePath($filename);
        if ($this->public_cache_path && !$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_3ce655ae4a14421967" . "cc023a6e907ed5"]($_911c0b062de431dc2ab525c23c80a114)) {
            $this->CreatePublicCacheDirectory();
            $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_418406d16c6e7afe5a5c350" . "08623ca3a"]($_c52bbd17a1963ef1954f5ada98102e06, $_911c0b062de431dc2ab525c23c80a114);
        }
        return $_c52bbd17a1963ef1954f5ada98102e06;
    }
    public function GetCacheFileUrl(string $_93469c9375390f862eebb779f8b740e4) : string
    {
        return $this->cache_url . $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_87daa84e346f6420a3" . "f3426e05d16a7b"] . $_93469c9375390f862eebb779f8b740e4;
    }
    public function CacheFileExists(string $_93469c9375390f862eebb779f8b740e4) : bool
    {
        return $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_ca831b25ce7fffea9cf441" . "f762c7d154"]($this->GetCacheFilePath($_93469c9375390f862eebb779f8b740e4));
    }
    public function CreateCacheDirectory()
    {
        if (!$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_6bf19ac66af25b2e2dab6bd4e14c3" . "24d"]($this->cache_path)) {
            $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_c61584fc3580dd88e33b6fb5cfb" . "c0325"]($this->cache_path, 0775, true);
            $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_f2c48e9313746f8d37d4c876b" . "e7851ea"]($this->cache_path, 0775);
        }
        $this->CreatePublicCacheDirectory();
    }
    public function StoreCacheFile(string $_93469c9375390f862eebb779f8b740e4, string $_d34599daeb8cca374d3adb38b245839c)
    {
        $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_8a36a84baeffc0085672f9" . "bf9c064f67"]($this->GetCacheFilePath($_93469c9375390f862eebb779f8b740e4), $_d34599daeb8cca374d3adb38b245839c);
        if (isset($this->public_cache_path)) {
            $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_8a36a84baeffc008567" . "2f9bf9c064f67"]($this->GetPublicCacheFilePath($_93469c9375390f862eebb779f8b740e4), $_d34599daeb8cca374d3adb38b245839c);
        }
    }
    public function GetCacheFileModifiedTime(string $_93469c9375390f862eebb779f8b740e4)
    {
        return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_f103591560eb" . "c2f5d5b8a9897" . "d10fee9"]($this->GetCacheFilePath($_93469c9375390f862eebb779f8b740e4));
    }
    public function TouchCacheFile(string $_93469c9375390f862eebb779f8b740e4)
    {
        $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_8a541226dcdfe" . "6bff96c3e7f199" . "904f1"]($this->GetCacheFilePath($_93469c9375390f862eebb779f8b740e4));
    }
    
    
    
    
    
    
    
    protected function GetCacheFilePath(string $_93469c9375390f862eebb779f8b740e4) : string
    {
        return $this->cache_path . $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_87daa84e346f6420a3f3426e" . "05d16a7b"] . $_93469c9375390f862eebb779f8b740e4;
    }
    
    
    
    
    
    
    
    protected function GetPublicCacheFilePath(string $_93469c9375390f862eebb779f8b740e4) : string
    {
        return $this->public_cache_path . $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_87daa84e346f6420a3f" . "3426e05d16a7b"] . $_93469c9375390f862eebb779f8b740e4;
    }
    protected function CreatePublicCacheDirectory()
    {
        if (isset($this->public_cache_path) && !$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_6bf19ac66af25" . "b2e2dab6bd4e14" . "c324d"]($this->public_cache_path)) {
            $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_c61584fc3580dd88e33b6fb5cfbc0" . "325"]($this->public_cache_path, 0775, true);
        }
    }
}