<?php // $file = /home/bluedoor/www/dev/wp-content/plugins/fs-teaser/includes/element/fs_teaser_attrs/element.json

return [
  '@import' => $filter->apply('path', './element.php', $file), 
  'name' => 'teaser_attrs', 
  'title' => 'Attribute', 
  'width' => 500, 
  'defaults' => [], 
  'placeholder' => [
    'props' => [
      'title' => 'Title', 
      'value' => 'Value', 
      'image' => '', 
      'icon' => ''
    ]
  ], 
  'templates' => [
    'render' => $filter->apply('path', './templates/template.php', $file)
  ], 
  'fields' => [
    'title' => [
      'label' => 'Title', 
      'type' => 'text', 
      'default' => 'Title', 
      'source' => true
    ], 
    'value' => [
      'label' => 'Value', 
      'type' => 'text', 
      'default' => 'Value', 
      'source' => true
    ], 
    'modal_content' => [
      'label' => 'Modal Content', 
      'type' => 'editor', 
      'default' => 'Lorem ipsum dolor sit amet.', 
      'description' => 'Enter the content text.', 
      'source' => true, 
      'attrs' => [
        'debounce' => 1500
      ]
    ], 
    'image' => $config->get('builder.image'), 
    'image_alt' => [
      'label' => 'Image Alt', 
      'source' => true, 
      'enable' => 'image'
    ], 
    'icon' => [
      'label' => 'Icon', 
      'description' => 'Instead of using a custom image, you can click on the pencil to pick an icon from the icon library.', 
      'type' => 'icon', 
      'source' => true, 
      'enable' => '!image'
    ], 
    'attrs_item_icon_color' => [
      'label' => 'Icon Color', 
      'description' => 'Set the icon color.', 
      'type' => 'select', 
      'options' => [
        'None' => '', 
        'Muted' => 'muted', 
        'Emphasis' => 'emphasis', 
        'Primary' => 'primary', 
        'Secondary' => 'secondary', 
        'Success' => 'success', 
        'Warning' => 'warning', 
        'Danger' => 'danger', 
        'Custom' => 'custom'
      ], 
      'enable' => '!image'
    ], 
    'attrs_item_icon_custom_color' => [
      'label' => 'Custom Icon Color', 
      'default' => '#000000', 
      'type' => 'color', 
      'source' => true, 
      'show' => '!image && icon && attrs_item_icon_color == \'custom\''
    ], 
    'attrs_link' => [
      'label' => 'Link', 
      'type' => 'link', 
      'description' => 'Enter or pick a link, an image or a video file.', 
      'attrs' => [
        'placeholder' => 'https://'
      ], 
      'source' => true, 
      'enable' => '!attrs_link_connect_modal'
    ], 
    'attrs_link_target' => [
      'type' => 'checkbox', 
      'text' => 'Open the link in a new window', 
      'enable' => 'attrs_link && !attrs_link_connect_modal && !attrs_link_toggle'
    ], 
    'attrs_link_toggle' => [
      'type' => 'checkbox', 
      'text' => 'Add \'uk-toggle\' attribute', 
      'enable' => 'attrs_link && !attrs_link_connect_modal && !attrs_link_target'
    ], 
    'attrs_link_connect_custom_modal' => [
      'type' => 'checkbox', 
      'text' => 'Display link target in the modal', 
      'show' => 'attrs_link && attrs_link_toggle && !attrs_link_connect_modal && !attrs_link_target'
    ], 
    'attrs_link_connect_modal' => [
      'type' => 'checkbox', 
      'text' => 'Link Modal Content', 
      'show' => '!attrs_link_toggle && modal_content || (attrs_link_toggle && !attrs_link && modal_content)'
    ], 
    'attrs_link_connect_modal_image' => [
      'type' => 'checkbox', 
      'text' => 'Display item image in the modal', 
      'enable' => 'attrs_link_connect_modal', 
      'show' => '(!attrs_link_toggle && attrs_link_connect_modal) || (attrs_link_toggle && !attrs_link && attrs_link_connect_modal)'
    ], 
    'attrs_item_id' => [
      'label' => 'Item ID', 
      'description' => 'Define a unique identifier for the element.', 
      'source' => true
    ], 
    'attrs_item_class' => [
      'label' => 'Item Classes', 
      'description' => 'Define one or more class names for the element. Separate multiple classes with spaces.', 
      'source' => true
    ], 
    'attrs_item_attrs_tags' => [
      'label' => 'Item Attributes', 
      'description' => 'Define one or more attributes for the element. Separate attribute name and value by <code>=</code> character. One attribute per line.', 
      'type' => 'editor', 
      'editor' => 'code', 
      'attrs' => [
        'debounce' => 500
      ], 
      'source' => true
    ], 
    'status' => $config->get('builder.statusItem'), 
    'source' => $config->get('builder.source')
  ], 
  'fieldset' => [
    'default' => [
      'type' => 'tabs', 
      'fields' => [[
          'title' => 'Content', 
          'fields' => ['title', 'value', 'modal_content', 'image', 'image_alt', 'icon', 'attrs_item_icon_color', 'attrs_item_icon_custom_color', 'attrs_link', 'attrs_link_target', 'attrs_link_toggle', 'attrs_link_connect_custom_modal', 'attrs_link_connect_modal', 'attrs_link_connect_modal_image']
        ], [
          'title' => 'Settings', 
          'fields' => ['attrs_item_id', 'attrs_item_class', 'attrs_item_attrs_tags']
        ], $config->get('builder.advancedItem')]
    ]
  ]
];
