<?xml version="1.0" encoding="utf-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware5/shopware/5.3/engine/Shopware/Components/Plugin/schema/config.xsd">
    <elements>

        <element type="button">
            <name>fishn_enable_statutory_guarantee_button</name>
            <label lang="de">gesetzliche Gewährleistung für alle Produkte aktivieren</label>
            <label lang="en">Enable Statutory Guarantee for all products</label>
            <options>
                <handler>
                    <![CDATA[
                        function(btn) {
                            var baseUrl = window.location.origin + window.location.pathname.replace(/\/[^\/]*$/, '');
                            Ext.Ajax.request({
                                url: baseUrl + '/FishnGuaranteeConfig/enableStatutoryGuarantee',
                                method: 'POST',
                                success: function (response) {
                                    btn.setDisabled(false);
                                    var result = Ext.JSON.decode(response.responseText);
                                    var text = result.message || 'Statutory guarantee enabled for all products.';

                                    Shopware.Notification.createStickyGrowlMessage({
                                        text: text,
                                        width: 440
                                    });
                                },
                                failure: function (response) {
                                    btn.setDisabled(false);
                                    Shopware.Notification.createStickyGrowlMessage({
                                        title: 'Error',
                                        text: 'Could not enable statutory guarantee. Please try again.',
                                        width: 440
                                    });
                                }
                            });
                        }
                    ]]>
                </handler>
            </options>
        </element>

        <element type="button">
            <name>fishn_enable_commercial_warranty_button</name>
            <label lang="de">Kommerzielle Garantie für alle Produkte aktivieren</label>
            <label lang="en">Enable Commercial Warranty for all products</label>
            <options>
                <handler>
                    <![CDATA[
                        function(btn) {
                            var baseUrl = window.location.origin + window.location.pathname.replace(/\/[^\/]*$/, '');
                            Ext.Ajax.request({
                                url: baseUrl + '/FishnGuaranteeConfig/enableCommercialWarranty',
                                method: 'POST',
                                success: function (response) {
                                    btn.setDisabled(false);
                                    var result = Ext.JSON.decode(response.responseText);
                                    var text = result.message || 'Commercial warranty enabled for all products.';

                                    Shopware.Notification.createStickyGrowlMessage({
                                        text: text,
                                        width: 440
                                    });
                                },
                                failure: function (response) {
                                    btn.setDisabled(false);
                                    Shopware.Notification.createStickyGrowlMessage({
                                        title: 'Error',
                                        text: 'Could not enable commercial warranty. Please try again.',
                                        width: 440
                                    });
                                }
                            });
                        }
                    ]]>
                </handler>
            </options>
        </element>

        <element type="button">
            <name>fishn_disable_all_guarantees_button</name>
            <label lang="de">Deaktivieren Sie die kommerzielle Herstellergarantie für alle Produkte</label>
            <label lang="en">Disable Manufacturer's Commercial Warranty for all products</label>
            <options>
                <handler>
                    <![CDATA[
                        function(btn) {
                            var baseUrl = window.location.origin + window.location.pathname.replace(/\/[^\/]*$/, '');
                            Ext.Ajax.request({
                                url: baseUrl + '/FishnGuaranteeConfig/disableAllGuarantees',
                                method: 'POST',
                                success: function (response) {
                                    btn.setDisabled(false);
                                    var result = Ext.JSON.decode(response.responseText);
                                    var text = result.message || 'All guarantees disabled for all products.';

                                    Shopware.Notification.createStickyGrowlMessage({
                                        text: text,
                                        width: 440
                                    });
                                },
                                failure: function (response) {
                                    btn.setDisabled(false);
                                    Shopware.Notification.createStickyGrowlMessage({
                                        title: 'Error',
                                        text: 'Could not disable guarantees. Please try again.',
                                        width: 440
                                    });
                                }
                            });
                        }
                    ]]>
                </handler>
            </options>
        </element>

        <element type="boolean" scope="shop">
            <name>fishn_legal_guarantee_active</name>
            <label lang="de">Plugin für diesen Shop/Verkaufskanal aktivieren</label>
            <label lang="en">Enable plugin for this shop/sales channel</label>
            <value>1</value>
            <description lang="de">Deaktivieren Sie diese Option für Shops/Verkaufskanäle, auf denen die EU-Gewährleistungskennzeichnung nicht erforderlich ist (z. B. B2B-Shops).</description>
            <description lang="en">Disable this option for shops/sales channels where the EU warranty labeling is not required (e.g. B2B shops).</description>
        </element>

        <element type="boolean">
            <name>fishn_warranty_statutory_guarantee_enabled</name>
            <label lang="de">Bei ERP-Import automatisch die gesetzliche Gewährleistung aktivieren</label>
            <label lang="en">Automatically activate statutory guarantee of conformity on ERP import</label>
            <value>false</value>
            <description lang="de">Wenn aktiviert, wird bei jedem ERP-Import die gesetzliche Gewährleistung für alle Produkte automatisch gesetzt.</description>
            <description lang="en">When enabled, the statutory guarantee of conformity will be automatically set for all products on every ERP import.</description>
        </element>

        <element type="boolean">
            <name>fishn_warranty_commercial_warranty_enabled</name>
            <label lang="de">Bei ERP-Import automatisch die kommerzielle Herstellergarantie aktivieren</label>
            <label lang="en">Automatically activate commercial manufacturer's warranty on ERP import</label>
            <value>false</value>
            <description lang="de">Wenn aktiviert, wird bei jedem ERP-Import die kommerzielle Herstellergarantie für alle Produkte automatisch gesetzt.</description>
            <description lang="en">When enabled, the commercial manufacturer's warranty will be automatically set for all products on every ERP import.</description>
        </element>

        <element type="select" scope="shop">
            <name>fishn_statutory_display_mode_listing</name>
            <label lang="de">Gesetzliche Gewährleistung – Produktlisting</label>
            <label lang="en">Legal guarantee – Product listing</label>
            <value>preview</value>
            <description lang="de">Legen Sie fest, wie das Label der gesetzlichen Gewährleistung im Produktlisting angezeigt wird. Die kommerzielle Herstellergarantie bleibt unverändert.</description>
            <description lang="en">Choose how the statutory guarantee label is displayed in the product listing. The commercial manufacturer's warranty remains unchanged.</description>
            <store>
                <option>
                    <value>off</value>
                    <label lang="de">Nicht anzeigen</label>
                    <label lang="en">Don't show</label>
                </option>
                <option>
                    <value>preview</value>
                    <label lang="de">Kleines Bild anzeigen</label>
                    <label lang="en">Show small image</label>
                </option>
                <option>
                    <value>full</value>
                    <label lang="de">Großes Bild anzeigen</label>
                    <label lang="en">Show large image</label>
                </option>
            </store>
        </element>

        <element type="select" scope="shop">
            <name>fishn_statutory_display_mode_detail</name>
            <label lang="de">Gesetzliche Gewährleistung – Produktinformationen</label>
            <label lang="en">Legal guarantee – Product information</label>
            <value>preview</value>
            <description lang="de">Legen Sie fest, wie das Label der gesetzlichen Gewährleistung auf der Produktdetailseite angezeigt wird. Die kommerzielle Herstellergarantie bleibt unverändert.</description>
            <description lang="en">Choose how the statutory guarantee label is displayed on the product detail page. The commercial manufacturer's warranty remains unchanged.</description>
            <store>
                <option>
                    <value>off</value>
                    <label lang="de">Nicht anzeigen</label>
                    <label lang="en">Don't show</label>
                </option>
                <option>
                    <value>preview</value>
                    <label lang="de">Kleines Bild anzeigen</label>
                    <label lang="en">Show small image</label>
                </option>
                <option>
                    <value>full</value>
                    <label lang="de">Großes Bild anzeigen</label>
                    <label lang="en">Show large image</label>
                </option>
            </store>
        </element>

        <element type="select" scope="shop">
            <name>fishn_statutory_display_mode_cart</name>
            <label lang="de">Gesetzliche Gewährleistung – Warenkorb</label>
            <label lang="en">Legal guarantee – Cart</label>
            <value>preview</value>
            <description lang="de">Legen Sie fest, wie das Label der gesetzlichen Gewährleistung im Warenkorb angezeigt wird. Die kommerzielle Herstellergarantie bleibt unverändert.</description>
            <description lang="en">Choose how the statutory guarantee label is displayed in the cart. The commercial manufacturer's warranty remains unchanged.</description>
            <store>
                <option>
                    <value>off</value>
                    <label lang="de">Nicht anzeigen</label>
                    <label lang="en">Don't show</label>
                </option>
                <option>
                    <value>preview</value>
                    <label lang="de">Kleines Bild anzeigen</label>
                    <label lang="en">Show small image</label>
                </option>
                <option>
                    <value>full</value>
                    <label lang="de">Großes Bild anzeigen</label>
                    <label lang="en">Show large image</label>
                </option>
            </store>
        </element>

        <element type="boolean" scope="shop">
            <name>fishn_attach_statutory_label_to_order_mail</name>
            <label lang="de">An Bestellbestätigungsmail anhängen</label>
            <label lang="en">Attach to order confirmation mail</label>
            <value>false</value>
            <description lang="de">Wenn die Bestellbestätigungsmail mindestens ein Produkt mit gesetzlicher Gewährleistung enthält, fügen wir ein Label als Anhang an. Bei mehreren betroffenen Produkten bleibt es trotzdem bei nur einem Anhang.</description>
            <description lang="en">If order mail contains at least one product with statutory warranty, a label will be attached to the order email. If more products will be affected, there will still be only one attachment.</description>
        </element>

        <element type="select" scope="shop">
            <name>fishn_statutory_display_mode_checkout</name>
            <label lang="de">Gesetzliche Gewährleistung – Kaufabschluss</label>
            <label lang="en">Legal guarantee – Checkout confirmation</label>
            <value>preview</value>
            <description lang="de">Legen Sie fest, wie das Label der gesetzlichen Gewährleistung auf der letzten Bestellseite (mit dem Button "Zahlungspflichtig bestellen") angezeigt wird. Die kommerzielle Herstellergarantie bleibt unverändert.</description>
            <description lang="en">Choose how the statutory guarantee label is displayed on the final checkout page (with the "Order now" button). The commercial manufacturer's warranty remains unchanged.</description>
            <store>
                <option>
                    <value>off</value>
                    <label lang="de">Nicht anzeigen</label>
                    <label lang="en">Don't show</label>
                </option>
                <option>
                    <value>preview</value>
                    <label lang="de">Kleines Bild anzeigen</label>
                    <label lang="en">Show small image</label>
                </option>
                <option>
                    <value>full</value>
                    <label lang="de">Großes Bild anzeigen</label>
                    <label lang="en">Show large image</label>
                </option>
            </store>
        </element>

        <element type="number" scope="shop">
            <name>fishn_statutory_checkout_full_width</name>
            <label lang="de">Maximale Breite des großen Labels im Kaufabschluss (px)</label>
            <label lang="en">Maximum width of the large label on the checkout confirmation page (px)</label>
            <value>800</value>
            <description lang="de">Nur relevant, wenn oben "Großes Bild anzeigen" gewählt ist. Legt die maximale Breite des Labels in Pixeln fest.</description>
            <description lang="en">Only relevant when "Show large image" is selected above. Sets the maximum width of the label in pixels.</description>
        </element>

        <element type="select" scope="shop">
            <name>fishn_model_identifier_type</name>
            <label lang="de">Modellkennung auswählen</label>
            <label lang="en">Select model identifier</label>
            <value>article_number</value>
            <description lang="de">Wählen Sie aus, welche Kennung als Modellidentifikator verwendet werden soll.</description>
            <description lang="en">Select which identifier should be used as the model identifier.</description>
            <store>
                <option>
                    <value>article_number</value>
                    <label lang="de">Artikelnummer</label>
                    <label lang="en">Article number</label>
                </option>
                <option>
                    <value>ean</value>
                    <label lang="de">EAN</label>
                    <label lang="en">EAN</label>
                </option>
                <option>
                    <value>manufacturer_number</value>
                    <label lang="de">Herstellernummer</label>
                    <label lang="en">Manufacturer number</label>
                </option>
            </store>
        </element>

        <element type="select" scope="shop">
            <name>fishn_guarantee_default_language</name>
            <label lang="de">Standardsprache für das Gewährleistungs-Label</label>
            <label lang="en">Default language for the guarantee label</label>
            <value>de_DE</value>
            <description lang="de">Wird verwendet, wenn die Sprache des Shops nicht ermittelt werden kann (z. B. in bestimmten Widget-/Ajax-Ansichten). Ohne diese Einstellung würde in solchen Fällen Englisch angezeigt.</description>
            <description lang="en">Used whenever the shop's language cannot be determined (e.g. in certain widget/ajax views). Without this setting, English would be shown in those cases.</description>
            <store>
                <option>
                    <value>bg_BG</value>
                    <label lang="de">Bulgarisch</label>
                    <label lang="en">Bulgarian</label>
                </option>
                <option>
                    <value>hr_HR</value>
                    <label lang="de">Kroatisch</label>
                    <label lang="en">Croatian</label>
                </option>
                <option>
                    <value>cs_CZ</value>
                    <label lang="de">Tschechisch</label>
                    <label lang="en">Czech</label>
                </option>
                <option>
                    <value>da_DK</value>
                    <label lang="de">Dänisch</label>
                    <label lang="en">Danish</label>
                </option>
                <option>
                    <value>nl_NL</value>
                    <label lang="de">Niederländisch</label>
                    <label lang="en">Dutch</label>
                </option>
                <option>
                    <value>en_GB</value>
                    <label lang="de">Englisch</label>
                    <label lang="en">English</label>
                </option>
                <option>
                    <value>et_EE</value>
                    <label lang="de">Estnisch</label>
                    <label lang="en">Estonian</label>
                </option>
                <option>
                    <value>fi_FI</value>
                    <label lang="de">Finnisch</label>
                    <label lang="en">Finnish</label>
                </option>
                <option>
                    <value>fr_FR</value>
                    <label lang="de">Französisch</label>
                    <label lang="en">French</label>
                </option>
                <option>
                    <value>de_DE</value>
                    <label lang="de">Deutsch</label>
                    <label lang="en">German</label>
                </option>
                <option>
                    <value>el_GR</value>
                    <label lang="de">Griechisch</label>
                    <label lang="en">Greek</label>
                </option>
                <option>
                    <value>hu_HU</value>
                    <label lang="de">Ungarisch</label>
                    <label lang="en">Hungarian</label>
                </option>
                <option>
                    <value>ga_IE</value>
                    <label lang="de">Irisch</label>
                    <label lang="en">Irish</label>
                </option>
                <option>
                    <value>it_IT</value>
                    <label lang="de">Italienisch</label>
                    <label lang="en">Italian</label>
                </option>
                <option>
                    <value>lv_LV</value>
                    <label lang="de">Lettisch</label>
                    <label lang="en">Latvian</label>
                </option>
                <option>
                    <value>lt_LT</value>
                    <label lang="de">Litauisch</label>
                    <label lang="en">Lithuanian</label>
                </option>
                <option>
                    <value>mt_MT</value>
                    <label lang="de">Maltesisch</label>
                    <label lang="en">Maltese</label>
                </option>
                <option>
                    <value>pl_PL</value>
                    <label lang="de">Polnisch</label>
                    <label lang="en">Polish</label>
                </option>
                <option>
                    <value>pt_PT</value>
                    <label lang="de">Portugiesisch</label>
                    <label lang="en">Portuguese</label>
                </option>
                <option>
                    <value>ro_RO</value>
                    <label lang="de">Rumänisch</label>
                    <label lang="en">Romanian</label>
                </option>
                <option>
                    <value>sk_SK</value>
                    <label lang="de">Slowakisch</label>
                    <label lang="en">Slovak</label>
                </option>
                <option>
                    <value>sl_SI</value>
                    <label lang="de">Slowenisch</label>
                    <label lang="en">Slovene</label>
                </option>
                <option>
                    <value>es_ES</value>
                    <label lang="de">Spanisch</label>
                    <label lang="en">Spanish</label>
                </option>
                <option>
                    <value>sv_SE</value>
                    <label lang="de">Schwedisch</label>
                    <label lang="en">Swedish</label>
                </option>
            </store>
        </element>
    </elements>
</config>