<?xml version="1.0"?>
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
  <group id="subscriptions" translate="label" type="text" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1">
    <label>Subscriptions via Stripe Billing</label>
    <comment>Create and manage subscriptions directly via your Magento Admin to easily add a recurring line of revenue to your business model. &lt;a href="http://stripe.com/billing?utm_campaign=comarketing&amp;utm_source=magento&amp;utm_medium=referred" target="_blank" rel="noopener noreferrer"&gt;Learn More&lt;/a&gt; about Stripe Billing.</comment>
    <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Enabled</label>
      <comment><![CDATA[If you do not sell subscriptions, disabling them is recommended.]]></comment>
      <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
      <config_path>payment/stripe_payments_subscriptions/active</config_path>
    </field>
    <field id="upgrade_downgrade" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Customers can change subscription</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Enabled</source_model>
      <config_path>payment/stripe_payments_subscriptions/upgrade_downgrade</config_path>
      <comment><![CDATA[Allow customers to change the quantity or options of active subscriptions from the customer account section.]]></comment>
      <depends>
        <field id="active">1</field>
      </depends>
    </field>
    <field id="additional_info" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Additional info</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Enabled</source_model>
      <config_path>payment/stripe_payments_subscriptions/additional_info</config_path>
      <comment><![CDATA[When a product is added to the cart, subscription details are added to the cart item's info block]]></comment>
      <depends>
        <field id="active">1</field>
      </depends>
    </field>
    <field id="renewal_email_notification" translate="label" type="select" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Renewal email notification</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Enabled</source_model>
      <config_path>payment/stripe_payments_subscriptions/renewal_email_notification</config_path>
      <comment><![CDATA[Select to receive renewal emails or not.]]></comment>
      <depends>
        <field id="active">1</field>
      </depends>
    </field>
    <field id="upgrade_email_notification" translate="label" type="select" sortOrder="210" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Change email notification</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Enabled</source_model>
      <config_path>payment/stripe_payments_subscriptions/upgrade_email_notification</config_path>
      <comment><![CDATA[Select to receive subscription change emails.]]></comment>
      <depends>
        <field id="active">1</field>
        <field id="upgrade_downgrade">1</field>
      </depends>
    </field>
    <field id="email_template_note" translate="label" sortOrder="215" showInDefault="1" showInWebsite="1" showInStore="1">
      <label/>
      <frontend_model>StripeIntegration\Payments\Model\Adminhtml\Frontend\EmailTemplateNote</frontend_model>
      <depends>
        <field id="active">1</field>
      </depends>
    </field>
    <field id="order_email_template" translate="label" type="select" sortOrder="220" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Renewal email template</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Subscriptions\EmailTemplate</source_model>
      <config_path>payment/stripe_payments_subscriptions/order_email_template</config_path>
      <comment><![CDATA[The email template which will be sent for a subscription renewal order. If left empty, the email template will fall back to the normal order email.]]></comment>
      <depends>
        <field id="active">1</field>
        <field id="renewal_email_notification">1</field>
      </depends>
    </field>
    <field id="guest_order_email_template" translate="label" type="select" sortOrder="221" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Guest renewal email template</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Subscriptions\EmailTemplate</source_model>
      <config_path>payment/stripe_payments_subscriptions/guest_order_email_template</config_path>
      <comment><![CDATA[The email template which will be sent for a subscription renewal order made as a guest. If left empty, the email template will fall back to the normal order email.]]></comment>
      <depends>
        <field id="active">1</field>
        <field id="renewal_email_notification">1</field>
      </depends>
    </field>
    <field id="invoice_email_template" translate="label" type="select" sortOrder="222" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Renewal invoice email template</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Subscriptions\EmailTemplate</source_model>
      <config_path>payment/stripe_payments_subscriptions/invoice_email_template</config_path>
      <comment><![CDATA[The email template which will be sent for a subscription renewal invoice. If left empty, the email template will fall back to the normal order email.]]></comment>
      <depends>
        <field id="active">1</field>
        <field id="renewal_email_notification">1</field>
      </depends>
    </field>
    <field id="guest_invoice_email_template" translate="label" type="select" sortOrder="223" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Guest renewal invoice email template</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Subscriptions\EmailTemplate</source_model>
      <config_path>payment/stripe_payments_subscriptions/guest_invoice_email_template</config_path>
      <comment><![CDATA[The email template which will be sent for a subscription renewal invoice made as guest. If left empty, the email template will fall back to the normal order email.]]></comment>
      <depends>
        <field id="active">1</field>
        <field id="renewal_email_notification">1</field>
      </depends>
    </field>
    <field id="change_order_email_template" translate="label" type="select" sortOrder="224" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Change email template</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Subscriptions\EmailTemplate</source_model>
      <config_path>payment/stripe_payments_subscriptions/change_order_email_template</config_path>
      <comment><![CDATA[The email template which will be sent for a subscription change order. If left empty, the email template will fall back to the normal order email.]]></comment>
      <depends>
        <field id="active">1</field>
        <field id="upgrade_email_notification">1</field>
        <field id="upgrade_downgrade">1</field>
      </depends>
    </field>
    <field id="creditmemo_email_template" translate="label" type="select" sortOrder="225" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Credit memo email template</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Subscriptions\EmailTemplate</source_model>
      <config_path>payment/stripe_payments_subscriptions/creditmemo_email_template</config_path>
      <comment><![CDATA[The email template which will be sent for a subscription credit memo. If left empty, the email template will fall back to the normal order email.]]></comment>
      <depends>
        <field id="active">1</field>
      </depends>
    </field>
    <field id="guest_creditmemo_email_template" translate="label" type="select" sortOrder="226" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Guest credit memo email template</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Subscriptions\EmailTemplate</source_model>
      <config_path>payment/stripe_payments_subscriptions/guest_creditmemo_email_template</config_path>
      <comment><![CDATA[The email template which will be sent for a subscription credit memo made as a guest. If left empty, the email template will fall back to the normal order email.]]></comment>
      <depends>
        <field id="active">1</field>
      </depends>
    </field>
    <field id="shipment_email_template" translate="label" type="select" sortOrder="227" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Shipment email template</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Subscriptions\EmailTemplate</source_model>
      <config_path>payment/stripe_payments_subscriptions/shipment_email_template</config_path>
      <comment><![CDATA[The email template which will be sent for a subscription shipment. If left empty, the email template will fall back to the normal order email.]]></comment>
      <depends>
        <field id="active">1</field>
      </depends>
    </field>
    <field id="guest_shipment_email_template" translate="label" type="select" sortOrder="228" showInDefault="1" showInWebsite="1" showInStore="1">
      <label>Guest shipment email template</label>
      <source_model>StripeIntegration\Payments\Model\Adminhtml\Source\Subscriptions\EmailTemplate</source_model>
      <config_path>payment/stripe_payments_subscriptions/guest_shipment_email_template</config_path>
      <comment><![CDATA[The email template which will be sent for a subscription shipment made as a guest. If left empty, the email template will fall back to the normal order email.]]></comment>
      <depends>
        <field id="active">1</field>
      </depends>
    </field>
  </group>
</include>
