<?php

use FlexiMenu\Settings_Helper;

defined( 'ABSPATH' ) || exit;

$args = [
	'label' => [
		'type'  => 'text',
		'title' => __( 'Label', 'flexi-menu' ),
	],


	//region Link Type
	'type'  => [
		'type'    => 'select',
		'title'   => __( 'Type', 'flexi-menu' ),
		'value'   => 'link',
		'options' => Settings_Helper::item_type(),
	],

	'link' => [
		'type'  => 'text',
		'title' => __( 'Link', 'flexi-menu' ),
		'class' => 'is-hidden',
	],

	'_blank' => [
		'type'  => 'checkbox',
		'title' => __( 'Open link in a new tab', 'flexi-menu' ),
		'label' => __( 'Enable', 'flexi-menu' ),
		'class' => 'is-hidden',
	],

	//endregion

	//region Icon
	'icon_type' => [
		'type'    => 'select',
		'title'   => __( 'Icon Type', 'flexi-menu' ),
		'value'   => 'icon',
		'options' => [
			'icon'  => __( 'Icon', 'flexi-menu' ),
		]
	],

	'icon' => [
		'type'    => 'text',
		'title'   => __( 'Icon', 'flexi-menu' ),
		'value'   => 'fas fa-wand-magic-sparkles',
		'options' => [
			'class' => 'wpie-icon-box',
		]
	],

	//endregion

	//region Attributes
	'attribute_id'    => [
		'type'  => 'text',
		'title' => __( 'Attribute ID', 'flexi-menu' ),
	],
	'attribute_class' => [
		'type'  => 'text',
		'title' => __( 'Attribute Class', 'flexi-menu' ),
	],

	'attribute_rel'   => [
		'type'  => 'text',
		'title' => __( 'Attribute Rel', 'flexi-menu' ),
	],
	//endregion


];

$prefix  = 'item-';
$newArgs = [];

foreach ( $args as $key => $value ) {
	$newArgs[ $prefix . $key ] = $value;
}

return $newArgs;