<?xml version="1.0"?>
<!--
/**
 * @license http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @author Hervé Guétin <herve.guetin@gmail.com> <@herveguetin>
 * @copyright Copyright (c) 2018 Kaliop Digital Commerce (http://digitalcommerce.kaliop.com)
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="catalog">
            <group id="soon_merchandizer" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Merchandizer</label>
                <field
                        id="hide_invisible_products"
                        translate="label, comment"
                        type="select"
                        sortOrder="10"
                        showInDefault="1"
                        showInWebsite="1"
                        showInStore="1"
                        canRestore="1">
                    <label>Hide Invisible Products</label>
                    <comment>Hide products that are not visible individually</comment>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field
                        id="hide_disabled_products"
                        translate="label, comment"
                        type="select"
                        sortOrder="20"
                        showInDefault="1"
                        showInWebsite="1"
                        showInStore="1"
                        canRestore="1">
                    <label>Hide Disabled Products</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field
                        id="hide_out_of_stock_products"
                        translate="label, comment"
                        type="select"
                        sortOrder="30"
                        showInDefault="1"
                        showInWebsite="1"
                        showInStore="1"
                        canRestore="1">
                    <label>Hide Out-of-Stock Products</label>
                    <source_model>\Soon\Merchandizer\Model\System\Config\Source\Stock</source_model>
                    <comment>Hide products that are out-of-stock. When "Use Inventory Configuration" is selected, display of out-of-stock products is based on "Display Out of Stock Products" in Inventory configuration.</comment>
                </field>
                <field
                        id="column_count_options"
                        translate="label, comment"
                        type="text"
                        sortOrder="40"
                        showInDefault="1"
                        showInWebsite="1"
                        showInStore="1"
                        canRestore="1">
                    <label>Column Count Values</label>
                    <validate>required-entry</validate>
                </field>
                <field
                        id="column_count"
                        translate="label, comment"
                        type="text"
                        sortOrder="50"
                        showInDefault="1"
                        showInWebsite="1"
                        showInStore="1"
                        canRestore="1">
                    <label>Column Count Default Value</label>
                    <validate>required-entry validate-digits</validate>
                </field>
                <field
                        id="use_grid_template"
                        translate="label, comment"
                        type="select"
                        sortOrder="60"
                        showInDefault="1"
                        showInWebsite="1"
                        showInStore="1"
                        canRestore="1">
                    <label>Use Grid Template</label>
                    <source_model>\Soon\Merchandizer\Model\System\Config\Source\Stock</source_model>
                    <comment>For developers. When set to 'No', the 'grid-template' attribute in layout is never used. The regular 'template' is always used.</comment>
                </field>
                <field
                        id="default_col_size_x"
                        translate="label, comment"
                        type="text"
                        sortOrder="70"
                        showInDefault="1"
                        showInWebsite="1"
                        showInStore="1"
                        canRestore="1">
                    <label>Default width size</label>
                    <depends>
                        <field id="use_grid_template">1</field>
                    </depends>
                </field>
                <field
                        id="default_col_size_y"
                        translate="label, comment"
                        type="text"
                        sortOrder="80"
                        showInDefault="1"
                        showInWebsite="1"
                        showInStore="1"
                        canRestore="1">
                    <label>Default height size</label>
                    <depends>
                        <field id="use_grid_template">1</field>
                    </depends>
                </field>
            </group>
        </section>
    </system>
</config>
