<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" method="upgrade" group="system">
    <name>System - rKonik GTM</name>
    <author>rKonik Rafał Kobyliński</author>
    <creationDate>June 2022</creationDate>
    <copyright>Copyright (C) 2022 rKonik. All rights reserved.</copyright>
    <license>GNU General Public License version 2 or later; see LICENSE</license>
    <authorEmail>extensions@rkonik.com</authorEmail>
    <authorUrl>rkonik.com</authorUrl>
    <version>1.0.5</version>
    <description>PLG_RKONIK_GTM_XML_DESCRIPTION</description>

    <scriptfile>script.php</scriptfile>
    <files>
        <filename plugin="rkonikgtm">rkonikgtm.php</filename>
        <filename>index.html</filename>
    </files>

    <languages folder="language">
        <language tag="en-GB">en-GB/en-GB.plg_system_rkonikgtm.ini</language>
        <language tag="en-GB">en-GB/en-GB.plg_system_rkonikgtm.sys.ini</language>
        <language tag="pl-PL">pl-PL/pl-PL.plg_system_rkonikgtm.ini</language>
        <language tag="pl-PL">pl-PL/pl-PL.plg_system_rkonikgtm.sys.ini</language>
    </languages>

    <config>
        <fields name="params">
            <fieldset name="basic">
                <field name="idGTM"
                       type="text"
                       label="PLG_RKONIK_GTM_IDGTM_LABEL"
                       description="PLG_RKONIK_GTM_IDGTM_DESC"
               />

                <field name="renameDataLayer"
                       type="radio"
                       label="PLG_RKONIK_GTM_RENAME_DATALAYER_LABEL"
                       description="PLG_RKONIK_GTM_RENAME_DATALAYER_DESC"
                       class="btn-group btn-group-yesno"
                       default="0"
                >
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>

                <field name="dataLayerName"
                       type="text"
                       default="dataLayer"
                       label="PLG_RKONIK_GTM_DATALAYERNAME_LABEL"
                       description=""
                       size="10"
                       showon="renameDataLayer:1"
                />
            </fieldset>
        </fields>
    </config>

    <changelogurl>https://raw.githubusercontent.com/rkonikpl/rkonik-GTM/main/changelog.xml</changelogurl>

    <updateservers>
        <server type="extension" priority="1" name="rKonik GTM">https://raw.githubusercontent.com/rkonikpl/rkonik-GTM/main/update-rkonik-gtm.xml</server>
    </updateservers>
</extension>