<?php

namespace DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Form\Fields;

use DropshippingExportFreeVendor\WPDesk\Forms\Field\NoOnceField;
use DropshippingExportFreeVendor\WPDesk\Forms\Field\SubmitField;
use DropshippingExportFreeVendor\WPDesk\Forms\FieldProvider;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Form\Fields\Component\ConditionalLogicComponent;
class ExportLogicFormFields implements FieldProvider
{
    const NODE_ELEMENT = 'node_element';
    const NODE_ELEMENT_VALUE = 'node';
    const NODE_ELEMENT_ID = 'dropshipping-node-element';
    const INPUT_SEPARATOR = 'separator';
    const INPUT_SEPARATOR_ID = 'dropshipping-item-separator';
    const BUTTON_SEPARATOR = 'button_separator';
    const BUTTON_SEPARATOR_ID = 'dropshipping-item-separator-button';
    const ITEM_NUMBER = 'item_number';
    const ITEM_NUMBER_ID = 'dropshipping-item-nr';
    const SUBMIT_NEXT_STEP = 'next_step';
    const NONCE_ACTION = 'export_logic_selector_action';
    const NONCE_NAME = 'export_logic_selector_nonce';
    const LOGICAL_CONDITIONS = 'logical_conditions';
    const LOGICAL_CONDITIONS_ID = 'logical_conditions';
    /**
     * @see FieldProvider::get_fields()
     */
    public function get_fields()
    {
        return [(new ConditionalLogicComponent())->set_label(__('Logical conditions', 'dropshipping-export-free'))->set_attribute('id', self::LOGICAL_CONDITIONS_ID)->set_name(self::LOGICAL_CONDITIONS), (new SubmitField())->set_name(self::SUBMIT_NEXT_STEP)->set_label(__('Go to the next step &rarr;', 'dropshipping-export-free'))->add_class('button button-primary button-hero button-export-logic')->set_attribute('id', self::SUBMIT_NEXT_STEP), (new NoOnceField(self::NONCE_ACTION))->set_name(self::NONCE_NAME)];
    }
}
