<?php // $file = /home/senobar1/public_html/1/plugins/system/djsectionsanywhere/modules/builder/elements/djtoggle_button_item/element.json

return [
  '@import' => $filter->apply('path', './element.php', $file), 
  'name' => 'djsectionsanywhere_button_item', 
  'group' => 'DJ-SectionsAnywhere', 
  'title' => 'Button', 
  'width' => 500, 
  'defaults' => [
    'button_style' => 'default', 
    'icon_align' => 'left', 
    'mode' => 'click', 
    'duration' => 200, 
    'queued' => true, 
    'show_btn' => 'Show', 
    'hide_btn' => 'Hide', 
    'initial_state' => 'show'
  ], 
  'placeholder' => [
    'props' => [
      'show_btn' => 'Show', 
      'hide_btn' => 'Hide', 
      'link' => '#', 
      'show_icon' => ''
    ]
  ], 
  'templates' => [
    'render' => $filter->apply('path', './templates/template.php', $file), 
    'show_btn' => $filter->apply('path', './templates/content.php', $file)
  ], 
  'fields' => [
    'show_btn' => [
      'label' => 'Show label', 
      'type' => 'text', 
      'source' => true
    ], 
    'show_icon' => [
      'label' => 'Show Icon', 
      'description' => 'Pick an optional icon from the icon library.', 
      'type' => 'icon', 
      'source' => true
    ], 
    'hide_btn' => [
      'label' => 'Hide label', 
      'type' => 'text', 
      'source' => true
    ], 
    'hide_icon' => [
      'label' => 'Hide Icon', 
      'description' => 'Pick an optional icon from the icon library.', 
      'type' => 'icon', 
      'source' => true
    ], 
    'target' => [
      'label' => 'Target', 
      'description' => 'Select the row for which the button is to be used.', 
      'type' => 'DJToggleSelect', 
      'source' => true, 
      'required' => true
    ], 
    'button_style' => [
      'label' => 'Style', 
      'description' => 'Set the button style.', 
      'type' => 'select', 
      'options' => [
        'Default' => 'default', 
        'Primary' => 'primary', 
        'Secondary' => 'secondary', 
        'Danger' => 'danger', 
        'Text' => 'text', 
        'Link' => '', 
        'Link Muted' => 'link-muted', 
        'Link Text' => 'link-text'
      ]
    ], 
    'icon_align' => [
      'label' => 'Alignment', 
      'description' => 'Choose the icon position.', 
      'type' => 'select', 
      'options' => [
        'Left' => 'left', 
        'Right' => 'right'
      ], 
      'enable' => 'show_icon'
    ], 
    'status' => $config->get('builder.statusItem'), 
    'source' => $config->get('builder.source'), 
    'mode' => [
      'label' => 'Mode', 
      'description' => 'Set the trigger behaviour mode.', 
      'type' => 'select', 
      'options' => [
        'Click' => 'click'
      ]
    ], 
    'show_animation' => [
      'label' => 'Show Animation', 
      'description' => 'Choose an animation to use from the list of <a href="https://getuikit.com/docs/animation">animations</a>.', 
      'type' => 'select', 
      'default' => 'false', 
      'options' => [
        'None' => 'false', 
        'Fade' => 'fade', 
        'Scale Up' => 'scale-up', 
        'Scale Down' => 'scale-down', 
        'Slide Top' => 'slide-top', 
        'Slide Bottom' => 'slide-bottom', 
        'Slide Left' => 'slide-left', 
        'Slide Right' => 'slide-right', 
        'Slide Top Small' => 'slide-top-small', 
        'Slide Bottom Small' => 'slide-bottom-small', 
        'Slide Left Small' => 'slide-left-small', 
        'Slide Right Small' => 'slide-right-small', 
        'Slide Top Medium' => 'slide-top-medium', 
        'Slide Bottom Medium' => 'slide-bottom-medium', 
        'Slide Left Medium' => 'slide-left-medium', 
        'Slide Right Medium' => 'slide-right-medium', 
        'Ken Burns' => 'ken-burns', 
        'Shake' => 'shake', 
        'Stroke' => 'stroke'
      ]
    ], 
    'hide_animation' => [
      'label' => 'Hide Animation', 
      'description' => 'Choose an animation to use from the list of <a href="https://getuikit.com/docs/animation">animations</a>.', 
      'type' => 'select', 
      'default' => 'false', 
      'options' => [
        'None' => 'false', 
        'Fade' => 'fade', 
        'Scale Up' => 'scale-up', 
        'Scale Down' => 'scale-down', 
        'Slide Top' => 'slide-top', 
        'Slide Bottom' => 'slide-bottom', 
        'Slide Left' => 'slide-left', 
        'Slide Right' => 'slide-right', 
        'Slide Top Small' => 'slide-top-small', 
        'Slide Bottom Small' => 'slide-bottom-small', 
        'Slide Left Small' => 'slide-left-small', 
        'Slide Right Small' => 'slide-right-small', 
        'Slide Top Medium' => 'slide-top-medium', 
        'Slide Bottom Medium' => 'slide-bottom-medium', 
        'Slide Left Medium' => 'slide-left-medium', 
        'Slide Right Medium' => 'slide-right-medium', 
        'Ken Burns' => 'ken-burns', 
        'Shake' => 'shake', 
        'Stroke' => 'stroke'
      ], 
      'enable' => 'show_animation != \'false\''
    ], 
    'duration' => [
      'label' => 'Duration', 
      'description' => 'Set the animation duration in ms.', 
      'type' => 'number', 
      'source' => true, 
      'enable' => 'toggle_animation != \'false\' || (toggle_animation_use_advanced && toggle_animation_advanced != \'false\')'
    ], 
    'queued' => [
      'label' => 'Queued', 
      'description' => 'Toggle the targets successively.', 
      'type' => 'checkbox', 
      'enable' => '!content2 && target != \'false\''
    ], 
    'initial_state' => [
      'label' => 'Initial state', 
      'type' => 'select', 
      'options' => [
        'Show' => 'show', 
        'Hide' => 'hide'
      ]
    ]
  ], 
  'fieldset' => [
    'default' => [
      'type' => 'tabs', 
      'fields' => [[
          'title' => 'Content', 
          'fields' => ['target', 'initial_state', 'show_btn', 'show_icon', 'hide_btn', 'hide_icon']
        ], [
          'title' => 'Settings', 
          'fields' => [[
              'label' => 'Button', 
              'type' => 'group', 
              'divider' => true, 
              'fields' => ['button_style']
            ], [
              'label' => 'Target', 
              'type' => 'group', 
              'divider' => true, 
              'fields' => ['mode', 'show_animation', 'hide_animation', 'duration', 'queued']
            ], [
              'label' => 'Icon', 
              'type' => 'group', 
              'fields' => ['icon_align']
            ]]
        ], $config->get('builder.advancedItem')]
    ]
  ]
];
