<?php
/**
 * Settings
 *
 * @package     Wow_Plugin
 * @copyright   Copyright (c) 2018, Dmytro Lobov
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
 * @since       1.0
 */

if ( !defined( 'ABSPATH' ) ) {
  exit;
}

include_once('settings/menu.php');
?>

<div class="adding-menu-1">
  <?php if ( $count_i > 0 ) {
    for ( $i = 0; $i < $count_i; $i++ ) { ?>
      <fieldset class="itembox">
        <legend>
          <?php esc_attr_e( 'Item ', 'side-menu' ); ?><?php echo $i + 1; ?>
        </legend>
        <div class="control">
          <span class="dashicons dashicons-move"></span>
          <span class="dashicons dashicons-minus toogle"></span>
          <span class="dashicons dashicons-plus toogle"></span>
          <span class="dashicons dashicons-no-alt item-del"></span>
        </div>
        <div class="menu_block">
          <div class="container">
            <div class="element">
              <?php esc_attr_e( 'Icon', 'side-menu' ); ?>
              (<?php esc_attr_e( 'custom', 'side-menu' ); ?>
              <?php echo self::option( $item_custom_[ $i ] ); ?>)
              <?php echo self::tooltip( $item_icon_help ); ?>
              <br/>
              <?php echo self::option( $item_icon_[ $i ] ); ?>
              <?php echo self::option( $item_custom_link_[ $i ] ); ?>

            </div>
            <div class="element">
              <?php esc_attr_e( 'Label Text', 'side-menu' ); ?> <?php echo self::tooltip( $item_tooltip_help ); ?>
              <br/>
              <?php echo self::option( $item_tooltip_[ $i ] ); ?>
            </div>
            <div class="element">
              <?php echo self::option( $hold_open_[ $i ] ); ?>
              <?php esc_attr_e( 'Hold open', 'side-menu' ); ?>
              <?php echo self::tooltip( $hold_open_help ); ?>
            </div>
          </div>
          <div class="container">
            <div class="element">
              <?php esc_attr_e( 'Item type', 'side-menu' ); ?> <?php echo self::tooltip( $item_type_help ); ?><br/>
              <?php echo self::option( $item_type_[ $i ] ); ?>
            </div>
            <div class="element type-param">
              <div class="type-link">
                <span class="type-link-text">Link</span>
                <br/>
                <?php echo self::option( $item_link_[ $i ] ); ?>
              </div>
              <div class="type-share">
                <?php esc_attr_e( 'Social Networks', 'side-menu' ); ?><br/>
                <?php echo self::option( $item_share_[ $i ] ); ?>
              </div>
              <div class="type-modal">
                <?php esc_attr_e( 'Enter value', 'side-menu' ); ?>: <br/>
                <?php echo self::option( $item_modal_[ $i ] ); ?>
                <?php esc_attr_e( '(e.g.: wow-modal-id-1)', 'side-menu' ); ?>
              </div>
            </div>
            <div class="element type-link-blank">
              <?php echo self::option( $new_tab_[ $i ] ); ?>
              <?php esc_attr_e( 'Open in new window', 'side-menu' ); ?>
            </div>
          </div>

          <div class="container">
            <div class="element">
              <?php esc_attr_e( 'Font Сolor', 'side-menu' ); ?><br/>
              <?php echo self::option( $color_[ $i ] ); ?>
            </div>
            <div class="element">
              <?php esc_attr_e( 'Icon Сolor', 'side-menu' ); ?><br/>
              <?php echo self::option( $iconcolor_[ $i ] ); ?>
            </div>
            <div class="element">
              <?php esc_attr_e( 'Background', 'side-menu' ); ?><br/>
              <?php echo self::option( $bcolor_[ $i ] ); ?>
            </div>
          </div>

          <div class="container">
            <div class="element">
              <?php esc_attr_e( 'Background Hover', 'side-menu' ); ?><br/>
              <?php echo self::option( $hbcolor_[ $i ] ); ?>
            </div>
            <div class="element button_id">
              <?php esc_attr_e( 'ID for element', 'side-menu' ); ?>
              <?php echo self::tooltip( $button_id_help ); ?>
              <br/>
              <?php echo self::option( $button_id_[ $i ] ); ?>
            </div>
            <div class="element button_class">
              <?php esc_attr_e( 'Class for element', 'side-menu' ); ?>
              <?php echo self::tooltip( $button_class_help ); ?>
              <br/>
              <?php echo self::option( $button_class_[ $i ] ); ?>
            </div>

          </div>
        </div>
      </fieldset>
      <?php
    }
  }
  ?>
</div>

<div class="submit-bottom">
  <input type="button" value="<?php esc_attr_e( 'Add item', 'side-menu' ); ?>" class="add-item" onclick="itemadd(1)">
</div>
