<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 MageWorx. All rights reserved.
 * See LICENSE.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="mageworx" sortOrder="2001">
            <label>MageWorx</label>
        </tab>
        <section id="mageworx_apo" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
            <label><![CDATA[Advanced Product Options]]></label>
            <tab>mageworx</tab>
            <resource>MageWorx_OptionInventory::config_optioninventory</resource>
            <group id="optioninventory" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                <label><![CDATA[Option Inventory]]></label>
                <field id="enable" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label><![CDATA[Enable Option Inventory Functionality]]></label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="display_option_inventory_on_frontend" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label><![CDATA[Display Option Qty on Front-end]]></label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <depends><field id="enable">1</field></depends>
                </field>
                <field id="disable_out_of_stock_options" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label><![CDATA[Out-Of-Stock options]]></label>
                    <source_model>MageWorx\OptionInventory\Model\Source\HideOutOfStockOptions</source_model>
                    <depends><field id="enable">1</field></depends>
                </field>
                <field id="display_out_of_stock_message" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label><![CDATA[Display Out-Of-Stock message]]></label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <depends><field id="enable">1</field></depends>
                </field>
            </group>
        </section>
    </system>
</config>
