<?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">
    <!--Declare data source, columns list, button...-->
    <argument name="data" xsi:type="array">
        <item name="js_config" xsi:type="array">
            <item name="provider" xsi:type="string">dotdigitalgroup_review_grid.review_report_grid_data_source</item>
        </item>
    </argument>
    <settings>
        <spinner>dotdigitalgroup_review_columns</spinner>
        <deps>
            <dep>dotdigitalgroup_review_grid.review_report_grid_data_source</dep>
        </deps>
    </settings>
    <dataSource name="review_report_grid_data_source" component="Magento_Ui/js/grid/provider">
        <settings>
            <storageConfig>
                <param name="indexField" xsi:type="string">id</param>
            </storageConfig>
            <updateUrl path="mui/index/render"/>
        </settings>
        <aclResource>Dotdigitalgroup_Email::review</aclResource>
        <dataProvider class="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider" name="review_report_grid_data_source">
            <settings>
                <requestFieldName>id</requestFieldName>
                <primaryFieldName>id</primaryFieldName>
            </settings>
        </dataProvider>
    </dataSource>
    <listingToolbar name="listing_top">
        <bookmark name="bookmarks"/>
        <columnsControls name="columns_controls"/>
        <filters name="listing_filters"/>
        <exportButton name="export_button"/>
        <massaction name="listing_massaction" component="Magento_Ui/js/grid/tree-massactions">
            <action name="delete">
                <settings>
                    <url path="*/*/massDelete"/>
                    <type>delete</type>
                    <label translate="true">Delete</label>
                    <confirm>
                        <title translate="true">Delete items</title>
                        <message translate="true">Are you sure?</message>
                    </confirm>
                </settings>
            </action>
        </massaction>
        <paging name="listing_paging"/>
    </listingToolbar>
    <columns name="dotdigitalgroup_review_columns">
        <!--The list of columns-->
        <selectionsColumn name="ids" sortOrder="0">
            <settings>
                <indexField>id</indexField>
            </settings>
        </selectionsColumn>
        <column name="review_id" sortOrder="10">
            <settings>
                <filter>text</filter>
                <label translate="true">Review Id</label>
                <sorting>asc</sorting>
            </settings>
        </column>
        <column name="customer_id" sortOrder="20">
            <settings>
                <filter>text</filter>
                <label translate="true">Customer Id</label>
                <sorting>asc</sorting>
            </settings>
        </column>
        <column name="store_id" component="Magento_Ui/js/grid/columns/select" sortOrder="30">
            <settings>
                <options class="Magento\Store\Model\ResourceModel\Store\Collection"/>
                <filter>select</filter>
                <dataType>select</dataType>
                <label translate="true">Store Id</label>
            </settings>
        </column>
        <column name="review_imported" component="Magento_Ui/js/grid/columns/select" sortOrder="40">
            <settings>
                <options class="Dotdigitalgroup\Email\Model\Adminhtml\Source\Contact\Imported"/>
                <filter>select</filter>
                <dataType>select</dataType>
                <label translate="true">Review Imported</label>
            </settings>
        </column>
        <column name="created_at" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date" sortOrder="50">
            <settings>
                <filter>dateRange</filter>
                <label translate="true">Created At</label>
            </settings>
        </column>
        <column name="updated_at" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date" sortOrder="60">
            <settings>
                <filter>dateRange</filter>
                <label translate="true">Updated At</label>
            </settings>
        </column>
    </columns>
</listing>
