<?xml version="1.0" encoding="UTF-8"?>
<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">pagebuilder_block_select_grid.pagebuilder_block_select_grid_data_source</item>
        </item>
    </argument>
    <settings>
        <spinner>columns</spinner>
        <deps>
            <dep>pagebuilder_block_select_grid.pagebuilder_block_select_grid_data_source</dep>
        </deps>
    </settings>
    <dataSource name="pagebuilder_block_select_grid_data_source">
        <argument name="data" xsi:type="array">
            <item name="js_config" xsi:type="array">
                <item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
            </item>
        </argument>
        <settings>
            <storageConfig>
                <param name="indexField" xsi:type="string">block_id</param>
            </storageConfig>
            <updateUrl path="mui/index/render"/>
        </settings>
        <aclResource>Magento_Cms::block</aclResource>
        <dataProvider class="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider" name="pagebuilder_block_select_grid_data_source">
            <settings>
                <requestFieldName>block_id</requestFieldName>
                <primaryFieldName>block_id</primaryFieldName>
            </settings>
        </dataProvider>
    </dataSource>
    <listingToolbar name="listing_top">
        <filterSearch name="title"/>
        <paging name="listing_paging"/>
    </listingToolbar>
    <columns name="columns">
        <settings>
            <childDefaults>
                <param name="clickAction" xsi:type="string">view</param>
                <param name="actionField" xsi:type="string">actions</param>
                <param name="controlVisibility" xsi:type="boolean">true</param>
            </childDefaults>
        </settings>
        <column name="block_id" sortOrder="10">
            <settings>
                <label translate="true">ID</label>
                <filter>textRange</filter>
                <sorting>asc</sorting>
            </settings>
        </column>
        <column name="title">
            <settings>
                <dataType>text</dataType>
                <filter>title</filter>
                <label translate="true">Title</label>
            </settings>
        </column>
        <column name="identifier">
            <settings>
                <filter>identifier</filter>
                <label translate="true">Identifier</label>
            </settings>
        </column>
        <column name="is_active" component="Magento_Ui/js/grid/columns/select">
            <settings>
                <label translate="true">Status</label>
                <filter>select</filter>
                <dataType>select</dataType>
                <options>
                    <option name="inactive" xsi:type="array">
                        <item name="value" xsi:type="string">0</item>
                        <item name="label" xsi:type="string" translate="true">Inactive</item>
                    </option>
                    <option name="active" xsi:type="array">
                        <item name="value" xsi:type="string">1</item>
                        <item name="label" xsi:type="string" translate="true">Active</item>
                    </option>
                </options>
            </settings>
        </column>
        <column name="is_active_label" class="Magento\PageBuilder\Ui\Component\Listing\Columns\BlockStatus">
            <settings>
                <label translate="true">Status</label>
                <visible>false</visible>
            </settings>
        </column>
        <selectionsColumn name="ids" component="Magento_PageBuilder/js/grid/cells/single-select">
            <settings>
                <indexField>block_id</indexField>
            </settings>
        </selectionsColumn>
    </columns>
</listing>
