<?xml version="1.0" ?>
<!--
/**
 * MagePrince
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the mageprince.com license that is
 * available through the world-wide-web at this URL:
 * https://mageprince.com/end-user-license-agreement
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category    MagePrince
 * @package     Mageprince_Faq
 * @copyright   Copyright (c) MagePrince (https://mageprince.com/)
 * @license     https://mageprince.com/end-user-license-agreement
 */
 -->
<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">mageprince_faq_index.mageprince_faq_grid_data_source</item>
			<item name="deps" xsi:type="string">mageprince_faq_index.mageprince_faq_grid_data_source</item>
		</item>
		<item name="spinner" xsi:type="string">mageprince_faq_columns</item>
		<item name="buttons" xsi:type="array">
			<item name="add" xsi:type="array">
				<item name="name" xsi:type="string">add</item>
				<item name="label" translate="true" xsi:type="string">Add New FAQ</item>
				<item name="class" xsi:type="string">primary</item>
				<item name="url" xsi:type="string">*/*/new</item>
			</item>
		</item>
	</argument>
	<dataSource name="mageprince_faq_grid_data_source">
		<argument name="dataProvider" xsi:type="configurableObject">
			<argument name="class" xsi:type="string">Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider</argument>
			<argument name="name" xsi:type="string">mageprince_faq_grid_data_source</argument>
			<argument name="primaryFieldName" xsi:type="string">faq_id</argument>
			<argument name="requestFieldName" xsi:type="string">id</argument>
			<argument name="data" xsi:type="array">
				<item name="config" xsi:type="array">
					<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
					<item name="update_url" path="mui/index/render" xsi:type="url"/>
					<item name="storageConfig" xsi:type="array">
						<item name="indexField" xsi:type="string">faq_id</item>
					</item>
				</item>
			</argument>
		</argument>
	</dataSource>
	<listingToolbar name="listing_top">
		<argument name="data" xsi:type="array">
			<item name="config" xsi:type="array">
				<item name="sticky" xsi:type="boolean">false</item>
			</item>
		</argument>
		<massaction name="listing_massaction">
		    <argument name="data" xsi:type="array">
		        <item name="config" xsi:type="array">
		            <item name="selectProvider" xsi:type="string">mageprince_faq_index.mageprince_faq_index.mageprince_faq_columns.ids</item>
		            <item name="indexField" xsi:type="string">faq_id</item>
		        </item>
		    </argument>
		    <action name="delete">
		        <argument name="data" xsi:type="array">
		            <item name="config" xsi:type="array">
		                <item name="type" xsi:type="string">delete</item>
		                <item name="label" xsi:type="string" translate="true">Delete Faq(s)</item>
		                <item name="url" xsi:type="url" path="mageprince_faq/faq/massDelete"/>
		                <item name="confirm" xsi:type="array">
		                    <item name="title" xsi:type="string" translate="true">Delete Faq(s)</item>
		                    <item name="message" xsi:type="string" translate="true">Are you sure you wan't to delete selected Faq(s)?</item>
		                </item>
		            </item>
		        </argument>
		    </action>
		</massaction>
        <bookmark name="bookmarks">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="storageConfig" xsi:type="array">
                        <item name="namespace" xsi:type="string">mageprince_faq_index</item>
                    </item>
                </item>
            </argument>
        </bookmark>
		<columnsControls name="columns_controls"/>
		<filters name="listing_filters"/>
		<paging name="listing_paging"/>
	</listingToolbar>
	<columns name="mageprince_faq_columns">
		<argument name="data" xsi:type="array">
			<item name="config" xsi:type="array">
				<item name="editorConfig" xsi:type="array">
					<item name="selectProvider" xsi:type="string">mageprince_faq_index.mageprince_faq_index.mageprince_faq_columns.ids</item>
					<item name="enabled" xsi:type="boolean">true</item>
					<item name="indexField" xsi:type="string">faq_id</item>
					<item name="clientConfig" xsi:type="array">
						<item name="saveUrl" path="mageprince_faq/Faq/inlineEdit" xsi:type="url"/>
						<item name="validateBeforeSave" xsi:type="boolean">false</item>
					</item>
				</item>
				<item name="childDefaults" xsi:type="array">
					<item name="fieldAction" xsi:type="array">
						<item name="provider" xsi:type="string">mageprince_faq_index.mageprince_faq_index.mageprince_faq_columns_editor</item>
						<item name="target" xsi:type="string">startEdit</item>
						<item name="params" xsi:type="array">
							<item name="0" xsi:type="string">${ $.$data.rowIndex }</item>
							<item name="1" xsi:type="boolean">true</item>
						</item>
					</item>
				</item>
			</item>
		</argument>
		<selectionsColumn name="ids">
			<argument name="data" xsi:type="array">
				<item name="config" xsi:type="array">
					<item name="indexField" xsi:type="string">faq_id</item>
				</item>
			</argument>
		</selectionsColumn>
		<column name="faq_id">
			<argument name="data" xsi:type="array">
				<item name="config" xsi:type="array">
					<item name="sortOrder" xsi:type="number">10</item>
					<item name="filter" xsi:type="string">textRange</item>
					<item name="sorting" xsi:type="string">asc</item>
					<item name="label" translate="true" xsi:type="string">ID</item>
				</item>
			</argument>
		</column>
		<column name="title">
			<argument name="data" xsi:type="array">
				<item name="config" xsi:type="array">
					<item name="sortOrder" xsi:type="number">20</item>
					<item name="filter" xsi:type="string">text</item>
					<item name="label" translate="true" xsi:type="string">Title</item>
					<item name="editor" xsi:type="array">
						<item name="editorType" xsi:type="string">text</item>
						<item name="validation" xsi:type="array">
							<item name="required-entry" xsi:type="boolean">false</item>
						</item>
					</item>
				</item>
			</argument>
		</column>
		<column name="group">
            <argument name="data" xsi:type="array">
            	<item name="sortOrder" xsi:type="number">30</item>
                <item name="options" xsi:type="object">Mageprince\Faq\Ui\Component\Listing\Column\FaqGroup</item>
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">select</item>
                    <item name="label" xsi:type="string" translate="true">Group</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
                    <item name="dataType" xsi:type="string">select</item>
					<item name="sortable" xsi:type="boolean">false</item>
                    <item name="editor" xsi:type="array">
                    <item name="editorType" xsi:type="string">select</item>
                        <item name="validation" xsi:type="array">
                            <item name="required-entry" xsi:type="boolean">false</item>
                        </item>
                    </item>
                </item>
            </argument>
        </column>
		<column name="sortorder">
			<argument name="data" xsi:type="array">
				<item name="config" xsi:type="array">
					<item name="sortOrder" xsi:type="number">40</item>
					<item name="filter" xsi:type="string">text</item>
					<item name="label" translate="true" xsi:type="string">SortOrder</item>
					<item name="editor" xsi:type="array">
						<item name="editorType" xsi:type="string">text</item>
						<item name="validation" xsi:type="array">
							<item name="required-entry" xsi:type="boolean">false</item>
						</item>
					</item>
				</item>
			</argument>
		</column>
		<column name="status">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">Mageprince\Faq\Ui\Component\Listing\Column\Status</item>
                <item name="config" xsi:type="array">
                	<item name="sortOrder" xsi:type="number">50</item>
                    <item name="filter" xsi:type="string">select</item>
                    <item name="label" xsi:type="string" translate="true">Status</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
                    <item name="dataType" xsi:type="string">select</item>
                    <item name="editor" xsi:type="array">
                    <item name="editorType" xsi:type="string">select</item>
                        <item name="validation" xsi:type="array">
                            <item name="required-entry" xsi:type="boolean">false</item>
                        </item>
                    </item>
                </item>
            </argument>
        </column>
        <column name="created_at" class="Magento\Ui\Component\Listing\Columns\Date">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">dateRange</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
                    <item name="dataType" xsi:type="string">date</item>
                    <item name="label" xsi:type="string" translate="true">Created At</item>
                    <item name="sortOrder" xsi:type="number">60</item>
                </item>
            </argument>
        </column>
        <column name="updated_at" class="Magento\Ui\Component\Listing\Columns\Date">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">dateRange</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
                    <item name="dataType" xsi:type="string">date</item>
                    <item name="label" xsi:type="string" translate="true">Modified At</item>
                    <item name="sortOrder" xsi:type="number">70</item>
                </item>
            </argument>
        </column>
        <actionsColumn class="Mageprince\Faq\Ui\Component\Listing\Column\FaqActions" name="actions">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="sortOrder" xsi:type="number">80</item>
                    <item name="indexField" xsi:type="string">faq_id</item>
                </item>
            </argument>
        </actionsColumn>
	</columns>
</listing>
