<?php
/*
 * Page Name: Settings
 */

use FlexiMenu\Admin\CreateFields;

defined( 'ABSPATH' ) || exit;

$page_opt = include( 'options/3.settings.php' );
$field    = new CreateFields( $options, $page_opt );

$item_open = ! empty( $options['item_open']['menu_type'] ) ? 1 : 0;
$open      = ! empty( $item_open ) ? ' open' : '';
?>
<details class="wpie-item wpie-menu-style"<?php echo esc_attr( $open ); ?>>
	<input type="hidden" name="param[item_open][menu_type]" class="wpie-item__toggle" value="<?php
	echo absint( $item_open ); ?>">
	<summary class="wpie-item_heading">
        <span class="wpie-item_heading_icon">
	        <span class="wpie-icon wpie_icon-pointer"></span>
        </span>
		<span class="wpie-item_heading_label">
	        <?php esc_html_e( 'Menu Type', 'flexi-menu'  ); ?>
        </span>
		<span class="wpie-item_heading_type"></span>
		<span class="wpie-item_heading_toogle">
        <span class="wpie-icon wpie_icon-chevron-down"></span>
        <span class="wpie-icon wpie_icon-chevron-up "></span>
    </span>
	</summary>
	<div class="wpie-item_content">

		<div class="wpie-fieldset">
			<div class="wpie-fields">
				<?php $field->create( 'menu_type' ); ?>
				<?php $field->create( 'menu_position' ); ?>
				<?php $field->create( 'menu_selector' ); ?>
				<?php $field->create( 'menu_action' ); ?>
				<?php $field->create( 'menu_out' ); ?>
			</div>
		</div>
	</div>
</details>