<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="amasty_pgrid" translate="label" type="text" sortOrder="161812" showInDefault="1" showInWebsite="1"
                 showInStore="1">
            <label>Product Grid</label>
            <tab>amasty</tab>
            <resource>Amasty_Pgrid::config</resource>
            <group id="editing" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Editing Settings</label>
                <field id="mode" translate="label comment" type="select" sortOrder="10" showInDefault="1"
                       showInWebsite="0" showInStore="0">
                    <label>Editing Mode</label>
                    <comment>Single Cell - data is being saved right after any cell is edited. Multi Cell - Save button should be clicked after data in multiple cells has been edited.</comment>
                    <source_model>Amasty\Pgrid\Model\Config\Source\Editmode</source_model>
                </field>
            </group>
            <group id="extra_columns" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Additional Grid Columns Settings</label>
                <group id="product_settings" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Related products, Up-sells, Cross-sells Columns</label>
                    <field id="products_qty" translate="label comment" type="text" sortOrder="10" showInDefault="1"
                           showInWebsite="0" showInStore="0">
                        <label>Products Qty</label>
                        <comment>Specify the number of related, cross-sell, and up-sell products to display on the grid's cell</comment>
                    </field>
                </group>
                <group id="qty_sold_settings" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>'Qty Sold' Column</label>
                    <field id="qty_sold_from" translate="label comment" type="am_date_config" sortOrder="20" showInDefault="1"
                           showInWebsite="0" showInStore="0">
                        <label>'Qty Sold' Date From</label>
                        <comment>Specify the time period to display the number of orders in the 'Qty Sold' field.</comment>
                        <backend_model>Amasty\Pgrid\Model\Indexer\QtySoldInvalidate</backend_model>
                    </field>
                    <field id="qty_sold_to" translate="label comment" type="am_date_config" sortOrder="30" showInDefault="1"
                           showInWebsite="0" showInStore="0">
                        <label>'Qty Sold' Date To</label>
                        <comment>Specify the time period to display the number of orders in the 'Qty Sold' field.</comment>
                        <backend_model>Amasty\Pgrid\Model\Indexer\QtySoldInvalidate</backend_model>
                    </field>
                    <field id="qty_sold_orders" translate="label comment" type="multiselect" sortOrder="40" showInDefault="1"
                           showInWebsite="0" showInStore="0">
                        <label>'Qty Sold' Order Statuses</label>
                        <comment>Define order statuses that should be included in the 'Qty Sold' field.</comment>
                        <source_model>Magento\Sales\Model\Config\Source\Order\Status</source_model>
                        <backend_model>Amasty\Pgrid\Model\Indexer\QtySoldInvalidate</backend_model>
                    </field>
                    <field id="include_refunded" translate="label" type="select" sortOrder="50" showInDefault="1"
                           showInWebsite="0" showInStore="0">
                        <label>Include Refunded Items</label>
                        <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    </field>
                </group>
            </group>
            <group id="modification" translate="label" type="text" sortOrder="15" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Quantity Based Availability</label>
                <field id="availability" translate="label comment" type="select" sortOrder="10" showInDefault="1"
                       showInWebsite="0" showInStore="0">
                    <label>Quantity Based Availability</label>
                    <comment>When set to yes, availability will automatically change to 'In stock' when quantity is positive and to 'Out of stock" when quantity is zero or negative. When set to 'No', availability status will not be updated automatically.</comment>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="show_integer" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Show Quantity as Integer</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
        </section>
    </system>
</config>
