<?php
namespace Claromentis\Core\Component;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"] ?: array()) + array("_e92ad742fc12ec1dd5" . "c30557fafca331" => base64_decode("Ig=" . "="), "_5315a4e0f6" . "6f0e19adf52" . "3faaadf691a" => base64_decode("Q29tcG9uZW50IH" . "JlZ2lzdGVyZWQg" . "YXMgIg=="), "_cfe3120f54" . "395b670652b" . "38c2d0a8e88" => base64_decode("c3V" . "ic3" . "Ry"), "_a5ad20ceac0b4c" . "a276b644079b7af" . "5c5" => base64_decode("IiBkb2VzIG5vdCByZXR1cm4gYW4gaW5zd" . "GFuY2Ugb2Yg"), "_70979d287fa2c98d21aa0" . "7834c259a52" => base64_decode("c3RydG9sb3d" . "lcg=="), "_aed8da0f19091214b78f80" . "351048517c" => base64_decode("c3Ry" . "bGVu"), "_cdbb345f4d4f843" . "abb75a837d26cccf" . "5" => base64_decode("Tm8gY29tcG9uZW50IGhhcyBiZWVuIHJlZ2lzdG" . "VyZWQgYXMgIg=="), "_d706c160e45bf7434fff8" . "2a5976f0e19" => base64_decode("YXJyYXlfa2V5c" . "w=="), "_f61cbfe09f839854b" . "95117fe13b4a1ba" => base64_decode("c3RycG" . "9z"));
use Claromentis\Core\Component\Exception\MissingComponentException;
use Pimple\Container;
class ComponentList
{
    protected $components;
    protected $container;
    protected $name_prefix;
    public function __construct(Container $_5e4594441b0e531bfd6f0011e0327611, $_b33b852882e8491a1cddaabb020b3daf)
    {
        $this->container = $_5e4594441b0e531bfd6f0011e0327611;
        $this->name_prefix = $_b33b852882e8491a1cddaabb020b3daf;
        $this->components = null;
    }
    
    
    
    
    protected function FindComponentsKeys()
    {
        if ($this->components !== null) {
            return;
        }
        $this->components = [];
        $_dff05f62bb87399254f2155a31e58365 = $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_aed8da0f19091" . "214b78f8035104" . "8517c"]($this->name_prefix);
        foreach ($this->container->keys() as $key) {
            if ($GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_f61cbfe09f8398" . "54b95117fe13b4a" . "1ba"]($key, $this->name_prefix) !== 0) {
                
                
                continue;
            }
            $this->components[$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_cfe3120f54395b670652b" . "38c2d0a8e88"]($key, $_dff05f62bb87399254f2155a31e58365)] = 1;
        }
    }
    
    
    
    
    public function GetComponentsKeys()
    {
        $this->FindComponentsKeys();
        return $GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_d706c160e45bf7434fff8" . "2a5976f0e19"]($this->components);
    }
    
    
    
    
    
    
    
    
    
    public function GetComponent($name, $_0075b8e35172a508cf11199cdbf91f66 = false)
    {
        $name = $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_70979d287fa2c98d21aa078" . "34c259a52"]($name);
        $_21d5dbcf5399111a9e090014c78472cf = $this->name_prefix . $name;
        if (!isset($this->container[$_21d5dbcf5399111a9e090014c78472cf])) {
            if ($_0075b8e35172a508cf11199cdbf91f66) {
                return new NotInstalledComponent($name);
            } else {
                throw new MissingComponentException($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_cdbb345f4d4f843abb75a837d26cccf" . "5"] . $name . $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_e92ad742fc12ec1dd5c3" . "0557fafca331"]);
            }
        }
        $_6817ec6d42314534466dd8262d02d837 = $this->container[$_21d5dbcf5399111a9e090014c78472cf];
        if (!$_6817ec6d42314534466dd8262d02d837 instanceof ComponentInterface) {
            throw new MissingComponentException($GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_5315a4e0f66f0e19" . "adf523faaadf691a"] . $name . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_a5ad20ceac0b4ca" . "276b644079b7af5c" . "5"] . ComponentInterface::class);
        }
        return $_6817ec6d42314534466dd8262d02d837;
    }
}