<?php // $file = /home/senobar1/public_html/1/plugins/system/djc2yootheme/modules/builder-djcatalog2-source/elements/filter_range/element.json

return [
  '@import' => $filter->apply('path', './element.php', $file), 
  'name' => 'filter_range', 
  'title' => 'Filter Range', 
  'icon' => $filter->apply('url', 'images/icon.svg', $file), 
  'group' => 'DJ-Catalog2 Filters', 
  'iconSmall' => $filter->apply('url', 'images/iconSmall.svg', $file), 
  'element' => true, 
  'width' => 500, 
  'defaults' => [
    'range_min' => '0', 
    'range_max' => '1000'
  ], 
  'templates' => [
    'render' => $filter->apply('path', './templates/template.php', $file), 
    'content' => $filter->apply('path', './templates/content.php', $file)
  ], 
  'fields' => [
    'information' => [
      'label' => 'information', 
      'type' => 'grid', 
      'description' => 'This element renders filter range. Please make sure that filter_range option for products list is enabled in configuration of DJ-Catalog2.'
    ], 
    'filter_range' => [
      'label' => 'filter_range', 
      'type' => 'editor', 
      'show' => '_filter_range'
    ], 
    'range_min' => [
      'label' => 'Range min.', 
      'type' => 'number'
    ], 
    'range_max' => [
      'label' => 'Range max.', 
      'type' => 'number'
    ], 
    'filter_range_margin' => [
      'label' => 'Margin Top', 
      'description' => 'Set the top margin. Note that the margin will only apply if the content field immediately follows another content field.', 
      'type' => 'select', 
      'options' => [
        'Small' => 'small', 
        'Default' => '', 
        'Medium' => 'medium', 
        'Large' => 'large', 
        'X-Large' => 'xlarge', 
        'None' => 'remove'
      ]
    ], 
    'position_filter_range' => [
      'label' => 'Position', 
      'description' => 'Position the element in the normal content flow, or in normal flow but with an offset relative to itself, or remove it from the flow and position it relative to the containing column.', 
      'type' => 'select', 
      'options' => [
        'Static' => 'static', 
        'Relative' => 'relative', 
        'Absolute' => 'absolute'
      ]
    ], 
    'position_left_filter_range' => [
      'label' => 'Left', 
      'description' => 'Set the horizontal position of the element\'s left edge in pixels. A different unit like % or vw can also be entered.', 
      'type' => 'range', 
      'attrs' => [
        'min' => '-600', 
        'max' => '600', 
        'step' => '10'
      ]
    ], 
    'position_right_filter_range' => [
      'label' => 'Right', 
      'description' => 'Set the horizontal position of the element\'s right edge in pixels. A different unit like % or vw can also be entered.', 
      'type' => 'range', 
      'attrs' => [
        'min' => '-600', 
        'max' => '600', 
        'step' => '10'
      ]
    ], 
    'position_top_filter_range' => [
      'label' => 'Top', 
      'description' => 'Set the horizontal position of the element\'s top edge in pixels. A different unit like % or vw can also be entered.', 
      'type' => 'range', 
      'attrs' => [
        'min' => '-600', 
        'max' => '600', 
        'step' => '10'
      ]
    ], 
    'position_bottom_filter_range' => [
      'label' => 'Bottom', 
      'description' => 'Set the horizontal position of the element\'s bottom edge in pixels. A different unit like % or vw can also be entered.', 
      'type' => 'range', 
      'attrs' => [
        'min' => '-600', 
        'max' => '600', 
        'step' => '10'
      ]
    ], 
    'position_z_index_filter_range' => [
      'label' => 'Z Index', 
      'description' => 'Position the element above or below other elements. If they have the same stack level, the position depends on the order in the layout.', 
      'type' => 'select', 
      'options' => [
        'None' => '', 
        0 => '0', 
        1 => '1', 
        2 => '2', 
        3 => '3'
      ]
    ], 
    'filter_range_width' => [
      'attrs' => [
        'placeholder' => 'auto'
      ]
    ], 
    'filter_range_height' => [
      'attrs' => [
        'placeholder' => 'auto'
      ]
    ], 
    'name' => $config->get('builder.name'), 
    'id' => $config->get('builder.id'), 
    'status' => $config->get('builder.status'), 
    'class' => $config->get('builder.cls'), 
    'attributes' => $config->get('builder.attrs'), 
    'css' => [
      'type' => 'editor', 
      'label' => 'CSS', 
      'description' => 'Enter your own custom CSS. The following selectors will be prefixed automatically for this element: <code>.el-element</code>', 
      'editor' => 'code', 
      'mode' => 'css', 
      'attrs' => [
        'debounce' => 500
      ]
    ]
  ], 
  'fieldset' => [
    'default' => [
      'type' => 'tabs', 
      'fields' => [[
          'title' => 'Options', 
          'fields' => ['information', 'filter_range', 'range_min', 'range_max', [
              'label' => 'filter_range', 
              'type' => 'group', 
              'divider' => true, 
              'fields' => ['filter_range_margin', 'position_filter_range', 'position_left_filter_range', 'position_right_filter_range', 'position_top_filter_range', 'position_bottom_filter_range', 'position_z_index_filter_range', [
                  'label' => 'Width/Height', 
                  'description' => 'Setting just one value preserves the original proportions. The element will be resized automatically.', 
                  'type' => 'grid', 
                  'width' => '1-2', 
                  'fields' => ['filter_range_width', 'filter_range_height']
                ]]
            ]]
        ], $config->get('builder.advanced')]
    ]
  ]
];
