<?php
/**
 * @author 1902 Software
 * @copyright Copyright © 2023 1902 Software (https://1902software.com/magento/)
 * @package WriteTextAI_WriteTextAI
 */


declare(strict_types=1);

namespace WriteTextAI\WriteTextAI\Block\Adminhtml\CategoriesGrid;

use WriteTextAI\WriteTextAI\Model\UserFieldsSelectedManager;

class TransferPrompt extends \WriteTextAI\WriteTextAI\Block\Adminhtml\Grid\TransferPrompt
{
    /**
     * @var string
     */
    protected $_template = 'WriteTextAI_WriteTextAI::categoriesgrid/massactions/transfer_prompt.phtml';

    /**
     * Get fields
     *
     * @return array
     */
    public function getFields()
    {
        return [[
            'value' => 'page_title',
            'label' => __('Meta title')
        ], [
            'value' => 'page_description',
            'label' => __('Meta description')
        ], [
            'value' => 'category_description',
            'label' => __('Category description')
        ]];
    }

    /**
     * Get fields selected
     *
     * @return array
     */
    public function getFieldsSelected()
    {
        return $this->userFieldsSelected->getUserFieldsSelected(
            UserFieldsSelectedManager::ACTION_TYPE_BULK_TRANSFER_FIELDS,
            'category',
            'grid'
        );
    }
}
