<?php

namespace DropshippingXmlFreeVendor\WPDesk\Library\DropshippingXmlCore\Form\Fields\Component;

use DropshippingXmlFreeVendor\WPDesk\Forms\Field\InputTextField;
class CustomMetaComponent extends \DropshippingXmlFreeVendor\WPDesk\Forms\Field\BasicField
{
    public const META_KEY = 'meta_key';
    public const META_VALUE = 'meta_value';
    public function __construct()
    {
        parent::__construct();
        $this->attributes['multiple'] = \true;
        $this->meta['items'] = [(new InputTextField())->set_name(self::META_KEY)->set_placeholder(esc_attr__('Meta key (e.g. _my_field)', 'dropshipping-xml-for-woocommerce')), (new InputTextField())->set_name(self::META_VALUE)->add_class('last')->set_placeholder(esc_attr__('Drag & drop field value here', 'dropshipping-xml-for-woocommerce'))];
    }
    public function get_items(): array
    {
        return $this->meta['items'] ?? [];
    }
    public function get_template_name(): string
    {
        return 'custom-meta-component';
    }
}
