<?xml version="1.0" encoding="UTF-8" ?>

<config xmlns="http://thelia.net/schema/dic/config"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">


    <services>
        <!-- Parser configuration -->
        <service id="thelia.parser" alias="TheliaSmarty\Template\SmartyParser" public="true"/>
        <service id="Thelia\Core\Template\ParserInterface" alias="TheliaSmarty\Template\SmartyParser"/>

        <service id="Thelia\Core\Template\ParserHelperInterface" alias="TheliaSmarty\Template\SmartyHelper" />
        <service id="thelia.parser.helper" alias="TheliaSmarty\Template\SmartyHelper" />

        <!--  The assets resolver -->
        <service id="Thelia\Core\Template\Assets\AssetResolverInterface" alias="TheliaSmarty\Template\Assets\SmartyAssetsResolver"/>
        <service id="thelia.parser.asset.resolver" alias="TheliaSmarty\Template\Assets\SmartyAssetsResolver"/>

        <!--  Smarty parser plugins-->

        <service id="smarty.plugin.assets" alias="TheliaSmarty\Template\Plugins\Assets"/>

        <service id="smarty.plugin.format" alias="TheliaSmarty\Template\Plugins\Format"/>

        <service id="smarty.plugin.thelialoop" alias="TheliaSmarty\Template\Plugins\TheliaLoop" public="true"/>

        <service id="smarty.plugin.cartpostage" alias="TheliaSmarty\Template\Plugins\CartPostage"/>

        <service id="smarty.plugin.type" alias="TheliaSmarty\Template\Plugins\Type"/>

        <service id="smarty.plugin.render" alias="TheliaSmarty\Template\Plugins\Render"/>

        <service id="TheliaSmarty\Template\Plugins\Form">
            <tag name="thelia.parser.register_plugin"/>

            <argument type="service" id="thelia.form_factory" />
            <argument type="service" id="thelia.parser.context"/>
            <argument type="service" id="thelia.parser"/>
            <argument type="service" id="thelia.translator" />

            <call method="setFormDefinition">
                <argument>%Thelia.parser.forms%</argument>
            </call>
        </service>
        <service id="smart.plugin.form" alias="TheliaSmarty\Template\Plugins\Form"/>

        <service id="smarty.plugin.translation" alias="TheliaSmarty\Template\Plugins\Translation"/>

        <service id="smarty.plugin.module" alias="TheliaSmarty\Template\Plugins\Module"/>

        <service id="smarty.url.module" alias="TheliaSmarty\Template\Plugins\UrlGenerator"/>

        <service id="smarty.plugin.security" alias="TheliaSmarty\Template\Plugins\Security"/>

        <service id="smarty.plugin.dataAccess" alias="TheliaSmarty\Template\Plugins\DataAccessFunctions"/>

        <service id="smarty.plugin.adminUtilities" alias="TheliaSmarty\Template\Plugins\AdminUtilities"/>

        <service id="smarty.plugin.flashMessage" alias="TheliaSmarty\Template\Plugins\FlashMessage"/>

        <service id="smarty.plugin.hook" alias="TheliaSmarty\Template\Plugins\Hook"/>

        <service id="smarty.plugin.cache" alias="TheliaSmarty\Template\Plugins\Cache"/>

        <service id="TheliaSmarty\Template\Plugins\VarDumper">
            <tag name="thelia.parser.register_plugin"/>
            <argument >%kernel.debug%</argument>
        </service>

        <service id="smarty.plugin.var_dumper" alias="TheliaSmarty\Template\Plugins\VarDumper"/>
    </services>

</config>
