<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="mobile_detect.mobile_detector.class"/>
        <parameter key="mobile_detect.device_view.class"/>
        <parameter key="mobile_detect.cookie_key"/>
        <parameter key="mobile_detect.switch_param"/>
        <parameter key="mobile_detect.cookie_expire_datetime_modifier"/>
    </parameters>

    <services>

        <service id="mobile_detect.mobile_detector.default" class="%mobile_detect.mobile_detector.class%"/>

        <service id="mobile_detect.device_view" class="%mobile_detect.device_view.class%">
            <argument type="service" id="request_stack" on-invalid="null"/>
            <call method="setCookieKey">
                <argument>%mobile_detect.cookie_key%</argument>
            </call>
            <call method="setCookiePath">
                <argument>%mobile_detect.cookie_path%</argument>
            </call>
            <call method="setCookieDomain">
                <argument>%mobile_detect.cookie_domain%</argument>
            </call>
            <call method="setCookieSecure">
                <argument>%mobile_detect.cookie_secure%</argument>
            </call>
            <call method="setCookieHttpOnly">
                <argument>%mobile_detect.cookie_httponly%</argument>
            </call>
            <call method="setSwitchParam">
                <argument>%mobile_detect.switch_param%</argument>
            </call>
            <call method="setCookieExpireDatetimeModifier">
                <argument>%mobile_detect.cookie_expire_datetime_modifier%</argument>
            </call>
            <call method="setRedirectConfig">
                <argument>%mobile_detect.redirect%</argument>
            </call>
        </service>

    </services>
</container>
