<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/System/SystemConfig/Schema/config.xsd">

    <card>
        <title>Revocation Settings</title>
        <title lang="de-DE">Widerrufs-Einstellungen</title>

        <input-field type="bool">
            <name>enforceRevocationPeriod</name>
            <label>Enforce revocation period</label>
            <label lang="de-DE">Widerrufsfrist prüfen</label>
            <helpText>When enabled (default), revocations are only accepted within the period configured below. When disabled, revocations are accepted regardless of the deadline — useful if you cannot verify the delivery date up front and want to check validity manually afterwards (e.g. from the tracking data). The period fields below have no effect while this is off.</helpText>
            <helpText lang="de-DE">Wenn aktiviert (Standard), werden Widerrufe nur innerhalb der unten konfigurierten Frist angenommen. Wenn deaktiviert, werden Widerrufe unabhängig von der Frist angenommen — sinnvoll, wenn das Lieferdatum vorab nicht prüfbar ist und die Gültigkeit im Nachgang manuell (z. B. anhand der Trackingdaten) geprüft werden soll. Die Fristen-Felder darunter haben dann keine Wirkung.</helpText>
            <defaultValue>true</defaultValue>
        </input-field>

        <input-field type="int">
            <name>revocationPeriodDays</name>
            <label>Revocation period (days)</label>
            <label lang="de-DE">Widerrufsfrist (Tage)</label>
            <helpText>Number of days during which revocation is possible. Default: 14 days. Only applies while "Enforce revocation period" is enabled.</helpText>
            <helpText lang="de-DE">Anzahl der Tage, in denen ein Widerruf möglich ist. Standard: 14 Tage. Wirkt nur, solange „Widerrufsfrist prüfen" aktiviert ist.</helpText>
            <defaultValue>14</defaultValue>
        </input-field>

        <component name="jga-revocation-period-start">
            <name>revocationPeriodStart</name>
            <label>Revocation period starts from</label>
            <label lang="de-DE">Fristbeginn</label>
            <helpText>Determines when the revocation period starts. Besides the fixed dates you can pick any of your shop's delivery statuses (including custom ones, e.g. "Delivered" fed by a tracking connector) — the period then runs from when the delivery entered that status. "Shipping date" = the moment the delivery is set to "Shipped" (NOT the delivery-note or invoice date). "Order date" = when the order was placed. "Invoice date" = the invoice document date; without an invoice the order cannot be revoked. As long as the chosen status/date has not been reached, the order stays revocable. Only applies while "Enforce revocation period" is enabled.</helpText>
            <helpText lang="de-DE">Bestimmt, ab wann die Widerrufsfrist läuft. Neben den festen Daten kannst du jeden Lieferstatus deines Shops wählen (auch eigene, z. B. „Zugestellt" aus einem Tracking-Dienst) — die Frist läuft dann ab dem Zeitpunkt, zu dem die Lieferung diesen Status erreicht hat. „Versanddatum" = der Zeitpunkt, zu dem die Lieferung auf „Versand abgeschlossen" gesetzt wird (NICHT das Lieferschein- oder Rechnungsdatum). „Bestelldatum" = das Datum der Bestellung. „Rechnungsdatum" = das Datum des Rechnungsdokuments; ohne Rechnung ist die Bestellung nicht widerrufbar. Solange der gewählte Status bzw. das gewählte Datum nicht erreicht ist, bleibt die Bestellung widerrufbar. Wirkt nur, solange „Widerrufsfrist prüfen" aktiviert ist.</helpText>
        </component>

        <input-field type="text">
            <name>notificationEmail</name>
            <label>Internal notification emails</label>
            <label lang="de-DE">Interne Benachrichtigungs-E-Mails</label>
            <helpText>Email addresses that receive internal notifications about new revocations. Separate multiple addresses with a comma. Leave empty to disable.</helpText>
            <helpText lang="de-DE">E-Mail-Adressen, die interne Benachrichtigungen über neue Widerrufe erhalten. Mehrere Adressen durch Komma trennen. Leer lassen zum Deaktivieren.</helpText>
        </input-field>
        <input-field type="bool">
            <name>showRevocationLinkInEmail</name>
            <label>Automatically add revocation link to order confirmation</label>
            <label lang="de-DE">Widerrufs-Link automatisch in Bestellbestätigung einfügen</label>
            <helpText>Appends the revocation link snippet to the order confirmation email. Customize the snippet content under Settings → Email Templates → 'Revocation link (order confirmation)'. Disable this option to position the link manually in the template.</helpText>
            <helpText lang="de-DE">Hängt den Widerrufs-Link-Snippet automatisch an die Bestellbestätigungs-Mail an. Den Inhalt des Snippets können Sie unter Einstellungen → E-Mail-Templates → 'Widerrufs-Link (Bestellbestätigung)' anpassen. Deaktivieren Sie diese Option, wenn Sie den Link manuell im Template positionieren möchten.</helpText>
            <defaultValue>false</defaultValue>
        </input-field>

    </card>

    <card>
        <title>Products excluded from revocation</title>
        <title lang="de-DE">Vom Widerruf ausgeschlossene Produkte</title>

        <component name="sw-entity-multi-id-select">
            <name>excludedProductStreams</name>
            <entity>product_stream</entity>
            <label>Excluded dynamic product groups</label>
            <label lang="de-DE">Ausgeschlossene dynamische Produktgruppen</label>
            <helpText>Pick one or more dynamic product groups (Catalogue → Dynamic Product Groups). Products that fall under at least one selected stream are excluded from revocation.</helpText>
            <helpText lang="de-DE">Eine oder mehrere dynamische Produktgruppen auswählen (Kataloge → Dynamische Produktgruppen). Produkte, die unter mindestens eine ausgewählte Gruppe fallen, sind vom Widerruf ausgeschlossen.</helpText>
        </component>

        <component name="jga-revocation-blocked-message">
            <name>blockedRevocationMessage</name>
            <label>Message shown when revocation is blocked</label>
            <label lang="de-DE">Hinweistext bei abgelehntem Widerruf</label>
            <helpText>Free-form message shown in the storefront when an order contains only excluded items. Per-language editing — set texts for each shop locale. HTML supported.</helpText>
            <helpText lang="de-DE">Freier Hinweistext im Storefront, wenn eine Bestellung nur ausgeschlossene Artikel enthält. Pro Sprache pflegbar — Texte für jede Shop-Sprache eintragen. HTML erlaubt.</helpText>
        </component>
    </card>

    <card>
        <title>Customer groups &amp; rules excluded from revocation</title>
        <title lang="de-DE">Vom Widerruf ausgeschlossene Kundengruppen &amp; Regeln</title>

        <component name="sw-entity-multi-id-select">
            <name>excludedCustomerGroups</name>
            <entity>customer_group</entity>
            <label>Disable revocation for these customer groups</label>
            <label lang="de-DE">Widerruf für diese Kundengruppen deaktivieren</label>
            <helpText>Members of the selected groups will not see the revocation links, and their orders cannot be revoked online. IMPORTANT: only use this for business customer (B2B) groups — consumers are legally entitled to the online withdrawal function as of 19 June 2026 (Art. 11a Directive 2011/83/EU). Anonymous visitors always see the form; their orders are checked on submission.</helpText>
            <helpText lang="de-DE">Mitglieder der ausgewählten Gruppen sehen die Widerrufs-Links nicht und ihre Bestellungen können nicht online widerrufen werden. WICHTIG: Nur für Geschäftskunden-Gruppen (B2B) verwenden — Verbrauchern muss die Online-Widerrufsfunktion ab dem 19.06.2026 zur Verfügung stehen (§356a BGB). Anonyme Besucher sehen das Formular immer; ihre Bestellungen werden beim Absenden geprüft.</helpText>
        </component>

        <component name="sw-entity-multi-id-select">
            <name>excludedRules</name>
            <entity>rule</entity>
            <label>Disable revocation for these rules</label>
            <label lang="de-DE">Widerruf für diese Regeln deaktivieren</label>
            <helpText>Customers matched by any of the selected rules (Rule Builder) will not see the revocation links and their orders cannot be revoked online — in addition to the customer groups above. Ideal for cases customer groups cannot express (e.g. "billing country outside the EU"). For logged-in customers the rule applies directly; for the guest revocation (order number + email) only when order-number validation is enabled (otherwise no order can be resolved). IMPORTANT: do not accidentally exclude EU consumers — the withdrawal function is legally required for them (Art. 11a Directive 2011/83/EU).</helpText>
            <helpText lang="de-DE">Kunden, auf die eine der ausgewählten Regeln (Rule Builder) zutrifft, sehen die Widerrufs-Links nicht und ihre Bestellungen können nicht online widerrufen werden — ergänzend zu den Kundengruppen oben. Ideal für Fälle, die sich nicht über Kundengruppen abbilden lassen (z. B. „Rechnungsland außerhalb der EU"). Bei eingeloggten Kunden wirkt die Regel direkt; beim Gast-Widerruf (Bestellnummer + E-Mail) nur, wenn die Bestellnummern-Validierung aktiv ist (sonst ist keine Bestellung zuordenbar). WICHTIG: EU-Verbraucher nicht versehentlich ausschließen — die Widerrufsfunktion ist für sie gesetzlich vorgeschrieben (§356a BGB).</helpText>
        </component>
    </card>

    <card>
        <title>Action on revocation</title>
        <title lang="de-DE">Aktion bei Widerruf-Eingang</title>

        <input-field type="bool">
            <name>autoTransitionToRevoked</name>
            <label>Automatically set order status to "Revoked"</label>
            <label lang="de-DE">Bestellstatus automatisch auf „Widerrufen" setzen</label>
            <helpText>When enabled, the order is automatically transitioned to the "Revoked" state after a revocation is confirmed. Disable this if you want to review revocations manually before changing the order state (e.g. for custom-made products). When disabled, we recommend setting the tag below — that way you can filter pending revocations in the order list and process them in batches.</helpText>
            <helpText lang="de-DE">Wenn aktiviert, wird die Bestellung nach einem bestätigten Widerruf automatisch in den Status „Widerrufen" überführt. Deaktiviere diese Option, wenn du Widerrufe manuell prüfen willst, bevor der Bestellstatus geändert wird (z. B. bei Maßanfertigungen). Bei Deaktivierung empfehlen wir, unten einen Tag zu setzen — so kannst du offene Widerrufe in der Bestellliste filtern und gesammelt abarbeiten.</helpText>
            <defaultValue>true</defaultValue>
        </input-field>

        <input-field type="bool">
            <name>addRevocationTag</name>
            <label>Add tag to order on revocation</label>
            <label lang="de-DE">Tag zur Bestellung hinzufügen</label>
            <helpText>When enabled, the tag selected below is attached to the order after a revocation is confirmed. Useful for filtering revoked orders in the order list — and serves as the duplicate-revocation safeguard whenever the automatic status change above is disabled or the state machine refuses the transition (e.g. orders managed by a connector). At least one of the two options should be active so the plugin can recognise an order as already revoked.</helpText>
            <helpText lang="de-DE">Wenn aktiviert, wird der unten ausgewählte Tag nach einem bestätigten Widerruf an die Bestellung angehängt. Nützlich, um widerrufene Bestellungen in der Bestellliste zu filtern — und gleichzeitig der Schutz gegen Mehrfach-Widerruf, sobald der automatische Statuswechsel oben deaktiviert ist oder die State-Machine den Übergang verweigert (z. B. bei Connector-gesteuerten Bestellungen). Mindestens eine der beiden Optionen sollte aktiv sein, damit das Plugin eine Bestellung als bereits widerrufen erkennen kann.</helpText>
            <defaultValue>false</defaultValue>
        </input-field>

        <component name="sw-entity-single-select">
            <name>revocationOrderTagId</name>
            <entity>tag</entity>
            <label>Tag</label>
            <label lang="de-DE">Tag</label>
            <helpText>The plugin pre-creates a "Widerruf-Prüfung" tag on installation. Pick another tag here if you want — or create your own under Settings → Tags.</helpText>
            <helpText lang="de-DE">Das Plugin legt bei Installation einen Tag „Widerruf-Prüfung" an. Wähle hier einen anderen Tag, wenn du willst — oder lege einen eigenen unter Einstellungen → Tags an.</helpText>
        </component>
    </card>

    <card>
        <title>Form validation</title>
        <title lang="de-DE">Formular-Validierung</title>

        <input-field type="bool">
            <name>validateOrderNumber</name>
            <label>Validate order number</label>
            <label lang="de-DE">Bestellnummer validieren</label>
            <helpText>When enabled (default), the order number is a required field and the entered value must match an existing Shopware order number — or, if configured below, one of the additional search fields; otherwise the revocation is rejected. When disabled, the field is optional: customers may leave it blank, and the entry is not matched against an order (the automatic status change and order tag are then skipped).</helpText>
            <helpText lang="de-DE">Wenn aktiv (Standard), ist die Bestellnummer ein Pflichtfeld und die eingegebene Nummer muss eine vorhandene Shopware-Bestellnummer treffen — oder, falls weiter unten konfiguriert, eines der zusätzlichen Suchfelder; andernfalls wird der Widerruf abgelehnt. Bei Deaktivierung ist das Feld optional: Kunden dürfen es leer lassen, und die Eingabe wird nicht gegen eine Bestellung abgeglichen (der automatische Statuswechsel und das Bestell-Tag entfallen dann).</helpText>
            <defaultValue>true</defaultValue>
        </input-field>

        <input-field type="bool">
            <name>validateEmail</name>
            <label>Validate email</label>
            <label lang="de-DE">E-Mail validieren</label>
            <helpText>When enabled, the entered email must match the resolved order (account email for logged-in customers, order email for guests). When disabled, the email is only required as a form input but is not cross-checked against the order.</helpText>
            <helpText lang="de-DE">Wenn aktiv, muss die eingegebene E-Mail-Adresse zur gefundenen Bestellung passen (bei eingeloggten Kunden: zum Konto, bei Gästen: zur Bestell-E-Mail). Bei Deaktivierung ist die E-Mail-Adresse nur Pflichteingabe im Formular, wird aber nicht gegen die Bestellung abgeglichen.</helpText>
            <defaultValue>true</defaultValue>
        </input-field>

        <input-field type="bool">
            <name>crossSalesChannelLookup</name>
            <label>Include orders from other Sales Channels</label>
            <label lang="de-DE">Bestellungen aus anderen Verkaufskanälen berücksichtigen</label>
            <helpText>When enabled, the revocation form also finds orders placed in a different Sales Channel of this installation. Useful when several Sales Channels share one customer base, for example a second channel with different prices. Requirements and limits: customers must not be bound to a Sales Channel (Settings → Login and registration → "Bind customers to Sales Channel" must be off), otherwise each channel keeps its own customer record and the lookup cannot match. The revocation period and all exclusions are always read from the configuration of the channel the customer is currently browsing, not from the channel the order was placed in — check this if your channels are configured differently. For guests the option only takes effect while "Validate email" above is enabled. If the same order number exists in two channels, the revocation is rejected as ambiguous instead of guessing.</helpText>
            <helpText lang="de-DE">Wenn aktiv, findet das Widerrufsformular auch Bestellungen, die in einem anderen Verkaufskanal dieser Installation aufgegeben wurden. Sinnvoll, wenn sich mehrere Verkaufskanäle einen Kundenstamm teilen, etwa ein zweiter Kanal mit abweichenden Preisen. Voraussetzungen und Grenzen: Kunden dürfen nicht an einen Verkaufskanal gebunden sein (Einstellungen → Login und Registrierung → „Kunden an Verkaufskanal binden" muss aus sein), sonst existiert je Kanal ein eigener Kundendatensatz und die Zuordnung schlägt fehl. Widerrufsfrist und sämtliche Ausschlüsse werden immer aus der Konfiguration des Kanals gelesen, in dem der Kunde gerade unterwegs ist — nicht aus dem Kanal der Bestellung. Das ist zu beachten, wenn die Kanäle unterschiedlich konfiguriert sind. Für Gäste wirkt die Option nur, solange oben „E-Mail validieren" aktiv ist. Existiert dieselbe Bestellnummer in zwei Kanälen, wird der Widerruf als mehrdeutig abgelehnt statt geraten.</helpText>
            <defaultValue>false</defaultValue>
        </input-field>

        <component name="jga-revocation-lookup-fields">
            <name>additionalOrderLookupFields</name>
            <label>Additional search fields for the contract number</label>
            <label lang="de-DE">Zusätzliche Suchfelder für die Vertragsnummer</label>
            <helpText>Optional list of order custom fields the plugin searches in addition to the native Shopware order number. Useful when customers know an external identifier (e.g. an ERP/WaWi order id written into the order by a connector) instead of the Shopware order number.</helpText>
            <helpText lang="de-DE">Optionale Liste von Bestell-Zusatzfeldern, in denen das Plugin zusätzlich zur Shopware-Bestellnummer nach der eingegebenen Vertragsnummer sucht. Nützlich, wenn Kunden eine externe Kennung kennen (z. B. eine ERP-/WaWi-Bestell-ID, die ein Connector in die Bestellung schreibt) statt der Shopware-Bestellnummer.</helpText>
        </component>
    </card>

    <card>
        <title>Revocation form</title>
        <title lang="de-DE">Widerrufsformular</title>

        <input-field type="bool">
            <name>hideReasonField</name>
            <label>Hide the "reason for revocation" field</label>
            <label lang="de-DE">Feld „Grund des Widerrufs" ausblenden</label>
            <helpText>By default the form contains an optional free-text field for the reason. Enable this to remove it — useful if you do not want to collect a reason at all. Note that a revocation never requires a reason (Art. 9 Directive 2011/83/EU), so this field must not be turned into a mandatory one.</helpText>
            <helpText lang="de-DE">Standardmäßig enthält das Formular ein optionales Freitextfeld für den Widerrufsgrund. Aktivieren Sie diese Option, um es zu entfernen — sinnvoll, wenn Sie gar keinen Grund erheben möchten. Hinweis: Ein Widerruf muss nach § 355 BGB ohne Begründung möglich sein; das Feld darf daher nie zum Pflichtfeld gemacht werden.</helpText>
            <defaultValue>false</defaultValue>
        </input-field>

        <input-field type="bool">
            <name>disableCaptcha</name>
            <label>Disable captcha on the revocation form</label>
            <label lang="de-DE">Captcha im Widerrufsformular deaktivieren</label>
            <helpText>Shopware applies the captcha configured under Settings → Basic information → Captcha to every protected form, including this one. Enable this option to exempt the revocation form. CAUTION: each submission sends an e-mail to the address entered and an internal notification, so without a captcha bots can trigger mail dispatch from your domain. Only disable it if the captcha is causing accessibility or consent problems on this legally required page.</helpText>
            <helpText lang="de-DE">Shopware wendet das unter Einstellungen → Grundeinstellungen → Captcha konfigurierte Captcha auf alle geschützten Formulare an, auch auf dieses. Mit dieser Option nehmen Sie das Widerrufsformular davon aus. ACHTUNG: Jede Absendung verschickt eine E-Mail an die eingegebene Adresse sowie eine interne Benachrichtigung — ohne Captcha können Bots also Mailversand über Ihre Domain auslösen. Deaktivieren Sie es nur, wenn das Captcha auf dieser gesetzlich vorgeschriebenen Seite zu Barrierefreiheits- oder Einwilligungsproblemen führt.</helpText>
            <defaultValue>false</defaultValue>
        </input-field>
    </card>

    <card>
        <title>Confirmation checkboxes in revocation form</title>
        <title lang="de-DE">Bestätigungs-Checkboxen im Widerrufsformular</title>

        <component name="jga-revocation-consent-list">
            <name>consentItems</name>
            <helpText>Define the confirmations the customer must tick before submitting the revocation form. As href, use page://privacy, page://tos or page://imprint to open the configured Shopware CMS page as a full page (recommended; add target="_blank" to open in a new tab), or cms://privacy, cms://tos, cms://imprint to open it in an in-page modal instead.</helpText>
            <helpText lang="de-DE">Definiere, welche Bestätigungen der Kunde im Widerrufsformular ankreuzen muss. Nutze als href page://privacy, page://tos oder page://imprint, um die konfigurierte Shopware-CMS-Seite als volle Seite zu öffnen (empfohlen; mit target="_blank" im neuen Tab), oder cms://privacy, cms://tos, cms://imprint, um sie stattdessen in einem Modal zu öffnen.</helpText>
        </component>
    </card>

    <card>
        <title>Button Placement</title>
        <title lang="de-DE">Button-Platzierung</title>

        <component name="jga-revocation-link-hint">
            <name>linkHintInfo</name>
        </component>

        <input-field type="bool">
            <name>showInAccountMenu</name>
            <label>Show link in account menu</label>
            <label lang="de-DE">Link im Konto-Menü anzeigen</label>
            <helpText>Display a "Revoke contract" link in the customer account sidebar and header dropdown.</helpText>
            <helpText lang="de-DE">Einen "Bestellung widerrufen"-Link im Kundenkonto-Seitenmenü und Header-Dropdown anzeigen.</helpText>
            <defaultValue>true</defaultValue>
        </input-field>

        <input-field type="bool">
            <name>showInFooter</name>
            <label>Show button in footer</label>
            <label lang="de-DE">Button im Footer anzeigen</label>
            <helpText>Display the revocation button in the shop footer (visible without login). Additionally, the button can be placed on any page via the CMS designer (Shopping Experiences) using the "Revocation Button" element.</helpText>
            <helpText lang="de-DE">Widerrufsbutton im Shop-Footer anzeigen (ohne Login sichtbar). Der Button kann zusätzlich über die Erlebniswelten (CMS-Designer) auf beliebigen Seiten eingebunden werden. Fügen Sie dazu das Element "Widerrufs-Button" in ein Layout ein.</helpText>
            <defaultValue>true</defaultValue>
        </input-field>

        <input-field type="bool">
            <name>hideFooterButtonInCheckout</name>
            <label>Hide footer button during checkout</label>
            <label lang="de-DE">Footer-Button im Checkout ausblenden</label>
            <helpText>By default the footer button is shown on every page, including the cart and checkout. Enable this to hide it on the cart, confirm and finish pages so it does not distract during the ordering process. Only takes effect when "Show button in footer" is enabled.</helpText>
            <helpText lang="de-DE">Standardmäßig wird der Footer-Button auf jeder Seite angezeigt, auch im Warenkorb und Checkout. Aktivieren Sie diese Option, um ihn auf den Seiten Warenkorb, Bestellabschluss und Bestellbestätigung auszublenden, damit er den Bestellvorgang nicht stört. Wirkt nur, wenn "Button im Footer anzeigen" aktiviert ist.</helpText>
            <defaultValue>false</defaultValue>
        </input-field>

    </card>

    <card>
        <title>Button Appearance</title>
        <title lang="de-DE">Button-Darstellung</title>

        <input-field type="single-select">
            <name>buttonStyle</name>
            <label>Button style</label>
            <label lang="de-DE">Button-Stil</label>
            <options>
                <option>
                    <id>primary</id>
                    <name>Primary (highlighted)</name>
                    <name lang="de-DE">Primär (hervorgehoben)</name>
                </option>
                <option>
                    <id>secondary</id>
                    <name>Secondary</name>
                    <name lang="de-DE">Sekundär</name>
                </option>
                <option>
                    <id>outline-primary</id>
                    <name>Outline Primary</name>
                    <name lang="de-DE">Umriss Primär</name>
                </option>
                <option>
                    <id>outline-secondary</id>
                    <name>Outline Secondary</name>
                    <name lang="de-DE">Umriss Sekundär</name>
                </option>
            </options>
            <defaultValue>primary</defaultValue>
        </input-field>

        <input-field type="textarea">
            <name>buttonCustomCss</name>
            <label>Custom CSS</label>
            <label lang="de-DE">Eigenes CSS</label>
            <helpText>Inline CSS applied directly to the footer revocation button. Example: background-color: #ff0000; border-radius: 8px; Available CSS classes for custom theme styling: .jga-revocation-footer-button (footer wrapper), .revocation-page (form page), .revocation-form (form card), .revocation-page-title (page heading).</helpText>
            <helpText lang="de-DE">Inline-CSS, das direkt auf den Widerrufs-Button im Footer angewendet wird. Beispiel: background-color: #ff0000; border-radius: 8px; Verfügbare CSS-Klassen für eigenes Theme-Styling: .jga-revocation-footer-button (Footer-Wrapper), .revocation-page (Formularseite), .revocation-form (Formular-Karte), .revocation-page-title (Seitenüberschrift).</helpText>
        </input-field>
    </card>

</config>
