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

return [
  '@import' => $filter->apply('path', './element.php', $file), 
  'name' => 'teaser_item', 
  'title' => 'Item', 
  'width' => 500, 
  'placeholder' => [
    'props' => [
      'title' => 'Item Title', 
      'price' => '$0', 
      'price_old' => '', 
      'label' => '', 
      'meta' => '', 
      'content' => 'Lorem ipsum dolor sit amet.', 
      'image' => '', 
      'icon' => '', 
      'panel_style' => '', 
      'panel_custom_text_color' => ''
    ]
  ], 
  'templates' => [
    'render' => $filter->apply('path', './templates/template.php', $file)
  ], 
  'fields' => [
    'item_attrs' => [
      'label' => 'Attributes', 
      'type' => 'content-items', 
      'title' => 'title', 
      'item' => 'teaser_attrs', 
      'media' => [
        'type' => 'image', 
        'item' => [
          'image' => 'src'
        ]
      ]
    ], 
    'title' => [
      'label' => 'Title', 
      'type' => 'text', 
      'default' => 'Item Title', 
      'description' => 'Enter the leader title. This field is required to display leader item.', 
      'source' => true
    ], 
    'price' => [
      'label' => 'Price', 
      'type' => 'text', 
      'default' => '$0', 
      'description' => 'Enter the price value. This field is required to display leader item.', 
      'source' => true
    ], 
    'price_old' => [
      'label' => 'Old Price', 
      'type' => 'text', 
      'default' => '', 
      'description' => 'Enter the old price value. It will appear strikethrough.', 
      'enable' => 'price', 
      'source' => true
    ], 
    'currency' => [
      'label' => 'Currency', 
      'type' => 'text', 
      'description' => 'Enter a currency symbol.', 
      'enable' => 'price', 
      'source' => true
    ], 
    'label' => [
      'label' => 'Label', 
      'type' => 'text', 
      'default' => '', 
      'description' => 'Enter the label text.', 
      'source' => true
    ], 
    'label_color' => [
      'label' => 'Label Color', 
      'description' => 'Set the label color.', 
      'default' => '', 
      'type' => 'select', 
      'options' => [
        'Default' => '', 
        'Success' => 'success', 
        'Warning' => 'warning', 
        'Danger' => 'danger', 
        'Custom' => 'custom'
      ], 
      'source' => true, 
      'enable' => 'label'
    ], 
    'label_custom_color' => [
      'label' => 'Custom Label Color', 
      'default' => '#000000', 
      'type' => 'color', 
      'source' => true, 
      'show' => 'label && label_color == \'custom\''
    ], 
    'meta' => [
      'label' => 'Meta', 
      'type' => 'text', 
      'default' => '', 
      'description' => 'Enter the meta text.', 
      'source' => true
    ], 
    'content' => [
      'label' => 'Content', 
      'type' => 'editor', 
      'default' => 'Lorem ipsum dolor sit amet.', 
      'description' => 'Enter the content text.', 
      'source' => true
    ], 
    'image' => $config->get('builder.image'), 
    'image_alt' => [
      'label' => 'Image Alt', 
      'description' => 'Enter image alternative text.', 
      'enable' => 'image', 
      'source' => true
    ], 
    'image_title' => [
      'label' => 'Image Title', 
      'source' => true, 
      'enable' => 'image'
    ], 
    'image_attrs_tag' => [
      'label' => 'Image Attributes', 
      'description' => 'Define one or more attributes for the Image element. Separate attribute name and value by <code>=</code> character. One attribute per line. Examples: <code>itemprop=image</code> <code>decoding=&quot;async&quot;</code>', 
      'type' => 'editor', 
      'editor' => 'code', 
      'source' => true, 
      'enable' => 'image', 
      'show' => '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'
    ], 
    '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'
      ], 
      'enable' => '!image'
    ], 
    'link_panel_custom' => [
      'label' => 'Panel Link', 
      'type' => 'link', 
      'description' => 'You can use two different link: one for the panel, and a second for the button also if Lighbox is Enabled.', 
      'attrs' => [
        'placeholder' => 'https://'
      ], 
      'source' => true
    ], 
    'link_panel_custom_item_target' => [
      'type' => 'checkbox', 
      'text' => 'Open the link in a new window', 
      'divider' => true, 
      'enable' => 'link_panel_custom'
    ], 
    'link' => [
      'label' => 'Link', 
      'type' => 'link', 
      'description' => 'Enter or pick a link, an image or a video file.', 
      'attrs' => [
        'placeholder' => 'https://'
      ], 
      'source' => true, 
      'enable' => '!link_connect_modal'
    ], 
    'link_target' => [
      'type' => 'checkbox', 
      'text' => 'Open the link in a new window', 
      'enable' => 'link && !link_connect_modal && !link_toggle'
    ], 
    'link_toggle' => [
      'type' => 'checkbox', 
      'text' => 'Add \'uk-toggle\' attribute', 
      'enable' => 'link && !link_connect_modal && !link_target'
    ], 
    'link_connect_custom_modal' => [
      'type' => 'checkbox', 
      'text' => 'Display link target in the modal', 
      'show' => 'link && link_toggle && !link_connect_modal && !link_target'
    ], 
    'link_connect_modal' => [
      'type' => 'checkbox', 
      'text' => 'Display item content in the modal', 
      'show' => '(!link_toggle && content) || (link_toggle && !link && content)'
    ], 
    'link_connect_modal_image' => [
      'type' => 'checkbox', 
      'text' => 'Display item image in the modal', 
      'enable' => 'link_connect_modal', 
      'show' => '(!link_toggle && link_connect_modal) || (link_toggle && !link && link_connect_modal)'
    ], 
    'link_text' => [
      'label' => 'Link Text', 
      'type' => 'text', 
      'default' => '', 
      'description' => 'Enter the text for the link.', 
      'source' => true
    ], 
    'link_aria_label' => [
      'label' => 'Link ARIA Label', 
      'description' => 'Set a different link ARIA label for this item.', 
      'source' => true, 
      'enable' => 'link'
    ], 
    'link_title' => [
      'label' => 'Link Title', 
      'description' => 'Set a link title attribute for a link tooltips support.', 
      'source' => true
    ], 
    'link_class' => [
      'label' => 'Link Class', 
      'description' => 'Set a custom classes to a link.', 
      'source' => true
    ], 
    'link_attrs_tag' => [
      'label' => 'Link Attributes', 
      'description' => 'Define one or more attributes for the link element. Separate attribute name and value by <code>=</code> character. One attribute per line. Examples: <code>uk-toggle</code> <code>uk-modal</code> <code>rel=nofollow</code> <code>download=&quot;&quot;</code>  <code>rel=nofollow</code>   <code>rel=noreferrer</code> <code>rel=prefetch</code> <code>onclick=&quot;window.print();&quot;</code>. For multiple rel attributes use <code>rel=&quot;nofollow noreferrer&quot;</code>', 
      'type' => 'editor', 
      'editor' => 'code', 
      'source' => true
    ], 
    'hover_image' => [
      'label' => 'Hover Image', 
      'description' => 'Select an optional image that appears on hover.', 
      'type' => 'image', 
      'source' => true
    ], 
    'tags' => [
      'label' => 'Tags', 
      'type' => 'text', 
      'description' => 'Enter a comma-separated list of tags, for example, <code>blue, white, black</code>.', 
      'source' => true
    ], 
    'rating' => [
      'label' => 'Rating', 
      'type' => 'text', 
      'description' => 'Enter rating value from 1 to 5. You can also enter not integer values like: <code>2.5</code>, <code>3.5</code>, <code>4.5</code>', 
      'source' => true
    ], 
    'rating_aria_label_item' => [
      'label' => 'Label', 
      'type' => 'text', 
      'description' => 'The aria-label attribute is used to define a string that labels the current element.', 
      'default' => 'Rating of this product', 
      'source' => true, 
      'enable' => 'rating', 
      'show' => 'rating'
    ], 
    'item_visibility' => [
      'label' => 'Visibility', 
      'description' => 'Show or hide the content on this device width and larger. If all elements are hidden, columns, rows and sections will hide accordingly.', 
      'type' => 'select', 
      'options' => [
        'Always' => '', 
        'Visible Small (Phone Landscape)' => 'uk-visible@s', 
        'Visible Medium (Tablet Landscape)' => 'uk-visible@m', 
        'Visible Large (Desktop)' => 'uk-visible@l', 
        'Visible X-Large (Large Screens)' => 'uk-visible@xl', 
        'Hidden Small (Phone Landscape)' => 'uk-hidden@s', 
        'Hidden Medium (Tablet Landscape)' => 'uk-hidden@m', 
        'Hidden Large (Desktop)' => 'uk-hidden@l', 
        'Hidden X-Large (Large Screens)' => 'uk-hidden@xl'
      ]
    ], 
    'panel_style' => [
      'label' => 'Style', 
      'description' => 'Select one of the boxed card styles.', 
      'type' => 'select', 
      'options' => [
        'None' => '', 
        'Card Default' => 'card-default', 
        'Card Primary' => 'card-primary', 
        'Card Secondary' => 'card-secondary', 
        'Card Hover' => 'card-hover', 
        'Custom' => 'card-custom'
      ], 
      'source' => true
    ], 
    'panel_custom_style_color' => [
      'label' => 'Panel Background', 
      'default' => '#E3E3E3', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\'', 
      'show' => 'panel_style == \'card-custom\''
    ], 
    'panel_border_radius' => [
      'label' => 'Panel Border Radius', 
      'description' => 'Sets panel border radius.', 
      'type' => 'range', 
      'default' => '0', 
      'attrs' => [
        'placeholder' => '0', 
        'min' => 0, 
        'max' => 100, 
        'step' => 1
      ], 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\'', 
      'show' => 'panel_style == \'card-custom\''
    ], 
    'panel_border' => [
      'label' => 'Panel Border', 
      'type' => 'checkbox', 
      'text' => 'Show', 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\'', 
      'show' => 'panel_style == \'card-custom\''
    ], 
    'panel_border_type' => [
      'label' => 'Panel Border Type', 
      'description' => 'Set a border type.', 
      'default' => 'solid', 
      'type' => 'select', 
      'options' => [
        'Solid' => 'solid', 
        'Dashed' => 'dashed', 
        'Dotted' => 'dotted'
      ], 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\' && panel_border', 
      'show' => 'panel_style == \'card-custom\' && panel_border'
    ], 
    'panel_border_size' => [
      'label' => 'Panel Border Size', 
      'description' => 'Sets panel border size.', 
      'type' => 'range', 
      'default' => '1', 
      'attrs' => [
        'placeholder' => '0', 
        'min' => 1, 
        'max' => 50, 
        'step' => 1
      ], 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\' && panel_border', 
      'show' => 'panel_style == \'card-custom\' && panel_border'
    ], 
    'panel_border_color' => [
      'label' => 'Panel Border Color', 
      'default' => '#000000', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\'', 
      'show' => 'panel_border && panel_style == \'card-custom\''
    ], 
    'panel_custom_text_color' => [
      'label' => 'Text Color', 
      'description' => 'Set Color mode for text, buttons and controls. Dark and Light option will affect only when Panel style set to Custom', 
      'type' => 'select', 
      'options' => [
        'None' => '', 
        'Light' => 'light', 
        'Dark' => 'dark', 
        'Selected Color' => 'selected', 
        'Custom' => 'custom'
      ], 
      'source' => true
    ], 
    'item_master_custom_color' => [
      'label' => 'Master Color', 
      'description' => 'Set custom color for all content fields for selected item.', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_custom_text_color == \'selected\'', 
      'show' => 'panel_custom_text_color == \'selected\''
    ], 
    'item_title_custom_color' => [
      'label' => 'Title Color', 
      'description' => 'Set custom Title color for selected item.', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_custom_text_color == \'custom\'', 
      'show' => 'panel_custom_text_color == \'custom\''
    ], 
    'item_meta_custom_color' => [
      'label' => 'Meta Color', 
      'description' => 'Set custom Meta color for selected item.', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_custom_text_color == \'custom\'', 
      'show' => 'panel_custom_text_color == \'custom\''
    ], 
    'item_content_custom_color' => [
      'label' => 'Content Color', 
      'description' => 'Set custom Content color for selected item.', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_custom_text_color == \'custom\'', 
      'show' => 'panel_custom_text_color == \'custom\''
    ], 
    'item_icon_custom_color' => [
      'label' => 'Icon Color', 
      'description' => 'Set custom Icon color for selected item.', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_custom_text_color == \'custom\'', 
      'show' => 'panel_custom_text_color == \'custom\''
    ], 
    'item_attrs_custom_color' => [
      'label' => 'Attributes Color', 
      'description' => 'Set custom Attributes color for selected item.', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_custom_text_color == \'custom\'', 
      'show' => 'panel_custom_text_color == \'custom\''
    ], 
    'item_attributes_icon_custom_color' => [
      'label' => 'Attributes Icon Color', 
      'description' => 'Set custom attributes Icons color for selected item.', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_custom_text_color == \'custom\'', 
      'show' => 'panel_custom_text_color == \'custom\''
    ], 
    'item_price_custom_color' => [
      'label' => 'Price Color', 
      'description' => 'Set custom Price color for selected item.', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_custom_text_color == \'custom\'', 
      'show' => 'panel_custom_text_color == \'custom\''
    ], 
    'item_price_currency_custom_color' => [
      'label' => 'Price Currency Color', 
      'description' => 'Set currency symbol color for price.', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_custom_text_color == \'custom\'', 
      'show' => 'panel_custom_text_color == \'custom\''
    ], 
    'item_old_price_custom_color' => [
      'label' => 'Old Price Color', 
      'description' => 'Set custom Old Price color for selected item.', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_custom_text_color == \'custom\'', 
      'show' => 'panel_custom_text_color == \'custom\''
    ], 
    'item_old_price_currency_custom_color' => [
      'label' => 'Old Price Currency Color', 
      'description' => 'Set currency symbol color for old price', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_custom_text_color == \'custom\'', 
      'show' => 'panel_custom_text_color == \'custom\''
    ], 
    'item_button_style' => [
      'label' => 'Style', 
      'description' => 'Set the link style.', 
      'type' => 'select', 
      'options' => [
        'Default' => '', 
        'Button Default' => 'default', 
        'Button Primary' => 'primary', 
        'Button Secondary' => 'secondary', 
        'Button Danger' => 'danger', 
        'Button Text' => 'text', 
        'Button Circle Custom' => 'circle', 
        'Button Custom' => 'button-custom'
      ], 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\'', 
      'show' => 'panel_style == \'card-custom\''
    ], 
    'item_button_custom_bg_color' => [
      'label' => 'Button Background', 
      'default' => '#000000', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' || item_button_style == \'button-custom\')', 
      'show' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' || item_button_style == \'button-custom\')'
    ], 
    'item_button_custom_border_radius' => [
      'label' => 'Button Border radius', 
      'description' => 'Sets Button border radius.', 
      'type' => 'range', 
      'default' => '0', 
      'attrs' => [
        'placeholder' => '0', 
        'min' => 0, 
        'max' => 50, 
        'step' => 1
      ], 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' || item_button_style == \'button-custom\')', 
      'show' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' || item_button_style == \'button-custom\')'
    ], 
    'item_button_custom_text_color' => [
      'label' => 'Button Text Color', 
      'default' => '#ffffff', 
      'description' => 'Set custom Button Text color for selected item.', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\' && item_button_style == \'button-custom\'', 
      'show' => 'panel_style == \'card-custom\' && item_button_style == \'button-custom\''
    ], 
    'item_button_icon_color' => [
      'label' => 'Icon Color', 
      'description' => 'Set the icon color. Select button style = circle to activate.', 
      'type' => 'select', 
      'options' => [
        'None' => '', 
        'Muted' => 'muted', 
        'Emphasis' => 'emphasis', 
        'Primary' => 'primary', 
        'Secondary' => 'secondary', 
        'Success' => 'success', 
        'Warning' => 'warning', 
        'Danger' => 'danger', 
        'Custom' => 'custom'
      ], 
      'enable' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\')', 
      'show' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\')'
    ], 
    'item_button_custom_icon_color' => [
      'label' => 'Button Icon Color', 
      'default' => '#ffffff', 
      'description' => 'Set custom Button Icon color for selected item.', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' && item_button_icon_color == \'custom\')', 
      'show' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' && item_button_icon_color == \'custom\')'
    ], 
    'item_button_custom_border' => [
      'label' => 'Button Border', 
      'type' => 'checkbox', 
      'text' => 'Show', 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' || item_button_style == \'button-custom\')', 
      'show' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' || item_button_style == \'button-custom\')'
    ], 
    'item_button_custom_border_color' => [
      'label' => 'Button Border Color', 
      'default' => '#000000', 
      'type' => 'color', 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' || item_button_style == \'button-custom\') && item_button_custom_border', 
      'show' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' || item_button_style == \'button-custom\') && item_button_custom_border'
    ], 
    'item_button_custom_border_size' => [
      'label' => 'Button Border Size', 
      'description' => 'Sets Button border size.', 
      'type' => 'range', 
      'default' => '1', 
      'attrs' => [
        'placeholder' => '0', 
        'min' => 1, 
        'max' => 50, 
        'step' => 1
      ], 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' || item_button_style == \'button-custom\') && item_button_custom_border', 
      'show' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' || item_button_style == \'button-custom\') && item_button_custom_border'
    ], 
    'item_button_custom_border_type' => [
      'label' => 'Button Border Type', 
      'description' => 'Set a border type.', 
      'default' => 'solid', 
      'type' => 'select', 
      'options' => [
        'Solid' => 'solid', 
        'Dashed' => 'dashed', 
        'Dotted' => 'dotted'
      ], 
      'source' => true, 
      'enable' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' || item_button_style == \'button-custom\') && item_button_custom_border', 
      'show' => 'panel_style == \'card-custom\' && (item_button_style == \'circle\' || item_button_style == \'button-custom\') && item_button_custom_border'
    ], 
    'item_id' => [
      'label' => 'Item ID', 
      'description' => 'Define a unique identifier for the element.', 
      'source' => true
    ], 
    'item_class' => [
      'label' => 'Item Classes', 
      'description' => 'Define one or more class names for the element. Separate multiple classes with spaces.', 
      'source' => true
    ], 
    'item_attrs_tag' => [
      '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', 
      'source' => true
    ], 
    'status' => $config->get('builder.statusItem'), 
    'source' => $config->get('builder.source')
  ], 
  'fieldset' => [
    'default' => [
      'type' => 'tabs', 
      'fields' => [[
          'title' => 'Content', 
          'fields' => ['title', 'meta', 'content', 'price', 'price_old', 'currency', 'item_attrs', 'label', 'label_color', 'label_custom_color', 'image', 'image_alt', 'image_title', 'image_attrs_tag', 'icon', 'icon_color', 'link_panel_custom', 'link_panel_custom_item_target', 'link', 'link_target', 'link_toggle', 'link_connect_modal', 'link_connect_modal_image', 'link_connect_custom_modal', 'link_text', 'link_title', 'link_aria_label', 'link_class', 'link_attrs_tag', 'hover_image', 'tags', 'rating', 'rating_aria_label_item', 'item_visibility']
        ], [
          'title' => 'Settings', 
          'fields' => [[
              'label' => 'Panel', 
              'type' => 'group', 
              'fields' => ['panel_style', 'panel_custom_style_color', 'panel_border_radius', 'panel_border', 'panel_border_size', 'panel_border_type', 'panel_border_color']
            ], [
              'label' => 'Content', 
              'type' => 'group', 
              'fields' => ['panel_custom_text_color', 'item_master_custom_color', 'item_title_custom_color', 'item_meta_custom_color', 'item_content_custom_color', 'item_icon_custom_color', 'item_price_custom_color', 'item_price_currency_custom_color', 'item_old_price_custom_color', 'item_old_price_currency_custom_color', 'item_attrs_custom_color', 'item_attributes_icon_custom_color']
            ], [
              'label' => 'Button', 
              'type' => 'group', 
              'fields' => ['item_button_style', 'item_button_custom_bg_color', 'item_button_custom_border_radius', 'item_button_custom_text_color', 'item_button_icon_color', 'item_button_custom_icon_color', 'item_button_custom_border', 'item_button_custom_border_color', 'item_button_custom_border_size', 'item_button_custom_border_type'], 
              'show' => 'panel_style == \'card-custom\''
            ], 'item_id', 'item_class', 'item_attrs_tag']
        ], $config->get('builder.advanced')]
    ]
  ]
];
