<?php

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

use DropshippingExportFreeVendor\WPDesk\Forms\FieldProvider;
use DropshippingExportFreeVendor\WPDesk\Forms\Field\CheckboxField;
use DropshippingExportFreeVendor\WPDesk\Forms\Field\SubmitField;
use DropshippingExportFreeVendor\WPDesk\Forms\Field\NoOnceField;
class UcpSettingsFormFields implements FieldProvider
{
    public const ENABLE_UCP = 'enable_ucp';
    public const NONCE_ACTION = 'ucp_settings_action';
    public const NONCE_NAME = 'ucp_settings_nonce';
    public const SUBMIT_NAME = 'save';
    public function get_fields(): array
    {
        return [(new CheckboxField())->set_name(self::ENABLE_UCP)->set_label(__('Enable protocol', 'dropshipping-export-free'))->set_sublabel(__('Enable support for Google Universal Commerce Protocol', 'dropshipping-export-free'))->set_description(__('Requires the WooPayments plugin to be installed and activated.', 'dropshipping-export-free')), (new SubmitField())->set_name(self::SUBMIT_NAME)->set_label(__('Apply settings', 'dropshipping-export-free'))->add_class('button button-hero button-primary')->set_attribute('id', self::SUBMIT_NAME), (new NoOnceField(self::NONCE_ACTION))->set_name(self::NONCE_NAME)];
    }
}
