<?php
namespace Claromentis\Core\Component;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"] = (@$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"] ?: array()) + array("_f61cbfe09f839854b9511" . "7fe13b4a1ba" => base64_decode("c3Ryc" . "G9z"), "_5315a4e0f66f0e19adf523f" . "aaadf691a" => base64_decode("Q29tcG9uZW50IHJl" . "Z2lzdGVyZWQgYXMg" . "Ig=="), "_a5ad20ceac0b4ca276b6" . "44079b7af5c5" => base64_decode("IiBkb2VzIG5vdCByZXR1cm" . "4gYW4gaW5zdGFuY2Ugb2Yg"), "_70979d287fa2c98d21" . "aa07834c259a52" => base64_decode("c3RydG9sb3dl" . "cg=="), "_d706c160e45bf" . "7434fff82a5976" . "f0e19" => base64_decode("YXJyYXlfa" . "2V5cw=="), "_cdbb345f4d4f843abb75a837d26cc" . "cf5" => base64_decode("Tm8gY29tcG9uZW" . "50IGhhcyBiZWVu" . "IHJlZ2lzdGVyZW" . "QgYXMgIg=="), "_aed8da0f19091214b78f80351048" . "517c" => base64_decode("c3R" . "ybG" . "Vu"), "_cfe3120f" . "54395b670" . "652b38c2d" . "0a8e88" => base64_decode("c3Vic3R" . "y"), "_e92ad742fc12ec1dd5c30557fafca3" . "31" => base64_decode("I" . "g" . "=" . "="));
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["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_aed8da0f19091214b78f80" . "351048517c"]($this->name_prefix);
        foreach ($this->container->keys() as $key) {
            if ($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_f61cbfe09f839854b95117fe1" . "3b4a1ba"]($key, $this->name_prefix) !== 0) {
                
                
                continue;
            }
            $this->components[$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_cfe3120f54395b670652b3" . "8c2d0a8e88"]($key, $_dff05f62bb87399254f2155a31e58365)] = 1;
        }
    }
    
    
    
    
    public function GetComponentsKeys()
    {
        $this->FindComponentsKeys();
        return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_d706c160e45bf7434fff82a5976" . "f0e19"]($this->components);
    }
    
    
    
    
    
    
    
    
    
    public function GetComponent($name, $_0075b8e35172a508cf11199cdbf91f66 = false)
    {
        $name = $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_70979d28" . "7fa2c98d2" . "1aa07834c" . "259a52"]($name);
        $_21d5dbcf5399111a9e090014c78472cf = $this->name_prefix . $name;
        if (!isset($this->container[$_21d5dbcf5399111a9e090014c78472cf])) {
            if ($_0075b8e35172a508cf11199cdbf91f66) {
                return new NotInstalledComponent($name);
            } else {
                throw new MissingComponentException($GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_cdbb345f4d4f843abb75a837d26c" . "ccf5"] . $name . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_e92ad742fc12ec1dd5c3" . "0557fafca331"]);
            }
        }
        $_6817ec6d42314534466dd8262d02d837 = $this->container[$_21d5dbcf5399111a9e090014c78472cf];
        if (!$_6817ec6d42314534466dd8262d02d837 instanceof ComponentInterface) {
            throw new MissingComponentException($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_5315a4e0f66f0e19adf523faaadf69" . "1a"] . $name . $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_a5ad20ceac0b4ca276b" . "644079b7af5c5"] . ComponentInterface::class);
        }
        return $_6817ec6d42314534466dd8262d02d837;
    }
}