<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <argument name="data" xsi:type="array">
        <item name="js_config" xsi:type="array">
            <item name="provider" xsi:type="string">product_attributes_grid.product_attributes_grid_data_source</item>
        </item>
    </argument>
    <settings>
        <spinner>product_attributes_columns</spinner>
        <deps>
            <dep>product_attributes_grid.product_attributes_grid_data_source</dep>
        </deps>
    </settings>
    <dataSource name="product_attributes_grid_data_source" component="Magento_Ui/js/grid/provider">
        <settings>
            <storageConfig>
                <param name="cacheRequests" xsi:type="boolean">false</param>
                <param name="indexField" xsi:type="string">attribute_id</param>
            </storageConfig>
            <updateUrl path="mui/index/render"/>
        </settings>
        <aclResource>Magento_Catalog::products</aclResource>
        <dataProvider class="Magento\Catalog\Ui\DataProvider\Product\Attributes\Listing" name="product_attributes_grid_data_source">
            <settings>
                <requestFieldName>id</requestFieldName>
                <primaryFieldName>attribute_id</primaryFieldName>
            </settings>
        </dataProvider>
    </dataSource>
    <listingToolbar name="listing_top">
        <bookmark name="bookmarks"/>
        <columnsControls name="columns_controls"/>
        <filters name="listing_filters">
            <settings>
                <childDefaults>
                    <param name="imports" xsi:type="array">
                        <item name="visible" xsi:type="string">product_attributes_grid.product_attributes_grid.product_attributes_columns:${ $.index }.visible</item>
                    </param>
                    <param name="provider" xsi:type="string">product_attributes_grid.product_attributes_grid.listing_top.listing_filters</param>
                </childDefaults>
                <statefull>
                    <property name="applied" xsi:type="boolean">false</property>
                </statefull>
            </settings>
        </filters>
        <paging name="listing_paging" component="Magento_Catalog/js/components/attributes-grid-paging">
            <settings>
                <selectProvider>product_attributes_grid.product_attributes_grid.product_attributes_columns.ids</selectProvider>
            </settings>
        </paging>
    </listingToolbar>
    <columns name="product_attributes_columns">
        <selectionsColumn name="ids" sortOrder="0">
            <settings>
                <indexField>attribute_id</indexField>
            </settings>
        </selectionsColumn>
        <column name="attribute_code">
            <settings>
                <filter>text</filter>
                <label translate="true">Attribute Code</label>
                <sorting>asc</sorting>
            </settings>
        </column>
        <column name="frontend_label">
            <settings>
                <filter>text</filter>
                <label translate="true">Attribute Label</label>
            </settings>
        </column>
        <column name="is_required" component="Magento_Ui/js/grid/columns/select">
            <settings>
                <options class="Magento\Config\Model\Config\Source\Yesno"/>
                <filter>select</filter>
                <dataType>select</dataType>
                <label translate="true">Required</label>
            </settings>
        </column>
        <column name="is_user_defined" component="Magento_Ui/js/grid/columns/select">
            <settings>
                <options class="Magento\Config\Model\Config\Source\Yesno"/>
                <filter>select</filter>
                <dataType>select</dataType>
                <label translate="true">System</label>
            </settings>
        </column>
        <column name="is_visible" component="Magento_Ui/js/grid/columns/select">
            <settings>
                <options class="Magento\Config\Model\Config\Source\Yesno"/>
                <filter>select</filter>
                <dataType>select</dataType>
                <label translate="true">Visible</label>
            </settings>
        </column>
        <column name="is_global" component="Magento_Ui/js/grid/columns/select">
            <settings>
                <options class="Magento\Catalog\Model\Attribute\Source\Scopes"/>
                <filter>select</filter>
                <dataType>select</dataType>
                <label translate="true">Scope</label>
            </settings>
        </column>
        <column name="is_searchable" component="Magento_Ui/js/grid/columns/select">
            <settings>
                <options class="Magento\Config\Model\Config\Source\Yesno"/>
                <filter>select</filter>
                <dataType>select</dataType>
                <label translate="true">Searchable</label>
            </settings>
        </column>
        <column name="is_comparable" component="Magento_Ui/js/grid/columns/select">
            <settings>
                <options class="Magento\Config\Model\Config\Source\Yesno"/>
                <filter>select</filter>
                <dataType>select</dataType>
                <label translate="true">Comparable</label>
            </settings>
        </column>
    </columns>
</listing>
