<?php

/**
 * Views class for Shortcode generator options.
 *
 * @link       https://themeatelier.net
 * @since      1.0.0
 *
 * @package domain-for-sale
 * @subpackage domain-for-sale/src/Admin/Views/DomainForSaleMetaboxMainOptions
 * @author     ThemeAtelier<themeatelierbd@gmail.com>
 */

namespace ThemeAtelier\DomainForSale\Admin\Views\Metabox;

use ThemeAtelier\DomainForSale\Admin\Framework\Classes\DOMAIN_FOR_SALE;

class DomainDisplayOption
{
    /**
     * Create Option fields for the setting options.
     *
     * @param string $prefix Option setting key prefix.
     * @return void
     */
    public static function options($prefix)
    {
        // Main options
        DOMAIN_FOR_SALE::createSection(
            $prefix,
            array(
                'title'  => esc_html__('Display Options', 'domain-for-sale'),
                'icon'   => 'icofont-ui-settings',
                'fields' => array(
                    array(
                        'id'         => 'domain_number_of_columns',
                        'type'       => 'column',
                        'title'      => esc_html__('Column(s)', 'domain-for-sale'),
                        'desc' => esc_html__('Set number of column(s) in different devices for responsive view.', 'domain-for-sale'),
                        'title_help' => '<i class="icofont-imac"></i> <b>' . esc_html__('Large Desktop', 'domain-for-sale') . '</b> - ' . esc_html__('width', 'domain-for-sale') . ' &gt; 1200px<br>' . '<i class="icofont-monitor"></i> <b>' . esc_html__('Desktop', 'domain-for-sale') . '</b> - ' . esc_html__('width', 'domain-for-sale') . ' &gt; 992px<br>' . '<i class="icofont-laptop-alt"></i> <b>' . esc_html__('Tablet', 'domain-for-sale') . '</b> - ' . esc_html__('width', 'domain-for-sale') . ' &gt; 768px<br>' .
                            '<i class="icofont-ipad"></i> <b>' . esc_html__('Mobile Landscape', 'domain-for-sale') . '</b> - ' . esc_html__('width', 'domain-for-sale') . ' &gt; 576px<br>' . '<i class="icofont-android-tablet"></i> <b>' . esc_html__('Mobile', 'domain-for-sale') . '</b> - ' . esc_html__('width', 'domain-for-sale') . ' &lt;= 576px',
                        'default'    => array(
                            'lg_desktop'       => '3',
                            'desktop'          => '3',
                            'tablet'           => '2',
                            'mobile_landscape' => '2',
                            'mobile'           => '1',
                        ),
                        'min'        => '1',
                        'dependency' => array('listing_layout_preset', 'any', 'grid_layout', true),

                    ),
                    array(
                        'id'         => 'margin_between_domain',
                        'type'       => 'spacing',
                        'title'      => esc_html__('Margin Between Columns', 'domain-for-sale'),
                        'subtitle' => esc_html__('Set margin between columns (items).', 'domain-for-sale'),
                        'all'        => true,
                        'all_icon'   => '<i class="icofont-drag"></i>',
                        'units'      => array('px'),
                        'all_placeholder' => 'margin',
                        'default'    => array('all' => '20'),
                        'dependency' => array('listing_layout_preset', 'any', 'grid_layout', true),
                    ),
                    array(
                        'id'         => 'item_same_height',
                        'type'       => 'switcher',
                        'title'      => esc_html__('Same Height', 'domain-for-sale'),
                        'subtitle' => esc_html__('Enable to make all items/slides the same height as the tallest one.', 'domain-for-sale'),
                        'default'    => false,
                        'text_on'    => esc_html__('Enabled', 'domain-for-sale'),
                        'text_off'   => esc_html__('Disabled', 'domain-for-sale'),
                        'text_width' => 94,
                        'class'      => 'switcher_pro_only',
                        'dependency' => array('listing_layout_preset', 'any', 'grid_layout', true),
                    ),
                    array(
                        'id'       => 'domain_border',
                        'type'     => 'border',
                        'title'    => esc_html__('Border', 'domain-for-sale'),
                        'subtitle' => esc_html__('Set border for the item.', 'domain-for-sale'),
                        'all'      => true,
                        'default'  => array(
                            'all'   => '0',
                            'style' => 'solid',
                        ),
                    ),
                    array(
                        'id'       => 'domain_border_radius',
                        'type'     => 'spacing',
                        'title'    => esc_html__('Border Radius', 'domain-for-sale'),
                        'subtitle' => esc_html__('Set border radius for item.', 'domain-for-sale'),
                        'all'      => true,
                        'units'    => array('px', '%'),
                        'default'  => array(
                            'all' => '10',
                        ),
                    ),
                    array(
                        'id'       => 'show_domain_box_shadow',
                        'type'     => 'checkbox',
                        'title'    => esc_html__('Box-Shadow', 'domain-for-sale'),
                        'subtitle' => esc_html__('Show box-shadow for the item.', 'domain-for-sale'),
                        'default'  => true,
                    ),
                    array(
                        'id'         => 'domain_box_shadow',
                        'type'       => 'box_shadow',
                        'title'      => esc_html__('Box-Shadow Values', 'domain-for-sale'),
                        'subtitle' => esc_html__('Set box-shadow property values for the item.', 'domain-for-sale'),
                        'default'    => array(
                            'horizontal' => '0',
                            'vertical'   => '0',
                            'blur'       => '6',
                            'spread'     => '-2',
                            'color'      => 'rgb(187, 187, 187)',
                        ),
                        'dependency' => array('show_domain_box_shadow', '==', 'true'),
                    ),
                    array(
                        'id'       => 'domain_inner_padding',
                        'type'     => 'spacing',
                        'units'    => array('px'),
                        'title'    => esc_html__('Inner Padding', 'domain-for-sale'),
                        'subtitle' => esc_html__('Set inner padding for item.', 'domain-for-sale'),
                        'default'  => array(
                            'top'    => '15',
                            'right'  => '15',
                            'bottom' => '15',
                            'left'   => '15',
                            'unit'   => 'px',
                        ),
                    ),
                    array(
                        'id'       => 'domain_background',
                        'type'     => 'color_group',
                        'title'    => esc_html__('Background', 'domain-for-sale'),
                        'subtitle' => esc_html__('Set background color for the item.', 'domain-for-sale'),
                        'options'   => array(
                            'color'       => esc_html__('Color', 'domain-for-sale'),
                        ),
                        'default'  => array(
                            'color'       => '',
                        ),
                    ),
                    array(
                        'id'         => 'show_domain_content',
                        'type'       => 'switcher',
                        'title'      => esc_html__('Content', 'domain-for-sale'),
                        'subtitle' => esc_html__('Show/Hide Sale Content.', 'domain-for-sale'),
                        'text_on'    => esc_html__('Show', 'domain-for-sale'),
                        'text_off'   => esc_html__('Hide', 'domain-for-sale'),
                        'text_width' => 80,
                        'default'    => true,
                        'class'      => 'switcher_pro_only',
                    ),
                    array(
                        'id'              => 'domain_content_length',
                        'type'            => 'spacing',
                        'class'            => 'domain_content_length',
                        'title'           => __('Content Length', 'domain-for-sale'),
                        'subtitle'        => __('Leave it empty to show full domain content.', 'domain-for-sale'),
                        'all'             => true,
                        'all_placeholder' => '',
                        'all_icon'        => '',
                        'default'         => array(
                            'all'  => '25',
                            'unit' => 'Words (Pro)',
                        ),
                        'units'           => array('Words  (Pro)', 'Characters  (Pro)', 'Lines  (Pro)'),
                        'attributes'      => array(
                            'min' => 1,
                        ),
                        'dependency' => array('show_domain_content', '==', 'true'),
                    ),
                    array(
                        'id'         => 'show_domain_pagination',
                        'type'       => 'switcher',
                        'title'      => esc_html__('Pagination', 'domain-par-page-pro'),
                        'subtitle' => esc_html__('Enable or disable item pagination.', 'domain-par-page-pro'),
                        'text_on'    => esc_html__('Enabled', 'domain-par-page-pro'),
                        'text_off'   => esc_html__('Disabled', 'domain-par-page-pro'),
                        'text_width' => 100,
                        'default'    => true,
                    ),
                    array(
                        'id'         => 'domain_per_page',
                        'type'       => 'spinner',
                        'title'      => esc_html__('Domain Per Page', 'domain-par-page-pro'),
                        'subtitle' => esc_html__('This value should be lesser than the Limit set in the Filter Events tab.', 'domain-par-page-pro'),
                        'default'    => 12,
                        'dependency' => array('show_domain_pagination', '==', 'true'),
                    ),
                )
            )
        );
    }
}
