<?php
namespace Claromentis\Core\Component;

$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"] ?: array()) + array("_5e30c4717ced36cff9e93e19a5c5" . "76cc" => base64_decode("aXNf" . "c3Ry" . "aW5n"), "_f44838f0995459c3ceead25" . "cec596c1a" => base64_decode("Y29tcG9uZW" . "50LitjbGFz" . "cw=="), "_9924fd1" . "22ca23f4" . "4e99a49a" . "87492bcb" . "1" => base64_decode("Y29tcG9uZW50X2JvZHlfY29udGVudC5ib2R5X" . "2h0bWw="), "_2d63a7ad1291fcb5f580c5807b13b" . "5d8" => base64_decode("Y29tcG9uZW50X2hlYWRlcl9jb" . "250ZW50LmJvZHlfaHRtbA=="), "_eb8a8646a558" . "c9498d806fcd9" . "1b2bfeb" => base64_decode("Y29tcG9uZW50X2hlYWRlci52aXNpY" . "mxl"), "_4d707fab93bebb00bbe69e" . "8159697c90" => base64_decode(""), "_251fb38d039d37357a8c2f2d1ef" . "a9622" => base64_decode("Y29tcG9uZW50X2JvZHlfY29udGVudC5i" . "b2R5"), "_dafa1820f621a8fa2ee388655f6" . "900ca" => base64_decode("Y29tbW9uL2NvbXBvbmVudC9wYWdlc" . "19jb21wb25lbnQuaHRtbA=="));
use Claromentis\Core\Application;
use Claromentis\Core\Component\Exception\ComponentException;




trait PagesTemplaterComponent
{
    use TemplaterTrait;
    protected function ShowComponent($id_string, ComponentInterface $component, OptionsInterface $options, Application $app)
    {
        try {
            $header = $component->ShowHeader($id_string, $options, $app);
            if ($GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_5e30c4717ced36cff9" . "e93e19a5c576cc"]($header) && $header != $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_4d707fa" . "b93bebb0" . "0bbe69e8" . "159697c9" . "0"]) {
                $args[$GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_2d63a7ad12" . "91fcb5f580c" . "5807b13b5d8"]] = $header;
            } else {
                $args[$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_eb8a8646a558c9498d806f" . "cd91b2bfeb"]] = 0;
            }
            $body = (string) $component->ShowBody($id_string, $options, $app);
            $args[$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_9924fd122ca23f44e99a49" . "a87492bcb1"]] = $body;
        } catch (ComponentException $e) {
            $args[$GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_eb8a8646a558c9498d806fcd91" . "b2bfeb"]] = 0;
            $args[$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_251fb38d039d37357a8c2f2d1efa9" . "622"]] = $e->getMessage();
        }
        $args[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_f44838f0995459c3ceead25cec59" . "6c1a"]] = $component->GetCssClass();
        $template = $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_dafa1820f621a8fa2ee388655f6" . "900ca"];
        return $this->CallTemplater($template, $args);
    }
    
    
    
    
    
    
    
    protected function AttributesToOptions(ComponentInterface $component, array $attributes)
    {
        $options_info = $component->GetOptions();
        return ValidatingOptions::CreateFromSerialized($options_info, $attributes);
    }
}