<?php
namespace WoolentorPro\Modules\FreeShippingBar\Admin;
use WooLentorPro\Traits\Singleton;

if (!defined('ABSPATH')) {
    exit;
}

class Fields
{
    use Singleton;

    /**
     * Return the complete settings fields array for the Free Shipping Bar module.
     * Called via Free_Shipping_Bar_Pro::setting_fields() which the free module invokes.
     */
    public function setting_fields(){
        return [
            [
                'id'               => 'woolentor_free_shipping_bar_settings',
                'name'             => esc_html__('Free Shipping Bar', 'woolentor-pro'),
                'type'             => 'moduledrawer',
                'default'          => 'off',
                'section'          => \WoolentorPro\Modules\FreeShippingBar\Free_Shipping_Bar_Pro::SECTION,
                'documentation'    => esc_url('https://woolentor.com/doc/how-to-set-up-the-free-shipping-bar-in-shoplentor-for-woocommerce/'),
                'option_id'        => 'enable',
                'require_settings' => true,
                'setting_tabs'     => [

                    // ── Tab 1: General ────────────────────────────────────────
                    [
                        'id'     => 'general',
                        'name'   => esc_html__('General', 'woolentor-pro'),
                        'fields' => [
                            [
                                'id'      => 'enable',
                                'name'    => esc_html__('Enable / Disable', 'woolentor-pro'),
                                'desc'    => esc_html__('Enable or disable the Free Shipping Bar.', 'woolentor-pro'),
                                'type'    => 'checkbox',
                                'default' => 'off',
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'display_heading',
                                'type'    => 'title',
                                'heading' => esc_html__('Display Settings', 'woolentor-pro'),
                                'size'    => 'woolentor_style_seperator',
                            ],
                            [
                                'id'      => 'bar_position',
                                'name'    => esc_html__('Bar Position', 'woolentor-pro'),
                                'desc'    => esc_html__('Choose where the bar appears on the page.', 'woolentor-pro'),
                                'type'    => 'select',
                                'default' => 'top',
                                'options' => [
                                    'top'    => esc_html__('Top', 'woolentor-pro'),
                                    'bottom' => esc_html__('Bottom', 'woolentor-pro'),
                                ],
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'          => 'display_pages',
                                'name'        => esc_html__('Display On Pages', 'woolentor-pro'),
                                'type'        => 'ajaxselect',
                                'post_type'   => 'page',
                                'multiple'    => true,
                                'placeholder' => esc_html__('Search pages...', 'woolentor-pro'),
                                'desc'        => esc_html__('Select the pages where the bar should appear.', 'woolentor-pro'),
                                'class'       => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'show_on_device',
                                'name'    => esc_html__('Show On Device', 'woolentor-pro'),
                                'desc'    => esc_html__('Choose which devices should display the bar.', 'woolentor-pro'),
                                'type'    => 'select',
                                'default' => 'all',
                                'options' => [
                                    'all'     => esc_html__('All Devices', 'woolentor-pro'),
                                    'desktop' => esc_html__('Desktop Only', 'woolentor-pro'),
                                    'mobile'  => esc_html__('Mobile Only', 'woolentor-pro'),
                                ],
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'threshold_heading',
                                'type'    => 'title',
                                'heading' => esc_html__('Shipping Threshold', 'woolentor-pro'),
                                'size'    => 'woolentor_style_seperator',
                            ],
                            [
                                'id'      => 'manual_threshold',
                                'name'    => esc_html__('Manual Threshold Amount', 'woolentor-pro'),
                                'desc'    => esc_html__('Override the auto-detected free-shipping amount. Leave at 0 to auto-detect from WooCommerce shipping zones.', 'woolentor-pro'),
                                'type'    => 'number',
                                'default' => '0',
                                'min'     => '0',
                                'step'    => '0.01',
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'shipping_mode_heading',
                                'type'    => 'title',
                                'heading' => esc_html__('Shipping Application', 'woolentor-pro'),
                                'size'    => 'woolentor_style_seperator',
                            ],
                            [
                                'id'      => 'shipping_mode',
                                'name'    => esc_html__('Shipping Mode', 'woolentor-pro'),
                                'desc'    => esc_html__('WooCommerce: rely on your WC shipping zone configuration to apply free shipping. Module: the bar automatically applies free shipping when the threshold is reached — no WooCommerce free shipping method required.', 'woolentor-pro'),
                                'type'    => 'select',
                                'default' => 'module',
                                'options' => [
                                    'woocommerce' => esc_html__('WooCommerce (use WC shipping methods)', 'woolentor-pro'),
                                    'module'      => esc_html__('Module (apply automatically)', 'woolentor-pro'),
                                ],
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'        => 'module_hide_other_rates',
                                'name'      => esc_html__('Hide Other Shipping Methods', 'woolentor-pro'),
                                'desc'      => esc_html__('When free shipping is applied by the module, hide all other shipping methods (flat rate, etc.).', 'woolentor-pro'),
                                'type'      => 'checkbox',
                                'default'   => 'on',
                                'class'     => 'woolentor-action-field-left',
                                'condition' => [
                                    'key'      => 'shipping_mode',
                                    'operator' => '==',
                                    'value'    => 'module',
                                ],
                            ],
                        ],
                    ],

                    // ── Tab 2: Messages ───────────────────────────────────────
                    [
                        'id'     => 'messages',
                        'name'   => esc_html__('Messages', 'woolentor-pro'),
                        'fields' => [
                            [
                                'id'      => 'msg_initial',
                                'name'    => esc_html__('Progress Message', 'woolentor-pro'),
                                'desc'    => esc_html__('Message shown while customer has not yet reached the threshold. Use {amount} as a placeholder.', 'woolentor-pro'),
                                'type'    => 'text',
                                'default' => esc_html__('Spend {amount} more to get FREE shipping!', 'woolentor-pro'),
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'msg_success',
                                'name'    => esc_html__('Success Message', 'woolentor-pro'),
                                'desc'    => esc_html__('Message shown when the customer has unlocked free shipping.', 'woolentor-pro'),
                                'type'    => 'text',
                                'default' => esc_html__("🎉 You have unlocked FREE shipping!", 'woolentor-pro'),
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'ab_heading',
                                'type'    => 'title',
                                'heading' => esc_html__('A/B Testing', 'woolentor-pro'),
                                'size'    => 'woolentor_style_seperator',
                            ],
                            [
                                'id'      => 'enable_ab_test',
                                'name'    => esc_html__('Enable A/B Testing', 'woolentor-pro'),
                                'desc'    => esc_html__('Randomly show visitors one of two message variants. Track which drives more conversions.', 'woolentor-pro'),
                                'type'    => 'checkbox',
                                'default' => 'off',
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'        => 'ab_variant_a_msg',
                                'name'      => esc_html__('Variant A — Progress Message', 'woolentor-pro'),
                                'desc'      => esc_html__('Shown to ~50% of visitors. Use {amount} placeholder.', 'woolentor-pro'),
                                'type'      => 'text',
                                'default'   => esc_html__('Spend {amount} more to get FREE shipping!', 'woolentor-pro'),
                                'class'     => 'woolentor-action-field-left',
                                'condition' => ['key' => 'enable_ab_test', 'operator' => '==', 'value' => 'on'],
                            ],
                            [
                                'id'        => 'ab_variant_b_msg',
                                'name'      => esc_html__('Variant B — Progress Message', 'woolentor-pro'),
                                'desc'      => esc_html__('Shown to the other ~50% of visitors. Use {amount} placeholder.', 'woolentor-pro'),
                                'type'      => 'text',
                                'default'   => esc_html__('Add {amount} more to unlock FREE delivery!', 'woolentor-pro'),
                                'class'     => 'woolentor-action-field-left',
                                'condition' => ['key' => 'enable_ab_test', 'operator' => '==', 'value' => 'on'],
                            ],
                        ],
                    ],

                    // ── Tab 3: Appearance ─────────────────────────────────────
                    [
                        'id'     => 'appearance',
                        'name'   => esc_html__('Appearance', 'woolentor-pro'),
                        'fields' => [
                            [
                                'id'      => 'colors_heading',
                                'type'    => 'title',
                                'heading' => esc_html__('Colors', 'woolentor-pro'),
                                'size'    => 'woolentor_style_seperator',
                            ],
                            [
                                'id'      => 'bar_bg_color',
                                'name'    => esc_html__('Bar Background Color', 'woolentor-pro'),
                                'type'    => 'color',
                                'default' => '',
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'bar_text_color',
                                'name'    => esc_html__('Text Color', 'woolentor-pro'),
                                'type'    => 'color',
                                'default' => '',
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'bar_fill_color',
                                'name'    => esc_html__('Progress Fill Color', 'woolentor-pro'),
                                'type'    => 'color',
                                'default' => '',
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'bar_font_size',
                                'name'    => esc_html__('Font Size (px)', 'woolentor-pro'),
                                'type'    => 'number',
                                'default' => '',
                                'min'     => '10',
                                'max'     => '48',
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'styles_heading',
                                'type'    => 'title',
                                'heading' => esc_html__('Advanced Styles & Skins', 'woolentor-pro'),
                                'size'    => 'woolentor_style_seperator',
                            ],
                            [
                                'id'      => 'bar_skin',
                                'name'    => esc_html__('Bar Skin', 'woolentor-pro'),
                                'desc'    => esc_html__('Choose a pre-built visual skin for the bar.', 'woolentor-pro'),
                                'type'    => 'select',
                                'default' => 'default',
                                'options' => [
                                    'default'      => esc_html__('Default', 'woolentor-pro'),
                                    'minimal'      => esc_html__('Minimal', 'woolentor-pro'),
                                    'gradient'     => esc_html__('Gradient', 'woolentor-pro'),
                                    'announcement' => esc_html__('Announcement', 'woolentor-pro'),
                                    'bold'         => esc_html__('Bold', 'woolentor-pro'),
                                ],
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'bar_animation',
                                'name'    => esc_html__('Progress Bar Animation', 'woolentor-pro'),
                                'desc'    => esc_html__('Visual animation applied to the progress fill.', 'woolentor-pro'),
                                'type'    => 'select',
                                'default' => 'none',
                                'options' => [
                                    'none'  => esc_html__('None', 'woolentor-pro'),
                                    'slide' => esc_html__('Slide', 'woolentor-pro'),
                                    'pulse' => esc_html__('Pulse', 'woolentor-pro'),
                                    'glow'  => esc_html__('Glow', 'woolentor-pro'),
                                ],
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'bar_custom_css',
                                'name'    => esc_html__('Custom CSS', 'woolentor-pro'),
                                'desc'    => esc_html__('Add custom CSS rules for the bar. Use #wl-free-shipping-bar as the selector prefix.', 'woolentor-pro'),
                                'type'    => 'textarea',
                                'default' => '',
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'countdown_heading',
                                'type'    => 'title',
                                'heading' => esc_html__('Countdown Timer', 'woolentor-pro'),
                                'size'    => 'woolentor_style_seperator',
                            ],
                            [
                                'id'      => 'enable_countdown',
                                'name'    => esc_html__('Enable Countdown Timer', 'woolentor-pro'),
                                'desc'    => esc_html__('Show a countdown clock inside the bar to create urgency.', 'woolentor-pro'),
                                'type'    => 'checkbox',
                                'default' => 'off',
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'        => 'countdown_end_date',
                                'name'      => esc_html__('Countdown End Date & Time', 'woolentor-pro'),
                                'desc'      => esc_html__('The timer counts down to this moment. Current server date:', 'woolentor-pro') . ' ' . esc_html(current_time('Y M d')),
                                'type'      => 'datetime',
                                'default'   => '',
                                'class'     => 'woolentor-action-field-left',
                                'condition' => ['key' => 'enable_countdown', 'operator' => '==', 'value' => 'on'],
                            ],
                            [
                                'id'        => 'countdown_message',
                                'name'      => esc_html__('Countdown Message', 'woolentor-pro'),
                                'desc'      => esc_html__('Use {timer} as a placeholder for the countdown clock (e.g. "Offer ends in {timer}!").', 'woolentor-pro'),
                                'type'      => 'text',
                                'default'   => esc_html__('Free shipping offer ends in {timer}!', 'woolentor-pro'),
                                'class'     => 'woolentor-action-field-left',
                                'condition' => ['key' => 'enable_countdown', 'operator' => '==', 'value' => 'on'],
                            ],
                        ],
                    ],

                    // ── Tab 4: Targeting ──────────────────────────────────────
                    [
                        'id'     => 'targeting',
                        'name'   => esc_html__('Targeting', 'woolentor-pro'),
                        'fields' => [
                            [
                                'id'      => 'geo_heading',
                                'type'    => 'title',
                                'heading' => esc_html__('Geo-Targeting', 'woolentor-pro'),
                                'size'    => 'woolentor_style_seperator',
                            ],
                            [
                                'id'      => 'enable_geo_targeting',
                                'name'    => esc_html__('Enable Geo-Targeting', 'woolentor-pro'),
                                'desc'    => esc_html__('Automatically show the threshold matching the customer\'s WooCommerce shipping zone.', 'woolentor-pro'),
                                'type'    => 'checkbox',
                                'default' => 'off',
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'        => 'geo_fallback_threshold',
                                'name'      => esc_html__('Geo Fallback Threshold', 'woolentor-pro'),
                                'desc'      => esc_html__('Threshold used when no matching zone is found. Leave at 0 to fall back to the standard auto-detect.', 'woolentor-pro'),
                                'type'      => 'number',
                                'default'   => '0',
                                'min'       => '0',
                                'step'      => '0.01',
                                'class'     => 'woolentor-action-field-left',
                                'condition' => ['key' => 'enable_geo_targeting', 'operator' => '==', 'value' => 'on'],
                            ],
                            [
                                'id'      => 'adv_target_heading',
                                'type'    => 'title',
                                'heading' => esc_html__('Advanced Display Targeting', 'woolentor-pro'),
                                'size'    => 'woolentor_style_seperator',
                            ],
                            [
                                'id'      => 'target_categories',
                                'name'    => esc_html__('Product Category Targeting', 'woolentor-pro'),
                                'desc'    => esc_html__('Show the bar only on pages containing the selected categories (shop/archive/single product). Leave empty for all categories.', 'woolentor-pro'),
                                'type'    => 'multiselect',
                                'options' => woolentor_taxonomy_list('product_cat', 'slug'),
                                'default' => [],
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'target_user_role',
                                'name'    => esc_html__('User Role Targeting', 'woolentor-pro'),
                                'desc'    => esc_html__('Show the bar to specific user roles only.', 'woolentor-pro'),
                                'type'    => 'select',
                                'default' => 'all',
                                'options' => [
                                    'all'       => esc_html__('All Visitors', 'woolentor-pro'),
                                    'guest'     => esc_html__('Guests Only', 'woolentor-pro'),
                                    'logged_in' => esc_html__('Logged-in Users Only', 'woolentor-pro'),
                                    'customer'  => esc_html__('Customers (made a purchase)', 'woolentor-pro'),
                                ],
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'          => 'target_exclude_pages',
                                'name'        => esc_html__('Exclude Specific Pages', 'woolentor-pro'),
                                'desc'        => esc_html__('Bar will never show on the selected pages.', 'woolentor-pro'),
                                'type'        => 'ajaxselect',
                                'post_type'   => 'page',
                                'multiple'    => true,
                                'placeholder' => esc_html__('Search pages...', 'woolentor-pro'),
                                'default'     => [],
                                'class'       => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'schedule_heading',
                                'type'    => 'title',
                                'heading' => esc_html__('Scheduled Display', 'woolentor-pro'),
                                'size'    => 'woolentor_style_seperator',
                            ],
                            [
                                'id'      => 'enable_schedule',
                                'name'    => esc_html__('Enable Schedule', 'woolentor-pro'),
                                'desc'    => esc_html__('Show the bar only within a defined date/time window.', 'woolentor-pro'),
                                'type'    => 'checkbox',
                                'default' => 'off',
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'        => 'schedule_start',
                                'name'      => esc_html__('Start Date & Time', 'woolentor-pro'),
                                'desc'      => esc_html__('Bar becomes visible from this date & time. Uses site timezone.', 'woolentor-pro'),
                                'type'      => 'datetime',
                                'default'   => '',
                                'class'     => 'woolentor-action-field-left',
                                'condition' => ['key' => 'enable_schedule', 'operator' => '==', 'value' => 'on'],
                            ],
                            [
                                'id'        => 'schedule_end',
                                'name'      => esc_html__('End Date & Time', 'woolentor-pro'),
                                'desc'      => esc_html__('Bar stops showing after this date & time. Leave empty for no end date.', 'woolentor-pro'),
                                'type'      => 'datetime',
                                'default'   => '',
                                'class'     => 'woolentor-action-field-left',
                                'condition' => ['key' => 'enable_schedule', 'operator' => '==', 'value' => 'on'],
                            ],
                            [
                                'id'      => 'analytics_heading',
                                'type'    => 'title',
                                'heading' => esc_html__('Performance Tracking', 'woolentor-pro'),
                                'size'    => 'woolentor_style_seperator',
                            ],
                            [
                                'id'      => 'enable_analytics',
                                'name'    => esc_html__('Enable Analytics', 'woolentor-pro'),
                                'desc'    => esc_html__('Track bar impressions (views) and conversions (threshold reached).', 'woolentor-pro'),
                                'type'    => 'checkbox',
                                'default' => 'off',
                                'class'   => 'woolentor-action-field-left',
                            ],
                            [
                                'id'      => 'multi_bar_heading',
                                'type'    => 'title',
                                'heading' => esc_html__('Additional Bars', 'woolentor-pro'),
                                'size'    => 'woolentor_style_seperator',
                            ],
                            [
                                'id'          => 'additional_bars',
                                'name'        => esc_html__('Additional Bars', 'woolentor-pro'),
                                'desc'        => esc_html__('Create extra bars with their own rules. The highest-priority enabled bar whose targeting matches the current page wins.', 'woolentor-pro'),
                                'type'        => 'repeater',
                                'title_field' => 'bar_title',
                                'options'     => [
                                    'button_label' => esc_html__('Add New Bar', 'woolentor-pro'),
                                ],
                                'fields'      => [
                                    [
                                        'id'      => 'bar_title',
                                        'name'    => esc_html__('Bar Name', 'woolentor-pro'),
                                        'type'    => 'text',
                                        'default' => esc_html__('My Bar', 'woolentor-pro'),
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'bar_enabled',
                                        'name'    => esc_html__('Enable This Bar', 'woolentor-pro'),
                                        'type'    => 'checkbox',
                                        'default' => 'on',
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'bar_priority',
                                        'name'    => esc_html__('Priority (lower = higher priority)', 'woolentor-pro'),
                                        'type'    => 'number',
                                        'default' => '10',
                                        'min'     => '1',
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'bar_position',
                                        'name'    => esc_html__('Position', 'woolentor-pro'),
                                        'type'    => 'select',
                                        'default' => 'top',
                                        'options' => [
                                            'top'    => esc_html__('Top', 'woolentor-pro'),
                                            'bottom' => esc_html__('Bottom', 'woolentor-pro'),
                                        ],
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'          => 'display_pages',
                                        'name'        => esc_html__('Display On Pages', 'woolentor-pro'),
                                        'desc'        => esc_html__('Leave empty to show on all pages.', 'woolentor-pro'),
                                        'type'        => 'ajaxselect',
                                        'post_type'   => 'page',
                                        'multiple'    => true,
                                        'placeholder' => esc_html__('Search pages...', 'woolentor-pro'),
                                        'default'     => [],
                                        'class'       => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'show_on_device',
                                        'name'    => esc_html__('Show On Device', 'woolentor-pro'),
                                        'type'    => 'select',
                                        'default' => 'all',
                                        'options' => [
                                            'all'     => esc_html__('All', 'woolentor-pro'),
                                            'desktop' => esc_html__('Desktop Only', 'woolentor-pro'),
                                            'mobile'  => esc_html__('Mobile Only', 'woolentor-pro'),
                                        ],
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'manual_threshold',
                                        'name'    => esc_html__('Threshold Amount (0 = auto)', 'woolentor-pro'),
                                        'type'    => 'number',
                                        'default' => '0',
                                        'min'     => '0',
                                        'step'    => '0.01',
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'target_user_role',
                                        'name'    => esc_html__('User Role', 'woolentor-pro'),
                                        'type'    => 'select',
                                        'default' => 'all',
                                        'options' => [
                                            'all'       => esc_html__('All Visitors', 'woolentor-pro'),
                                            'guest'     => esc_html__('Guests Only', 'woolentor-pro'),
                                            'logged_in' => esc_html__('Logged-in Only', 'woolentor-pro'),
                                        ],
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'enable_schedule',
                                        'name'    => esc_html__('Enable Schedule', 'woolentor-pro'),
                                        'type'    => 'checkbox',
                                        'default' => 'off',
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'        => 'schedule_start',
                                        'name'      => esc_html__('Start (YYYY-MM-DD HH:MM)', 'woolentor-pro'),
                                        'type'      => 'datetime',
                                        'default'   => '',
                                        'class'     => 'woolentor-action-field-left',
                                        'condition' => ['key' => 'enable_schedule', 'operator' => '==', 'value' => 'on'],
                                    ],
                                    [
                                        'id'        => 'schedule_end',
                                        'name'      => esc_html__('End (YYYY-MM-DD HH:MM)', 'woolentor-pro'),
                                        'type'      => 'datetime',
                                        'default'   => '',
                                        'class'     => 'woolentor-action-field-left',
                                        'condition' => ['key' => 'enable_schedule', 'operator' => '==', 'value' => 'on'],
                                    ],
                                    [
                                        'id'      => 'msg_initial',
                                        'name'    => esc_html__('Progress Message', 'woolentor-pro'),
                                        'type'    => 'text',
                                        'default' => esc_html__('Spend {amount} more to get FREE shipping!', 'woolentor-pro'),
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'msg_success',
                                        'name'    => esc_html__('Success Message', 'woolentor-pro'),
                                        'type'    => 'text',
                                        'default' => esc_html__("🎉 You've unlocked FREE shipping!", 'woolentor-pro'),
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'bar_skin',
                                        'name'    => esc_html__('Skin', 'woolentor-pro'),
                                        'type'    => 'select',
                                        'default' => 'default',
                                        'options' => [
                                            'default'      => esc_html__('Default', 'woolentor-pro'),
                                            'minimal'      => esc_html__('Minimal', 'woolentor-pro'),
                                            'gradient'     => esc_html__('Gradient', 'woolentor-pro'),
                                            'announcement' => esc_html__('Announcement', 'woolentor-pro'),
                                            'bold'         => esc_html__('Bold', 'woolentor-pro'),
                                        ],
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'bar_bg_color',
                                        'name'    => esc_html__('Background Color', 'woolentor-pro'),
                                        'type'    => 'color',
                                        'default' => '',
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'bar_text_color',
                                        'name'    => esc_html__('Text Color', 'woolentor-pro'),
                                        'type'    => 'color',
                                        'default' => '',
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'bar_fill_color',
                                        'name'    => esc_html__('Fill Color', 'woolentor-pro'),
                                        'type'    => 'color',
                                        'default' => '',
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'      => 'enable_countdown',
                                        'name'    => esc_html__('Countdown Timer', 'woolentor-pro'),
                                        'type'    => 'checkbox',
                                        'default' => 'off',
                                        'class'   => 'woolentor-action-field-left',
                                    ],
                                    [
                                        'id'        => 'countdown_end_date',
                                        'name'      => esc_html__('Countdown End Date & Time', 'woolentor-pro'),
                                        'type'      => 'datetime',
                                        'default'   => '',
                                        'class'     => 'woolentor-action-field-left',
                                        'condition' => ['key' => 'enable_countdown', 'operator' => '==', 'value' => 'on'],
                                    ],
                                    [
                                        'id'        => 'countdown_message',
                                        'name'      => esc_html__('Countdown Message ({timer})', 'woolentor-pro'),
                                        'type'      => 'text',
                                        'default'   => esc_html__('Offer ends in {timer}!', 'woolentor-pro'),
                                        'class'     => 'woolentor-action-field-left',
                                        'condition' => ['key' => 'enable_countdown', 'operator' => '==', 'value' => 'on'],
                                    ],
                                ],
                            ],
                        ],
                    ],

                    [
                        'id'     => 'analytics',
                        'name'   => esc_html__('Analytics', 'woolentor-pro'),
                        'fields' => [
                            [
                                'id'        => 'analytics_data_render',
                                'type'      => 'html',
                                'html'      => '',
                                'component' => 'FsbAnalytics',
                            ],
                        ],
                    ],

                ],
            ],
        ];
    }
}
