<?php

/**
 * Author Kit  Customizer Setup
 */


add_action('kirki_config', 'author_kit_customizer_settings');

function author_kit_customizer_settings()
{

    // Create the AuthorWP Customizer Panel
    new \Kirki\Panel('author_kit_customizer_panel', [
        'priority'    => 10,
        'title'       => esc_html__('Author Kit', 'author-kit'),
        'description' => esc_html__('Customize Author Kit Templates with Live Preview', 'author-kit'),
    ]);

    // Section 1: Author Bio Box
    new \Kirki\Section('author_kit_bio_box_section', [
        'title'       => esc_html__('Author Bio Box', 'author-kit'),
        'panel'       => 'author_kit_customizer_panel',
        'priority'    => 10,
        'description' => esc_html__('Customize Bio Box', 'author-kit'),
    ]);


    // Get the active template
    $active_template = get_option('author_kit_author_bio_template', 'template-default');
    // Control class mapping
    $control_classes = [
        'typography'   => \Kirki\Field\Typography::class,
        'text-area'   => \Kirki\Field\Textarea::class,
        'color'        => \Kirki\Field\Color::class,
        'dimensions'   => \Kirki\Field\Dimensions::class,
        'dimension'    => \Kirki\Field\Dimension::class,
        'radio-button' => \Kirki\Field\Radio_Buttonset::class,
        'checkbox'     => \Kirki\Field\Checkbox_Switch::class,
        'select'       => \Kirki\Field\Select::class,
        'text'         => \Kirki\Field\Text::class,
        'slider'       => \Kirki\Field\Slider::class,
        'switch'       => \Kirki\Field\Checkbox_Switch::class,
        'number'        => \Kirki\Field\Number::class,
        'divider'      => \Kirki\Pro\Field\Divider::class,
        'headline'     => \Kirki\Pro\Field\Headline::class,
        'margin'       => \Kirki\Pro\Field\Margin::class,
        'padding'      => \Kirki\Pro\Field\Padding::class,
    ];


    $template_controls['template-default'] = [

        [
            'type'     => 'headline',
            'settings' => 'author_kit_headline_1_default',
            'label'    => esc_html__('General Author Bio Box Settings', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 1,
        ],

        [
            'type'        => 'dimensions',
            'settings'    => 'author_kit_bio_box_size_default',
            'label'       => esc_html__('Bio Box Width & Height', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 10,
            'transport'   => 'postMessage',
            'default'     => [
                'width'  => '100%',
                'height' => 'auto',
            ],
        ],

        [
            'type'              => 'color',
            'settings'          => 'author_kit_bio_box_bg_color_default',
            'label'             => esc_html__('Bio Box Background Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 11,
            'transport'         => 'postMessage',
            'default'           => '#fbfbfb',
            'sanitize_callback' => 'sanitize_hex_color',
            'output'            => [
                [
                    'element'  => '#author-bio-container',
                    'property' => 'background-color',
                ],
            ],
        ],

        [
            'type'        => 'dimension',
            'settings'    => 'author_kit_bio_box_border_thickness_default',
            'label'       => esc_html__('Bio Box Border Thickness', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 12,
            'transport'   => 'postMessage',
            'default'     => '1px',
        ],

        [
            'type'        => 'dimension',
            'settings'    => 'author_kit_bio_box_border_radius_default',
            'label'       => esc_html__('Border Radius', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 14,
            'transport'   => 'postMessage',
            'default'     => '8px',
        ],

        [
            'type'              => 'color',
            'settings'          => 'author_kit_bio_box_border_color_default',
            'label'             => esc_html__('Border Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 15,
            'default'           => '#fcfcfc',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],

        [
            'type'            => 'text',
            'settings'        => 'author_kit_bio_box_heading_text_default',
            'label'           => esc_html__('Bio Box Heading Text', 'author-kit'),
            'section'         => 'author_kit_bio_box_section',
            'default'         => esc_html__('About Author', 'author-kit'),
            'priority'        => 20,
            'transport'       => 'postMessage',
            'partial_refresh' => [
                'author_kit_bio_box_heading_text_default' => [
                    'selector'        => '#about-author-heading',
                    'render_callback' => function () {
                        return esc_html(get_theme_mod('author_kit_bio_box_heading_text_default', 'About Author'));
                    },
                ],
            ],
        ],

        [
            'type'              => 'color',
            'settings'          => 'author_kit_bio_box_heading_bg_color_default',
            'label'             => esc_html__('Background Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 21,
            'transport'         => 'postMessage',
            'default'           => '#36454F',
            'sanitize_callback' => 'sanitize_hex_color',
        ],

        [
            'type'              => 'color',
            'settings'          => 'author_kit_bio_box_heading_txt_color_default',
            'label'             => esc_html__('Text Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 21,
            'transport'         => 'postMessage',
            'default'           => '#FFFFFF',
            'sanitize_callback' => 'sanitize_hex_color',
        ],

        [
            'type'        => 'switch',
            'settings'    => 'author_kit_bio_box_hide_heading_default',
            'label'       => esc_html__('Hide Heading Label', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 21,
            'default'     => 0,
            'transport'   => 'refresh',
            'choices'     => [
                1 => esc_html__('Enabled', 'author-kit'),
                0 => esc_html__('Disabled', 'author-kit'),
            ],
        ],


        [
            'type'     => 'divider',
            'settings' => 'author_kit_divider_4_default',
            'section'  => 'author_kit_bio_box_section',
            'priority' => 36,
            'choices'  => ['color' => '#000'],
        ],

        [
            'type'        => 'slider',
            'settings'    => 'author_kit_name_font_size_default',
            'label'       => esc_html__('Name Font Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 39,
            'responsive'  => true,
            'default'     => [
                'desktop' => 16,
                'mobile'  => 14,
            ],
            'choices'     => ['min' => 0, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-name', // Assuming this, you can adjust selector
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        

        [
            'type'     => 'color',
            'settings' => 'author_kit_name_txt_color_default',
            'label'    => esc_html__('Name Text Color', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 40,
            'default'  => '#000000',
            'transport' => 'postMessage',
        ],

        [
            'type'     => 'divider',
            'settings' => 'author_kit_divider_1_default',
            'section'  => 'author_kit_bio_box_section',
            'priority' => 40,
            'choices'  => ['color' => '#000'],
        ],

        [
            'type'        => 'slider',
            'settings'    => 'author_kit_subinfo_font_size_default',
            'label'       => esc_html__('Sub Info Font Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 41,
            'responsive'  => true,
            'default'     => [
                'desktop' => 13,
                'mobile'  => 12,
            ],
            'choices'     => [
                'min'  => 0,
                'max'  => 50,
                'step' => 1,
            ],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-info-placeholder',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        
        [
            'type'     => 'color',
            'settings' => 'author_kit_subinfo_txt_color_default',
            'label'    => esc_html__('Sub Info Text Color', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 42,
            'default'  => '#808080',
            'transport' => 'postMessage',
        ],

        [
            'type'        => 'select',
            'settings'    => 'author_kit_subinfo_default_field_default',
            'label'       => esc_html__('Default Sub Info Field', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'transport' => 'refresh',
            'default'     => 'job_title',
            'placeholder' => esc_html__('Choose a field', 'author-kit'),
            'priority'    => 42,
            'choices'     => [
                'email'     => esc_html__('Email', 'author-kit'),
                'company'   => esc_html__('Company', 'author-kit'),
                'job_title' => esc_html__('Job Title', 'author-kit'),
            ],
        ],

        [
            'type'     => 'divider',
            'settings' => 'author_kit_divider_2_default',
            'section'  => 'author_kit_bio_box_section',
            'priority' => 43,
            'choices'  => ['color' => '#000'],
        ],

        [
            'type'        => 'slider',
            'settings'    => 'author_kit_bio_font_size_default',
            'label'       => esc_html__('Bio Font Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 46,
            'responsive'  => true,
            'default'     => [
                'desktop' => 14,
                'mobile'  => 13,
            ],
            'choices'     => ['min' => 0, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-bio-text', // Adjust selector if needed
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        

        [
            'type'     => 'color',
            'settings' => 'author_kit_bio_text_color_default',
            'label'    => esc_html__('Bio Text Color', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 47,
            'default'  => '#000000',
            'transport' => 'postMessage',
        ],

        [
            'type'     => 'headline',
            'settings' => 'author_kit_headline_8_default',
            'label'    => esc_html__('Bio Box Display Position', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 75,
        ],

        [
            'type'      =>    'select',
            'settings'    => 'author_kit_bio_box_display_position_default',
            'label'       => esc_html__('Change Display Position', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'transport'   => 'refresh',
            'default'     => 'after_content',
            'placeholder' => esc_html__('Choose an option', 'author-kit'),
            'priority'    => 76,
            'choices'     => [
                'after_content' => esc_html__('After the Content', 'author-kit'),
                'before_content' => esc_html__('Before the Content', 'author-kit'),
            ]
        ],

        [
            'type'              => 'headline',
            'settings'    => 'author_kit_headline_7_default',
            'label'       => esc_html__('Avatar Settings', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 89,
        ],
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_avatar_size_default',
            'label'       => esc_html__('Avatar Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 90,
            'responsive'  => true,
            'default'     => [
                'desktop' => 120,
                'mobile'  => 100,
            ],
            'choices'     => ['min' => 50, 'max' => 200, 'step' => 1],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-kit-bio-box div #author-avatar-container ',
                    'property'    => 'width',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
                [
                    'element'     => '#author-bio-container #author-kit-bio-box div #author-avatar-container',
                    'property'    => 'height',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        

        [
            'type'              => 'headline',
            'settings'    => 'author_kit_headline_6_default',
            'label'       => esc_html__('Social Icons Settings', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 109,
        ],

        [
            'type'      =>    'select',
            'settings'    => 'author_kit_icons_style_default',
            'label'       => esc_html__('Choose Icon Type', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'transport'   => 'postMessage',
            'default'     => 'author-kit-circle',
            'placeholder' => esc_html__('Choose an option', 'author-kit'),
            'priority'    => 110,
            'choices'     => [
                'author-kit-circle' => esc_html__('Circle', 'author-kit'),
                'author-kit-square' => esc_html__('Square', 'author-kit'),
            ]
        ],

        [
            'type'        => 'slider',
            'settings'    => 'author_kit_icons_gap_default',
            'label'       => esc_html__('Icons Gap (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 110,
            'responsive'  => true,
            'default'     => [
                'desktop' => 10,
                'mobile'  => 8,
            ],
            'choices'     => ['min' => 0, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-kit-bio-box  div.author-kit-social-icons-list', // Adjust selector
                    'property'    => 'gap',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],

        [
            'type'        => 'slider',
            'settings'    => 'author_kit_icons_size_default',
            'label'       => esc_html__('Icons Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 120,
            'responsive'  => true,
            'default'     => [
                'desktop' => 40,
                'mobile'  => 28,
            ],
            'choices'     => ['min' => 20, 'max' => 50, 'step' => 1],
            'transport'   => 'refresh',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-social-icons-list a.author-kit-social-icon',
                    'property'    => 'width',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
                [
                    'element'     => '.author-kit-social-icons-list a.author-kit-social-icon',
                    'property'    => 'height',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],


        [
            'type'              => 'color',
            'settings'          => 'author_kit_icons_container_color_default',
            'label'             => esc_html__('Icons Container Color', 'author-kit'),
            'description' => esc_html__('To display social platform icons in their original colors, set this option to black. Note: Live preview is not available.', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 121,
            'default'           => '#000000',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],

        [
            'type'              => 'color',
            'settings'          => 'author_kit_icons_color_default',
            'label'             => esc_html__('Social Icons Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 122,
            'default'           => '#ffffff',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],

        [
            'type'              => 'headline',
            'settings'    => 'author_kit_headline_4_default',
            'label'       => esc_html__('Box Margin & Padding', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 199,
        ],
        [
            'type'        => 'dimensions',
            'settings'    => 'author_kit_bio_box_margin_default',
            'label'       => esc_html__('Bio Box Margin', 'author-kit'),
            'description' => esc_html__('Please mention unit with value eg: 10px, 10%, 10rem etc', 'author-kit'),
            'tooltip' => esc_html__('Please mention unit with value eg: 10px, 10%, 10rem etc', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'transport'   => 'postMessage',
            'priority'    => 220,
            'default'     => [
                'margin-top'  => '50px',
                'margin-bottom' => '50px',
            ],
            'choices'     => [
                'labels' => [
                    'margin-top'  => esc_html__('Margin Top', 'author-kit'),
                    'margin-bottom'  => esc_html__('Margin Bottom', 'author-kit'),

                ],
            ],
        ],

        [
            'type'        => 'padding',
            'settings'    => 'author_kit_bio_box_padding_default',
            'label'       => esc_html__('Bio Box Padding', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 231,
            'responsive'  => true,
            'default'     => [
                'desktop' => [
                    'top'    => '35px',
                    'right'  => '25px',
                    'bottom' => '35px',
                    'left'   => '25px',
                ],
                'mobile' => [
                    'top'    => '35px',
                    'right'  => '15px',
                    'bottom' => '15px',
                    'left'   => '15px',
                ],
            ],
            'transport'   => 'postMessage',
            'choices'     => [
                'unit' => 'px',
            ],
            'output'      => [
                [
                    'element'       => '#author-bio-container #author-kit-bio-box',
                    'media_query'   => [
                        'desktop' => '@media (min-width: 768px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                    'property'      => 'padding',
                    'value_pattern' => '$',
                ],
            ],
        ],
        



    ];


    // second pro template

    $template_controls['template-memoir'] = [



        [
            'type'     => 'headline',
            'settings' => 'author_kit_headline_1_memoir',
            'label'    => esc_html__('General Author Bio Box Settings', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 1,
        ],

        [
            'type'        => 'dimensions',
            'settings'    => 'author_kit_bio_box_size_memoir',
            'label'       => esc_html__('Bio Box Width & Height', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 10,
            'transport'   => 'postMessage',
            'default'     => [
                'width'  => '100%',
                'height' => 'auto',
            ],
        ],

        [
            'type'              => 'color',
            'settings'          => 'author_kit_bio_box_bg_color_memoir',
            'label'             => esc_html__('Bio Box Background Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 11,
            'transport'         => 'postMessage',
            'default'           => '#fcfcfc',
            'sanitize_callback' => 'sanitize_hex_color',
            'output'            => [
                [
                    'element'  => '#author-bio-container',
                    'property' => 'background-color',
                ],
            ],
        ],

        [
            'type'        => 'dimension',
            'settings'    => 'author_kit_bio_box_border_thickness_memoir',
            'label'       => esc_html__('Bio Box Border Thickness', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 12,
            'transport'   => 'postMessage',
            'default'     => '1px',
        ],

        [
            'type'        => 'dimension',
            'settings'    => 'author_kit_bio_box_border_radius_memoir',
            'label'       => esc_html__('Border Radius', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 14,
            'transport'   => 'postMessage',
            'default'     => '16px',
        ],

        [
            'type'              => 'color',
            'settings'          => 'author_kit_bio_box_border_color_memoir',
            'label'             => esc_html__('Border Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 15,
            'default'           => '#1e73be',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],

        [
            'type'            => 'text',
            'settings'        => 'author_kit_bio_box_heading_text_memoir',
            'label'           => esc_html__('Bio Box Heading Text', 'author-kit'),
            'section'         => 'author_kit_bio_box_section',
            'default'         => esc_html__('About Author', 'author-kit'),
            'priority'        => 20,
            'transport'       => 'postMessage',
            'partial_refresh' => [
                'author_kit_bio_box_heading_text_memoir' => [
                    'selector'        => '#about-author-heading',
                    'render_callback' => function () {
                        return esc_html(get_theme_mod('author_kit_bio_box_heading_text_memoir', 'About Writer'));
                    },
                ],
            ],
        ],

        [
            'type'              => 'color',
            'settings'          => 'author_kit_bio_box_heading_bg_color_memoir',
            'label'             => esc_html__('Background Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 21,
            'transport'         => 'postMessage',
            'default'           => '#36454F',
            'sanitize_callback' => 'sanitize_hex_color',
        ],

        [
            'type'              => 'color',
            'settings'          => 'author_kit_bio_box_heading_txt_color_memoir',
            'label'             => esc_html__('Text Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 21,
            'transport'         => 'postMessage',
            'default'           => '#FFFFFF',
            'sanitize_callback' => 'sanitize_hex_color',
        ],

        [
            'type'        => 'switch',
            'settings'    => 'author_kit_bio_box_hide_heading_memoir',
            'label'       => esc_html__('Hide Heading Label', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 21,
            'default'     => 0,
            'transport'   => 'refresh',
            'choices'     => [
                1 => esc_html__('Enabled', 'author-kit'),
                0 => esc_html__('Disabled', 'author-kit'),
            ],
        ],

        [
            'type'     => 'divider',
            'settings' => 'author_kit_divider_4_memoir',
            'section'  => 'author_kit_bio_box_section',
            'priority' => 36,
            'choices'  => ['color' => '#000'],
        ],

        [
            'type'        => 'slider',
            'settings'    => 'author_kit_name_font_size_memoir',
            'label'       => esc_html__('Name Font Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 39,
            'responsive'  => true,
            'default'     => [
                'desktop' => 16,
                'mobile'  => 14,
            ],
            'choices'     => ['min' => 0, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-name', // Assuming this, you can adjust selector
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],

        [
            'type'     => 'color',
            'settings' => 'author_kit_name_txt_color_memoir',
            'label'    => esc_html__('Name Text Color', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 40,
            'default'  => '#000000',
            'transport' => 'postMessage',
        ],

        [
            'type'     => 'divider',
            'settings' => 'author_kit_divider_1_memoir',
            'section'  => 'author_kit_bio_box_section',
            'priority' => 40,
            'choices'  => ['color' => '#000'],
        ],

        [
            'type'        => 'slider',
            'settings'    => 'author_kit_subinfo_font_size_memoir',
            'label'       => esc_html__('Sub Info Font Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 41,
            'responsive'  => true,
            'default'     => [
                'desktop' => 15,
                'mobile'  => 12,
            ],
            'choices'     => [
                'min'  => 0,
                'max'  => 50,
                'step' => 1,
            ],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-info-placeholder',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],

        [
            'type'     => 'color',
            'settings' => 'author_kit_subinfo_txt_color_memoir',
            'label'    => esc_html__('Sub Info Text Color', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 42,
            'default'  => '#808080',
            'transport' => 'postMessage',
        ],

        [
            'type'        => 'select',
            'settings'    => 'author_kit_subinfo_memoir_field_memoir',
            'label'       => esc_html__('Default Sub Info Field', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'default'     => 'job_title',
            'placeholder' => esc_html__('Choose a field', 'author-kit'),
            'priority'    => 42,
            'choices'     => [
                'email'     => esc_html__('Email', 'author-kit'),
                'company'   => esc_html__('Company', 'author-kit'),
                'job_title' => esc_html__('Job Title', 'author-kit'),
            ],
        ],

        [
            'type'     => 'divider',
            'settings' => 'author_kit_divider_2_memoir',
            'section'  => 'author_kit_bio_box_section',
            'priority' => 43,
            'choices'  => ['color' => '#000'],
        ],

        [
            'type'        => 'slider',
            'settings'    => 'author_kit_bio_font_size_memoir',
            'label'       => esc_html__('Bio Font Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 46,
            'responsive'  => true,
            'default'     => [
                'desktop' => 14,
                'mobile'  => 13,
            ],
            'choices'     => ['min' => 0, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-bio-text', // Adjust selector if needed
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],

        [
            'type'     => 'color',
            'settings' => 'author_kit_bio_text_color_memoir',
            'label'    => esc_html__('Bio Text Color', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 47,
            'default'  => '#000000',
            'transport' => 'postMessage',
        ],

        [
            'type'     => 'headline',
            'settings' => 'author_kit_headline_8_memoir',
            'label'    => esc_html__('Bio Box Display Position', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 75,
        ],

        [
            'type'      =>    'select',
            'settings'    => 'author_kit_bio_box_display_position_default',
            'label'       => esc_html__('Change Display Position', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'transport'   => 'refresh',
            'default'     => 'after_content',
            'placeholder' => esc_html__('Choose an option', 'author-kit'),
            'priority'    => 76,
            'choices'     => [
                'after_content' => esc_html__('After the Content', 'author-kit'),
                'before_content' => esc_html__('Before the Content', 'author-kit'),
            ]
        ],

        [
            'type'              => 'headline',
            'settings'    => 'author_kit_headline_7_memoir',
            'label'       => esc_html__('Avatar Settings', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 89,
        ],

        [
            'type'        => 'slider',
            'settings'    => 'author_kit_avatar_size_default',
            'label'       => esc_html__('Avatar Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 90,
            'responsive'  => true,
            'default'     => [
                'desktop' => 120,
                'mobile'  => 100,
            ],
            'choices'     => ['min' => 50, 'max' => 200, 'step' => 1],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-kit-bio-box div #author-avatar-container ',
                    'property'    => 'width',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
                [
                    'element'     => '#author-bio-container #author-kit-bio-box div #author-avatar-container',
                    'property'    => 'height',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        

        [
            'type'              => 'headline',
            'settings'    => 'author_kit_headline_6_memoir',
            'label'       => esc_html__('Social Icons Settings', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 109,
        ],

        [
            'type'      =>    'select',
            'settings'    => 'author_kit_icons_style_memoir',
            'label'       => esc_html__('Choose Icon Type', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'transport'   => 'postMessage',
            'default'     => 'author-kit-square',
            'placeholder' => esc_html__('Choose an option', 'author-kit'),
            'priority'    => 110,
            'choices'     => [
                'author-kit-circle' => esc_html__('Circle', 'author-kit'),
                'author-kit-square' => esc_html__('Square', 'author-kit'),
            ]
        ],

        [
            'type'        => 'slider',
            'settings'    => 'author_kit_icons_gap_memoir',
            'label'       => esc_html__('Icons Gap (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 110,
            'responsive'  => true,
            'default'     => [
                'desktop' => 10,
                'mobile'  => 8,
            ],
            'choices'     => ['min' => 0, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-kit-bio-box  div.author-kit-social-icons-list', // Adjust selector
                    'property'    => 'gap',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],

        [
            'type'        => 'slider',
            'settings'    => 'author_kit_icons_size_memoir',
            'label'       => esc_html__('Icons Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 120,
            'responsive'  => true,
            'default'     => [
                'desktop' => 35,
                'mobile'  => 28,
            ],
            'choices'     => ['min' => 20, 'max' => 50, 'step' => 1],
            'transport'   => 'refresh',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-social-icons-list a.author-kit-social-icon',
                    'property'    => 'width',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
                [
                    'element'     => '.author-kit-social-icons-list a.author-kit-social-icon',
                    'property'    => 'height',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],

        [
            'type'              => 'color',
            'settings'          => 'author_kit_icons_container_color_memoir',
            'label'             => esc_html__('Icons Container Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 121,
            'default'           => '#1e73be',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],

        [
            'type'              => 'color',
            'settings'          => 'author_kit_icons_color_memoir',
            'label'             => esc_html__('Social Icons Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 122,
            'default'           => '#ffffff',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],

        [
            'type'              => 'headline',
            'settings'    => 'author_kit_headline_4_memoir',
            'label'       => esc_html__('Box Margin & Padding', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 199,
        ],

          [
            'type'        => 'dimensions',
            'settings'    => 'author_kit_bio_box_margin_memoir',
            'label'       => esc_html__('Bio Box Margin', 'author-kit'),
            'description' => esc_html__('Please mention unit with value eg: 10px, 10%, 10rem etc', 'author-kit'),
            'tooltip' => esc_html__('Please mention unit with value eg: 10px, 10%, 10rem etc', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'transport'   => 'postMessage',
            'priority'    => 220,
            'default'     => [
                'margin-top'  => '50px',
                'margin-bottom' => '50px',
            ],
            'choices'     => [
                'labels' => [
                    'margin-top'  => esc_html__('Margin Top', 'author-kit'),
                    'margin-bottom'  => esc_html__('Margin Bottom', 'author-kit'),

                ],
            ],
        ],
        
        [
            'type'        => 'padding',
            'settings'    => 'author_kit_bio_box_padding_memoir',
            'label'       => esc_html__('Bio Box Padding', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 231,
            'responsive'  => true,
            'default'     => [
                'desktop' => [
                    'top'    => '35px',
                    'right'  => '25px',
                    'bottom' => '35px',
                    'left'   => '25px',
                ],
                'mobile' => [
                    'top'    => '35px',
                    'right'  => '15px',
                    'bottom' => '15px',
                    'left'   => '15px',
                ],
            ],
            'transport'   => 'postMessage',
            'choices'     => [
                'unit' => 'px',
            ],
            'output'      => [
                [
                    'element'       => '#author-bio-container #author-kit-bio-box',
                    'media_query'   => [
                        'desktop' => '@media (min-width: 768px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                    'property'      => 'padding',
                    'value_pattern' => '$',
                ],
            ],
        ],


    ];

    $template_controls['template-monarch'] = [

        [
            'type'     => 'headline',
            'settings' => 'author_kit_headline_1_monarch',
            'label'    => esc_html__('General Author Bio Box Settings', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 1,
        ],
        
        [
            'type'        => 'dimensions',
            'settings'    => 'author_kit_bio_box_size_monarch',
            'label'       => esc_html__('Bio Box Width & Height', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 10,
            'transport'   => 'postMessage',
            'default'     => [
                'width'  => '100%',
                'height' => 'auto',
            ],
        ],
        
        [
            'type'              => 'color',
            'settings'          => 'author_kit_bio_box_bg_color_monarch',
            'label'             => esc_html__('Bio Box Background Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 11,
            'transport'         => 'postMessage',
            'default'           => '#1A3636',
            'sanitize_callback' => 'sanitize_hex_color',
            'output'            => [
                [
                    'element'  => '#author-bio-container',
                    'property' => 'background-color',
                ],
            ],
        ],
        
        [
            'type'        => 'dimension',
            'settings'    => 'author_kit_bio_box_border_thickness_monarch',
            'label'       => esc_html__('Bio Box Border Thickness', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 12,
            'transport'   => 'postMessage',
            'default'     => '1px',
        ],
        
        [
            'type'        => 'dimension',
            'settings'    => 'author_kit_bio_box_border_radius_monarch',
            'label'       => esc_html__('Border Radius', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 14,
            'transport'   => 'postMessage',
            'default'     => '16px',
        ],
        
        [
            'type'              => 'color',
            'settings'          => 'author_kit_bio_box_border_color_monarch',
            'label'             => esc_html__('Border Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 15,
            'default'           => '#40534C',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],
        
        [
            'type'            => 'text',
            'settings'        => 'author_kit_bio_box_heading_text_monarch',
            'label'           => esc_html__('Bio Box Heading Text', 'author-kit'),
            'section'         => 'author_kit_bio_box_section',
            'default'         => esc_html__('About Author', 'author-kit'),
            'priority'        => 20,
            'transport'       => 'postMessage',
            'partial_refresh' => [
                'author_kit_bio_box_heading_text_monarch' => [
                    'selector'        => '#about-author-heading',
                    'render_callback' => function () {
                        return esc_html(get_theme_mod('author_kit_bio_box_heading_text_monarch', 'About Me'));
                    },
                ],
            ],
        ],
        
        [
            'type'              => 'color',
            'settings'          => 'author_kit_bio_box_heading_bg_color_monarch',
            'label'             => esc_html__('Background Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 21,
            'transport'         => 'postMessage',
            'default'           => '#D6BD98',
            'sanitize_callback' => 'sanitize_hex_color',
        ],
        
        [
            'type'              => 'color',
            'settings'          => 'author_kit_bio_box_heading_txt_color_monarch',
            'label'             => esc_html__('Text Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 21,
            'transport'         => 'postMessage',
            'default'           => '#40534C',
            'sanitize_callback' => 'sanitize_hex_color',
        ],
        
        [
            'type'        => 'switch',
            'settings'    => 'author_kit_bio_box_hide_heading_monarch',
            'label'       => esc_html__('Hide Heading Label', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 21,
            'default'     => 0,
            'transport'   => 'refresh',
            'choices'     => [
                1 => esc_html__('Enabled', 'author-kit'),
                0 => esc_html__('Disabled', 'author-kit'),
            ],
        ],
        
        
        [
            'type'     => 'divider',
            'settings' => 'author_kit_divider_4_monarch',
            'section'  => 'author_kit_bio_box_section',
            'priority' => 36,
            'choices'  => ['color' => '#000'],
        ],
        
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_name_font_size_monarch',
            'label'       => esc_html__('Name Font Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 39,
            'responsive'  => true,
            'default'     => [
                'desktop' => 18,
                'mobile'  => 14,
            ],
            'choices'     => ['min' => 0, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-name', // Assuming this, you can adjust selector
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        
        [
            'type'     => 'color',
            'settings' => 'author_kit_name_txt_color_monarch',
            'label'    => esc_html__('Name Text Color', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 40,
            'default'  => '#FFFFFF',
            'transport' => 'postMessage',
        ],
        
        [
            'type'     => 'divider',
            'settings' => 'author_kit_divider_1_monarch',
            'section'  => 'author_kit_bio_box_section',
            'priority' => 40,
            'choices'  => ['color' => '#000'],
        ],
        
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_subinfo_font_size_monarch',
            'label'       => esc_html__('Sub Info Font Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 41,
            'responsive'  => true,
            'default'     => [
                'desktop' => 15,
                'mobile'  => 12,
            ],
            'choices'     => [
                'min'  => 0,
                'max'  => 50,
                'step' => 1,
            ],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-info-placeholder',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        
        
        [
            'type'     => 'color',
            'settings' => 'author_kit_subinfo_txt_color_monarch',
            'label'    => esc_html__('Sub Info Text Color', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 42,
            'default'  => '#FFFFFF',
            'transport' => 'postMessage',
        ],
        
        [
            'type'        => 'select',
            'settings'    => 'author_kit_subinfo_monarch_field_monarch',
            'label'       => esc_html__('Default Sub Info Field', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'default'     => 'job_title',
            'placeholder' => esc_html__('Choose a field', 'author-kit'),
            'priority'    => 42,
            'choices'     => [
                'email'     => esc_html__('Email', 'author-kit'),
                'company'   => esc_html__('Company', 'author-kit'),
                'job_title' => esc_html__('Job Title', 'author-kit'),
            ],
        ],
        
        [
            'type'     => 'divider',
            'settings' => 'author_kit_divider_2_monarch',
            'section'  => 'author_kit_bio_box_section',
            'priority' => 43,
            'choices'  => ['color' => '#000'],
        ],
        
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_bio_font_size_monarch',
            'label'       => esc_html__('Bio Font Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 46,
            'responsive'  => true,
            'default'     => [
                'desktop' => 14,
                'mobile'  => 13,
            ],
            'choices'     => ['min' => 0, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-bio-text', // Adjust selector if needed
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        [
            'type'     => 'color',
            'settings' => 'author_kit_bio_text_color_monarch',
            'label'    => esc_html__('Bio Text Color', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 47,
            'default'  => '#FFFFFF',
            'transport' => 'postMessage',
        ],
        
        [
            'type'     => 'headline',
            'settings' => 'author_kit_headline_8_monarch',
            'label'    => esc_html__('Bio Box Display Position', 'author-kit'),
            'section'  => 'author_kit_bio_box_section',
            'priority' => 75,
        ],
        
        [
            'type'      =>    'select',
            'settings'    => 'author_kit_bio_box_display_position_default',
            'label'       => esc_html__('Change Display Position', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'transport'   => 'refresh',
            'default'     => 'after_content',
            'placeholder' => esc_html__('Choose an option', 'author-kit'),
            'priority'    => 76,
            'choices'     => [
                'after_content' => esc_html__('After the Content', 'author-kit'),
                'before_content' => esc_html__('Before the Content', 'author-kit'),
            ]
        ],
        
        [
            'type'              => 'headline',
            'settings'    => 'author_kit_headline_7_monarch',
            'label'       => esc_html__('Avatar Settings', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 89,
        ],
        
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_avatar_size_default',
            'label'       => esc_html__('Avatar Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 90,
            'responsive'  => true,
            'default'     => [
                'desktop' => 120,
                'mobile'  => 100,
            ],
            'choices'     => ['min' => 50, 'max' => 200, 'step' => 1],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-kit-bio-box div #author-avatar-container ',
                    'property'    => 'width',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
                [
                    'element'     => '#author-bio-container #author-kit-bio-box div #author-avatar-container',
                    'property'    => 'height',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        
        [
            'type'              => 'headline',
            'settings'    => 'author_kit_headline_6_monarch',
            'label'       => esc_html__('Social Icons Settings', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 109,
        ],
        
        [
            'type'      =>    'select',
            'settings'    => 'author_kit_icons_style_monarch',
            'label'       => esc_html__('Choose Icon Type', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'transport'   => 'postMessage',
            'default'     => 'author-kit-square',
            'placeholder' => esc_html__('Choose an option', 'author-kit'),
            'priority'    => 110,
            'choices'     => [
                'author-kit-circle' => esc_html__('Circle', 'author-kit'),
                'author-kit-square' => esc_html__('Square', 'author-kit'),
            ]
        ],
        
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_icons_gap_monarch',
            'label'       => esc_html__('Icons Gap (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 110,
            'responsive'  => true,
            'default'     => [
                'desktop' => 10,
                'mobile'  => 8,
            ],
            'choices'     => ['min' => 0, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'output'      => [
                [
                    'element'     => '#author-bio-container #author-kit-bio-box  div.author-kit-social-icons-list', // Adjust selector
                    'property'    => 'gap',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_icons_size_monarch',
            'label'       => esc_html__('Icons Size (px)', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 120,
            'responsive'  => true,
            'default'     => [
                'desktop' => 35,
                'mobile'  => 28,
            ],
            'choices'     => ['min' => 20, 'max' => 50, 'step' => 1],
            'transport'   => 'refresh',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-social-icons-list a.author-kit-social-icon',
                    'property'    => 'width',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
                [
                    'element'     => '.author-kit-social-icons-list a.author-kit-social-icon',
                    'property'    => 'height',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        [
            'type'              => 'color',
            'settings'          => 'author_kit_icons_container_color_monarch',
            'label'             => esc_html__('Icons Container Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 121,
            'default'           => '#677D6A',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],
        
        [
            'type'              => 'color',
            'settings'          => 'author_kit_icons_color_monarch',
            'label'             => esc_html__('Social Icons Color', 'author-kit'),
            'section'           => 'author_kit_bio_box_section',
            'priority'          => 122,
            'default'           => '#ffffff',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],
        
        [
            'type'              => 'headline',
            'settings'    => 'author_kit_headline_4_monarch',
            'label'       => esc_html__('Box Margin & Padding', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 199,
        ],
        
         [
            'type'        => 'dimensions',
            'settings'    => 'author_kit_bio_box_margin_monarch',
            'label'       => esc_html__('Bio Box Margin', 'author-kit'),
            'description' => esc_html__('Please mention unit with value eg: 10px, 10%, 10rem etc', 'author-kit'),
            'tooltip' => esc_html__('Please mention unit with value eg: 10px, 10%, 10rem etc', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'transport'   => 'postMessage',
            'priority'    => 220,
            'default'     => [
                'margin-top'  => '50px',
                'margin-bottom' => '50px',
            ],
            'choices'     => [
                'labels' => [
                    'margin-top'  => esc_html__('Margin Top', 'author-kit'),
                    'margin-bottom'  => esc_html__('Margin Bottom', 'author-kit'),

                ],
            ],
        ],
        
        
        [
            'type'        => 'padding',
            'settings'    => 'author_kit_bio_box_padding_monarch',
            'label'       => esc_html__('Bio Box Padding', 'author-kit'),
            'section'     => 'author_kit_bio_box_section',
            'priority'    => 231,
            'responsive'  => true,
            'default'     => [
                'desktop' => [
                    'top'    => '35px',
                    'right'  => '25px',
                    'bottom' => '35px',
                    'left'   => '25px',
                ],
                'mobile' => [
                    'top'    => '35px',
                    'right'  => '15px',
                    'bottom' => '15px',
                    'left'   => '15px',
                ],
            ],
            'transport'   => 'postMessage',
            'choices'     => [
                'unit' => 'px',
            ],
            'output'      => [
                [
                    'element'       => '#author-bio-container #author-kit-bio-box',
                    'media_query'   => [
                        'desktop' => '@media (min-width: 768px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                    'property'      => 'padding',
                    'value_pattern' => '$',
                ],
            ],
        ],
        
   
        
        
        
        ];
        

    // Apply controls for the active template
    if (!empty($template_controls[$active_template])) {
        foreach ($template_controls[$active_template] as $control) {
            $control_type = $control['type'] ?? null;

            // Ensure the control type exists and the corresponding class is defined
            if ($control_type && !empty($control_classes[$control_type])) {
                $control_class = $control_classes[$control_type];

                if (class_exists($control_class)) {
                    new $control_class($control);
                } else {
                    continue;                }
            }
        }
    }
}
