<?php
/**
 * Controls class.
 *
 * @package SaveToWishlist\Classes\Admin\Settings
 * @since 1.0.0
 */
namespace SaveToWishlist\Classes\Admin\Settings;

use SaveToWishlist\Abstracts\Singleton;
use SaveToWishlist\Helpers\Helper_Functions;

/**
 * Class Controls
 *
 * This class serves as the controls class.
 */
class Controls extends Singleton {

    /**
     * Helper functions.
     *
     * @var Helper_Functions
     */
    private $helper_functions;

    /**
     * Constructor.
     *
     * @since 1.0.0
     * @access public
     */
    public function __construct() {
        $this->helper_functions = Helper_Functions::instance();
    }

    /**
     * Controls.
     *
     * @since 1.0.0
     * @access public
     * @return array
     */
    public function controls() {
        $controls = array();

        $controls['saveto_wishlist']['general']         = $this->_general_tab_controls();
        $controls['saveto_wishlist']['wishlist_page']   = $this->_wishlist_page_tab_controls();
        $controls['saveto_wishlist']['wishlist_guest']  = $this->_wishlist_guest_tab_controls();
        $controls['saveto_wishlist']['wishlist_button'] = $this->_wishlist_button_tab_controls();

        // Filter to modify default controls.
        $controls = apply_filters( 'stwlite_admin_setting_default_controls', $controls );

        return $controls;
    }

    /**
     * General tab controls.
     *
     * @since 1.0.0
     * @access private
     * @return array
     */
    private function _general_tab_controls() {
        $controls = array();

        // General settings.
        $general_fields = array();

        $add_cart_products_to_wishlist            = get_option( 'stwlite_settings_add_cart_products_to_wishlist', 'yes' );
        $add_cart_products_to_wishlist_option     = array(
            'type'        => 'switch',
            'label'       => __( 'Add cart products to wishlist', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_add_cart_products_to_wishlist',
            'description' => __( 'If Yes, allow to add products in the cart to the wishlist.', 'saveto-wishlist-lite-for-woocommerce' ),
            'options'     => array(
                'yes' => __( 'Yes', 'saveto-wishlist-lite-for-woocommerce' ),
                'no'  => __( 'No', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'default'     => $add_cart_products_to_wishlist,
        );
        $auto_remove_product_from_wishlist        = get_option( 'stwlite_settings_auto_remove_product_from_wishlist', 'yes' );
        $auto_remove_product_from_wishlist_option = array(
            'type'        => 'switch',
            'label'       => __( 'Auto remove product', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_auto_remove_product_from_wishlist',
            'description' => __( 'If Yes, the product will be automatically removed from the wishlist when it is added to the cart.', 'saveto-wishlist-lite-for-woocommerce' ),
            'options'     => array(
                'yes' => __( 'Yes', 'saveto-wishlist-lite-for-woocommerce' ),
                'no'  => __( 'No', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'default'     => $auto_remove_product_from_wishlist,
        );

        $cart_save_mode_option = array(
            'type'        => 'switch',
            'label'       => __( 'Cart item selection', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_cart_save_mode',
            'description' => __( 'When enabled, customers can choose which products to save to their wishlist from the cart.', 'saveto-wishlist-lite-for-woocommerce' ),
            'options'     => array(
                'yes' => __( 'Yes', 'saveto-wishlist-lite-for-woocommerce' ),
                'no'  => __( 'No', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'default'     => get_option( 'stwlite_settings_cart_save_mode', 'no' ),
            'hide'        => 'no' === $add_cart_products_to_wishlist,
            'condition'   => array(
                array(
                    'key'   => 'stwlite_settings_add_cart_products_to_wishlist',
                    'value' => 'yes',
                ),
            ),
        );

        $general_fields[] = $add_cart_products_to_wishlist_option;
        $general_fields[] = $cart_save_mode_option;
        $general_fields[] = $auto_remove_product_from_wishlist_option;

        $controls['save_to_wishlist_settings'] = $general_fields;

        // Action settings.
        $action_fields = array();

        // Get all published WordPress pages and add them as options.
        $page_options = $this->helper_functions->get_all_published_pages();

        $wishlist_page_redirect        = get_option( 'stwlite_wishlist_page' );
        $wishlist_page_redirect_option = array(
            'type'        => 'select',
            'label'       => __( 'Redirect page', 'saveto-wishlist-lite-for-woocommerce' ),
            'description' => __( 'User will be redirected to the selected page after adding a product to the wishlist.', 'saveto-wishlist-lite-for-woocommerce' ),
            'desc_tip'    => __( 'If no page is selected, the user will be redirected to the my account page.', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_wishlist_page',
            'options'     => $page_options,
            'default'     => $wishlist_page_redirect,
        );

        $wishlist_add_action_button        = get_option( 'stwlite_settings_wishlist_add_action_button', 'redirect' );
        $wishlist_add_action_button_option = array(
            'type'     => 'select',
            'label'    => __( 'Add to wishlist button', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_add_action_button',
            'default'  => $wishlist_add_action_button,
            'options'  => array(
                'redirect' => __( 'Redirect', 'saveto-wishlist-lite-for-woocommerce' ),
                'popup'    => __( 'Popup', 'saveto-wishlist-lite-for-woocommerce' ),
                'fade'     => __( 'Fade', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'desc_tip' => __( 'If the button is clicked, the customer will be redirected to the wishlist page, a popup will be displayed, or the button will fade to confirm the action.', 'saveto-wishlist-lite-for-woocommerce' ),
            'multiple' => false,
        );

        $action_fields[] = $wishlist_page_redirect_option;
        $action_fields[] = $wishlist_add_action_button_option;

        $controls['wishlist_action_settings'] = $action_fields;

        // Filter to modify general tab controls.
        $controls = apply_filters( 'stwlite_admin_setting_default_general_tab_controls', $controls );

        return $controls;
    }

    /**
     * Wishlist page tab controls.
     *
     * @since 1.0.0
     * @access private
     * @return array
     */
    private function _wishlist_page_tab_controls() {
        $controls      = array();
        $text_fields   = array();
        $switch_fields = array();

        $wishlist_title        = __( 'My Wishlists', 'saveto-wishlist-lite-for-woocommerce' );
        $wishlist_title        = get_option( 'stwlite_settings_wishlist_title', $wishlist_title );
        $wishlist_title_option = array(
            'type'     => 'text',
            'label'    => __( 'Wishlist Title', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_title',
            'default'  => $wishlist_title,
            'desc_tip' => __( 'The "Wishlist Title" seen in the frontpage.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_description        = __( 'Manage your wishlists', 'saveto-wishlist-lite-for-woocommerce' );
        $wishlist_description        = get_option( 'stwlite_settings_wishlist_description', $wishlist_description );
        $wishlist_description_option = array(
            'type'     => 'textarea',
            'label'    => __( 'Wishlist Description', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_description',
            'default'  => $wishlist_description,
            'desc_tip' => __( 'The "Wishlist Description" seen in the frontpage.', 'saveto-wishlist-lite-for-woocommerce' ),
            'editor'   => true,
        );

        $first_wishlist_label        = $this->helper_functions->get_default_wishlist_label();
        $first_wishlist_label_option = array(
            'type'     => 'text',
            'label'    => __( 'First Wishlist Label', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_first_wishlist_label',
            'default'  => $first_wishlist_label,
            'desc_tip' => __( 'The name given to the first wishlist automatically created for a new customer account.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $disable_my_account_page   = get_option( 'stwlite_settings_disable_my_account_page', 'no' );
        $disable_my_account_option = array(
            'type'        => 'switch',
            'label'       => __( 'Disable Wishlist in My Account', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_disable_my_account_page',
            'description' => __( 'If yes, Wishlist tab in the My account page will be disabled', 'saveto-wishlist-lite-for-woocommerce' ),
            'options'     => array(
                'yes' => __( 'Yes', 'saveto-wishlist-lite-for-woocommerce' ),
                'no'  => __( 'No', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'default'     => $disable_my_account_page,
        );

        $allow_multiple_wishlists        = get_option( 'stwlite_settings_allow_multiple_wishlists', 'yes' );
        $allow_multiple_wishlists_option = array(
            'type'        => 'switch',
            'label'       => __( 'Allow Multiple Wishlists', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_allow_multiple_wishlists',
            'description' => __( 'If yes, the user can create multiple wishlists.', 'saveto-wishlist-lite-for-woocommerce' ),
            'options'     => array(
                'yes' => __( 'Yes', 'saveto-wishlist-lite-for-woocommerce' ),
                'no'  => __( 'No', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'default'     => $allow_multiple_wishlists,
        );

        $text_fields[] = $wishlist_title_option;
        $text_fields[] = $wishlist_description_option;
        $text_fields[] = $first_wishlist_label_option;

        $controls['wishlist_page_text_settings'] = $text_fields;

        $show_product_image        = get_option( 'stwlite_settings_wishlist_page_show_product_image', 'yes' );
        $show_product_image_option = array(
            'type'        => 'switch',
            'label'       => __( 'Show Product Image', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_page_show_product_image',
            'description' => __( 'If yes, a product image column will be displayed in the wishlist items table.', 'saveto-wishlist-lite-for-woocommerce' ),
            'options'     => array(
                'yes' => __( 'Yes', 'saveto-wishlist-lite-for-woocommerce' ),
                'no'  => __( 'No', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'default'     => $show_product_image,
        );

        $switch_fields[] = $disable_my_account_option;
        $switch_fields[] = $allow_multiple_wishlists_option;
        $switch_fields[] = $show_product_image_option;

        $controls['wishlist_page_switch_settings'] = $switch_fields;

        // Wishlist page styles.
        $wishlist_page_styles_fields = array();

        $wishlist_page_heading_styles_title = array(
            'type'    => 'heading',
            'content' => __( 'Heading Styles', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'      => 'stwlite_settings_wishlist_page_heading_styles_title',
        );

        $wishlist_page_heading_title_size        = get_option( 'stwlite_settings_wishlist_page_heading_title_size', 28 );
        $wishlist_page_heading_title_size_option = array(
            'type'     => 'number',
            'label'    => __( 'Heading Title Size', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_heading_title_size',
            'default'  => $wishlist_page_heading_title_size,
            'min'      => 10,
            'max'      => 40,
            'step'     => 1,
            'desc_tip' => __( 'Wishlist heading title size on wishlist page. This option will be used for the heading with title size. The default value is 28px.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $default_wishlist_page_heading_title_color = '#000000';
        $wishlist_page_heading_title_color         = get_option( 'stwlite_settings_wishlist_page_heading_title_color', $default_wishlist_page_heading_title_color );
        $wishlist_page_heading_title_color_option  = array(
            'type'     => 'color_picker',
            'label'    => __( 'Heading Title Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_heading_title_color',
            'default'  => $wishlist_page_heading_title_color,
            'desc_tip' => __( 'Wishlist heading title color on wishlist page. This option will be used for the heading with title color.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_heading_text_size        = get_option( 'stwlite_settings_wishlist_page_heading_text_size', 14 );
        $wishlist_page_heading_text_size_option = array(
            'type'     => 'number',
            'label'    => __( 'Heading Text Size', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_heading_text_size',
            'default'  => $wishlist_page_heading_text_size,
            'min'      => 10,
            'max'      => 24,
            'step'     => 1,
            'desc_tip' => __( 'Wishlist heading description size on wishlist page. This option will be used for the heading with description size. The default value is 14px.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $default_wishlist_page_heading_text_color = '#000000';
        $wishlist_page_heading_text_color         = get_option( 'stwlite_settings_wishlist_page_heading_text_color', $default_wishlist_page_heading_text_color );
        $wishlist_page_heading_text_color_option  = array(
            'type'     => 'color_picker',
            'label'    => __( 'Heading Text Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_heading_text_color',
            'default'  => $wishlist_page_heading_text_color,
            'desc_tip' => __( 'Wishlist heading text color on wishlist page. This option will be used for the heading with text color.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_table_styles_title = array(
            'type'    => 'heading',
            'content' => __( 'Table Styles', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'      => 'stwlite_settings_wishlist_page_table_styles_title',
        );

        $wishlist_page_table_column_text_size        = get_option( 'stwlite_settings_wishlist_page_table_column_text_size', 14 );
        $wishlist_page_table_column_text_size_option = array(
            'type'     => 'number',
            'label'    => __( 'Table Column Text Size', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_table_column_text_size',
            'default'  => $wishlist_page_table_column_text_size,
            'min'      => 10,
            'max'      => 24,
            'step'     => 1,
            'desc_tip' => __( 'Wishlist table column text size on wishlist page. This option will be used for the table with column text size. The default value is 14px.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_table_row_text_size        = get_option( 'stwlite_settings_wishlist_page_table_row_text_size', 14 );
        $wishlist_page_table_row_text_size_option = array(
            'type'     => 'number',
            'label'    => __( 'Table Row Text Size', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_table_row_text_size',
            'default'  => $wishlist_page_table_row_text_size,
            'min'      => 10,
            'max'      => 24,
            'step'     => 1,
            'desc_tip' => __( 'Wishlist table row text size on wishlist page. This option will be used for the table with row text size. The default value is 14px.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_popup_styles_title = array(
            'type'    => 'heading',
            'content' => __( 'Popup Styles', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'      => 'stwlite_settings_wishlist_page_popup_styles_title',
        );

        $wishlist_page_popup_title_size        = get_option( 'stwlite_settings_wishlist_page_popup_title_size', 32 );
        $wishlist_page_popup_title_size_option = array(
            'type'     => 'number',
            'label'    => __( 'Popup Title Size', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_popup_title_size',
            'default'  => $wishlist_page_popup_title_size,
            'min'      => 10,
            'max'      => 40,
            'step'     => 1,
            'desc_tip' => __( 'Wishlist popup title size on wishlist page. This option will be used for the popup with title size. The default value is 32px.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_popup_title_color        = get_option( 'stwlite_settings_wishlist_page_popup_title_color', '#000000' );
        $wishlist_page_popup_title_color_option = array(
            'type'     => 'color_picker',
            'label'    => __( 'Popup Title Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_popup_title_color',
            'default'  => $wishlist_page_popup_title_color,
            'desc_tip' => __( 'Wishlist popup title color on wishlist page. This option will be used for the popup with title color. The default value is #000000.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_popup_text_size        = get_option( 'stwlite_settings_wishlist_page_popup_text_size', 14 );
        $wishlist_page_popup_text_size_option = array(
            'type'     => 'number',
            'label'    => __( 'Popup Text Size', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_popup_text_size',
            'default'  => $wishlist_page_popup_text_size,
            'min'      => 10,
            'max'      => 24,
            'step'     => 1,
            'desc_tip' => __( 'Wishlist popup text size on wishlist page. This option will be used for the popup with text size. The default value is 14px.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_popup_text_color        = get_option( 'stwlite_settings_wishlist_page_popup_text_color', '#000000' );
        $wishlist_page_popup_text_color_option = array(
            'type'     => 'color_picker',
            'label'    => __( 'Popup Text Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_popup_text_color',
            'default'  => $wishlist_page_popup_text_color,
            'desc_tip' => __( 'Wishlist popup text color on wishlist page. This option will be used for the popup with text color. The default value is #000000.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_popup_button_text_size        = get_option( 'stwlite_settings_wishlist_page_popup_button_text_size', 14 );
        $wishlist_page_popup_button_text_size_option = array(
            'type'     => 'number',
            'label'    => __( 'Popup Button Text Size', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_popup_button_text_size',
            'default'  => $wishlist_page_popup_button_text_size,
            'min'      => 10,
            'max'      => 24,
            'step'     => 1,
            'desc_tip' => __( 'Wishlist popup button text size on wishlist page. This option will be used for the popup with button text size. The default value is 14px.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_popup_save_button_text_color        = get_option( 'stwlite_settings_wishlist_page_popup_save_button_text_color', '#FFFFFF' );
        $wishlist_page_popup_save_button_text_color_option = array(
            'type'     => 'color_picker',
            'label'    => __( 'Popup Save Button Text Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_popup_save_button_text_color',
            'default'  => $wishlist_page_popup_save_button_text_color,
            'desc_tip' => __( 'Wishlist popup save button text color on wishlist page. This option will be used for the popup with save button text color. The default value is #FFFFFF.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_popup_save_button_background_color        = get_option( 'stwlite_settings_wishlist_page_popup_save_button_background_color', '#3B82F6' );
        $wishlist_page_popup_save_button_background_color_option = array(
            'type'     => 'color_picker',
            'label'    => __( 'Popup Save Button Background Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_popup_save_button_background_color',
            'default'  => $wishlist_page_popup_save_button_background_color,
            'desc_tip' => __( 'Wishlist popup save button background color on wishlist page. This option will be used for the popup with save button background color. The default value is #3B82F6.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_popup_cancel_button_text_color        = get_option( 'stwlite_settings_wishlist_page_popup_cancel_button_text_color', '#FFFFFF' );
        $wishlist_page_popup_cancel_button_text_color_option = array(
            'type'     => 'color_picker',
            'label'    => __( 'Popup Cancel Button Text Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_popup_cancel_button_text_color',
            'default'  => $wishlist_page_popup_cancel_button_text_color,
            'desc_tip' => __( 'Wishlist popup cancel button text color on wishlist page. This option will be used for the popup with cancel button text color. The default value is #FFFFFF.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_popup_cancel_button_background_color        = get_option( 'stwlite_settings_wishlist_page_popup_cancel_button_background_color', '#EF4444' );
        $wishlist_page_popup_cancel_button_background_color_option = array(
            'type'     => 'color_picker',
            'label'    => __( 'Popup Cancel Button Background Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_popup_cancel_button_background_color',
            'default'  => $wishlist_page_popup_cancel_button_background_color,
            'desc_tip' => __( 'Wishlist popup cancel button background color on wishlist page. This option will be used for the popup with cancel button background color. The default value is #EF4444.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $wishlist_page_button_styles_title = array(
            'type'    => 'heading',
            'content' => __( 'Button Styles', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'      => 'stwlite_settings_wishlist_page_button_styles_title',
        );

        $wishlist_page_button_text_size        = get_option( 'stwlite_settings_wishlist_page_button_text_size', 14 );
        $wishlist_page_button_text_size_option = array(
            'type'     => 'number',
            'label'    => __( 'Button Text Size', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_button_text_size',
            'default'  => $wishlist_page_button_text_size,
            'min'      => 10,
            'max'      => 24,
            'step'     => 1,
            'desc_tip' => __( 'Wishlist button text size on wishlist page. This option will be used for the button with text size. The default value is 14px.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $default_wishlist_page_button_text_color = '#FFFFFF';
        $wishlist_page_button_text_color         = get_option( 'stwlite_settings_wishlist_page_button_text_color', $default_wishlist_page_button_text_color );
        $wishlist_page_button_text_color_option  = array(
            'type'     => 'color_picker',
            'label'    => __( 'Button Text Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_button_text_color',
            'default'  => $wishlist_page_button_text_color,
            'desc_tip' => __( 'Wishlist button text color on wishlist page. This option will be used for the button with text color.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $default_wishlist_page_button_background_color = '#3B82F6';
        $wishlist_page_button_background_color         = get_option( 'stwlite_settings_wishlist_page_button_background_color', $default_wishlist_page_button_background_color );
        $wishlist_page_button_background_color_option  = array(
            'type'     => 'color_picker',
            'label'    => __( 'Button Background Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_page_button_background_color',
            'default'  => $wishlist_page_button_background_color,
            'desc_tip' => __( 'Wishlist button background color on wishlist page. This option will be used for the button with background color.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        // Heading styles.
        $wishlist_page_styles_fields[] = $wishlist_page_heading_styles_title;
        $wishlist_page_styles_fields[] = $wishlist_page_heading_title_size_option;
        $wishlist_page_styles_fields[] = $wishlist_page_heading_title_color_option;
        $wishlist_page_styles_fields[] = $wishlist_page_heading_text_size_option;
        $wishlist_page_styles_fields[] = $wishlist_page_heading_text_color_option;

        // Table styles.
        $wishlist_page_styles_fields[] = $wishlist_page_table_styles_title;
        $wishlist_page_styles_fields[] = $wishlist_page_table_column_text_size_option;
        $wishlist_page_styles_fields[] = $wishlist_page_table_row_text_size_option;

        // Popup styles.
        $wishlist_page_styles_fields[] = $wishlist_page_popup_styles_title;
        $wishlist_page_styles_fields[] = $wishlist_page_popup_title_size_option;
        $wishlist_page_styles_fields[] = $wishlist_page_popup_title_color_option;
        $wishlist_page_styles_fields[] = $wishlist_page_popup_text_size_option;
        $wishlist_page_styles_fields[] = $wishlist_page_popup_text_color_option;
        $wishlist_page_styles_fields[] = $wishlist_page_popup_button_text_size_option;
        $wishlist_page_styles_fields[] = $wishlist_page_popup_save_button_text_color_option;
        $wishlist_page_styles_fields[] = $wishlist_page_popup_save_button_background_color_option;
        $wishlist_page_styles_fields[] = $wishlist_page_popup_cancel_button_text_color_option;
        $wishlist_page_styles_fields[] = $wishlist_page_popup_cancel_button_background_color_option;

        // Button styles.
        $wishlist_page_styles_fields[] = $wishlist_page_button_styles_title;
        $wishlist_page_styles_fields[] = $wishlist_page_button_text_size_option;
        $wishlist_page_styles_fields[] = $wishlist_page_button_text_color_option;
        $wishlist_page_styles_fields[] = $wishlist_page_button_background_color_option;

        $controls['wishlist_page_styles_settings'] = $wishlist_page_styles_fields;

        // Filter to modify wishlist page tab controls.
        $controls = apply_filters( 'stwlite_admin_setting_default_wishlist_page_tab_controls', $controls );

        return $controls;
    }

    /**
     * Wishlist guest tab controls.
     *
     * @since 1.0.0
     * @access private
     * @return array
     */
    private function _wishlist_guest_tab_controls() {
        $controls = array();
        $fields   = array();

        $disable_guest_wishlist              = get_option( 'stwlite_settings_disable_guest_wishlist', 'no' );
        $dependencies_disable_guest_wishlist = 'yes' === $disable_guest_wishlist;

        $disable_guest_wishlist_option = array(
            'type'        => 'switch',
            'label'       => __( 'Disable Guest Wishlist', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_disable_guest_wishlist',
            'description' => __( 'If yes, the guest wishlist will be disabled.', 'saveto-wishlist-lite-for-woocommerce' ),
            'options'     => array(
                'yes' => __( 'Yes', 'saveto-wishlist-lite-for-woocommerce' ),
                'no'  => __( 'No', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'default'     => $disable_guest_wishlist,
        );

        $show_login_create_link        = get_option( 'stwlite_settings_show_login_create_link', 'yes' );
        $show_login_create_link_option = array(
            'type'        => 'select',
            'label'       => __( 'Always Show Login/Create Account Link', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_show_login_create_link',
            'description' => __( 'If Yes, the login/create account link will be shown on the confirmation popup.', 'saveto-wishlist-lite-for-woocommerce' ),
            'options'     => array(
                'yes' => __( 'Yes', 'saveto-wishlist-lite-for-woocommerce' ),
                'no'  => __( 'No', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'default'     => $show_login_create_link,
            'hide'        => $dependencies_disable_guest_wishlist,
            'condition'   => array(
                array(
                    'key'   => 'stwlite_settings_disable_guest_wishlist',
                    'value' => 'no',
                ),
            ),
        );

        $fields[] = $disable_guest_wishlist_option;
        $fields[] = $show_login_create_link_option;

        $controls['wishlist_guest_settings'] = $fields;

        // Filter to modify wishlist guest tab controls.
        $controls = apply_filters( 'stwlite_admin_setting_default_wishlist_guest_tab_controls', $controls );

        return $controls;
    }

    /**
     * Wishlist button tab controls.
     *
     * @since 1.0.0
     * @access private
     * @return array
     */
    private function _wishlist_button_tab_controls() {
        $controls = array();

        // Button settings.
        $button_fields = array();

        $default_wishlist_button_label = __( 'Save to Wishlist', 'saveto-wishlist-lite-for-woocommerce' );
        $wishlist_button_label         = get_option( 'stwlite_settings_wishlist_button_label', $default_wishlist_button_label );
        $wishlist_button_label_option  = array(
            'type'     => 'text',
            'label'    => __( 'Wishlist Button Label', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_button_label',
            'default'  => $wishlist_button_label,
            'desc_tip' => __( 'The "Wishlist Button Label" seen in the frontpage.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $default_selected_wishlist_button_label = __( 'Remove from Wishlist', 'saveto-wishlist-lite-for-woocommerce' );
        $selected_wishlist_button_label         = get_option( 'stwlite_settings_wishlist_button_selected_label', $default_selected_wishlist_button_label );
        $selected_wishlist_button_label_option  = array(
            'type'     => 'text',
            'label'    => __( 'Selected Wishlist Button Label', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_button_selected_label',
            'default'  => $selected_wishlist_button_label,
            'desc_tip' => __( 'The "Selected Wishlist Button Label" seen in the frontpage after adding a product to the wishlist.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $button_fields[] = $wishlist_button_label_option;
        $button_fields[] = $selected_wishlist_button_label_option;

        $controls['wishlist_button_settings'] = $button_fields;

        // Frontend styling settings.
        $frontend_styling_fields = array();

        $frontend_css_mode        = get_option( 'stwlite_settings_frontend_css_mode', 'full' );
        $frontend_css_mode_option = array(
            'type'        => 'select',
            'label'       => __( 'Frontend CSS Loading', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_frontend_css_mode',
            'default'     => $frontend_css_mode,
            'options'     => array(
                'full'    => __( 'Full styling — use the plugin\'s colors and fonts', 'saveto-wishlist-lite-for-woocommerce' ),
                'minimal' => __( 'Minimal styling — let your theme override colors and fonts', 'saveto-wishlist-lite-for-woocommerce' ),
                'none'    => __( 'No styling — inherit colors and fonts from the active theme', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'description' => __( 'Controls only the colors and fonts of the wishlist UI. Button sizes, positions and layout are preserved in every mode. Admin styles are not affected.', 'saveto-wishlist-lite-for-woocommerce' ),
            'multiple'    => false,
        );

        $frontend_styling_fields[] = $frontend_css_mode_option;

        $controls['wishlist_frontend_styling_settings'] = $frontend_styling_fields;

        // Product page settings.
        $product_page_fields = array();

        $wishlist_button_product_placement        = get_option( 'stwlite_settings_wishlist_button_product_placement', 'bottom_cart' );
        $wishlist_button_product_placement_option = array(
            'type'     => 'select',
            'label'    => __( 'Button Placement', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_button_product_placement',
            'default'  => $wishlist_button_product_placement,
            'options'  => array(
                'top_image_right' => __( 'Top Right of the Product Image', 'saveto-wishlist-lite-for-woocommerce' ),
                'top_image_left'  => __( 'Top Left of the Product Image', 'saveto-wishlist-lite-for-woocommerce' ),
                'top_cart'        => __( 'Above the Add to Cart Button', 'saveto-wishlist-lite-for-woocommerce' ),
                'bottom_cart'     => __( 'Below the Add to Cart Button', 'saveto-wishlist-lite-for-woocommerce' ),
                'top_title'       => __( 'Above the Product Title', 'saveto-wishlist-lite-for-woocommerce' ),
                'bottom_title'    => __( 'Below the Product Title', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'desc_tip' => __( 'Wishlist button placement on product page.', 'saveto-wishlist-lite-for-woocommerce' ),
            'multiple' => false,
        );

        $product_page_fields[] = $wishlist_button_product_placement_option;

        // Add mode selector (Preset or Custom).
        $product_page_mode        = get_option( 'stwlite_settings_wishlist_button_product_mode', 'preset' );
        $product_page_mode_option = array(
            'type'           => 'radio',
            'label'          => __( 'Configuration Mode', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'             => 'stwlite_settings_wishlist_button_product_mode',
            'default'        => $product_page_mode,
            'options'        => array(
                'preset' => __( 'Use Presets', 'saveto-wishlist-lite-for-woocommerce' ),
                'custom' => __( 'Custom Settings', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'desc_tip'       => __( 'Choose between using preset styles or customizing settings manually.', 'saveto-wishlist-lite-for-woocommerce' ),
            'with_condition' => true,
        );

        $product_page_fields[] = $product_page_mode_option;

        // Add preset options for quick style selection.
        $product_presets = get_option( 'stwlite_settings_wishlist_button_product_preset', 'minimal_dark' );
        $preset_option   = array(
            'type'        => 'preset',
            'label'       => __( 'Style Presets', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_product_preset',
            'description' => __( 'Choose from pre-configured style combinations to quickly apply a professional look to your wishlist buttons.', 'saveto-wishlist-lite-for-woocommerce' ),
            'presets'     => $this->get_preset_config( 'product', $wishlist_button_label ),
            'default'     => $product_presets ?? 'minimal_dark',
        );

        // Hide the preset option if the mode is custom.
        $preset_option['hide'] = 'custom' === $product_page_mode;

        // Add preset condition for product page.
        $preset_option['condition'] = array(
            array(
                'key'   => 'stwlite_settings_wishlist_button_product_mode',
                'value' => 'preset',
            ),
        );

        $product_page_fields[] = $preset_option;

        // Add heading control for the product page settings.
        $product_custom_heading_option = array(
            'type'    => 'heading',
            'content' => __( 'Customize the wishlist button on the product page', 'saveto-wishlist-lite-for-woocommerce' ),
            'classes' => 'stwlite-tw-text-lg stwlite-tw-font-bold stwlite-tw-mb-4',
        );

        $default_wishlist_button_text_color        = '#1F2937';
        $wishlist_button_text_color                = get_option( 'stwlite_settings_wishlist_button_product_text_color', $default_wishlist_button_text_color );
        $wishlist_button_product_text_color_option = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Text Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_product_text_color',
            'default'     => $wishlist_button_text_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button text color on product page. This option will be used for the button with text.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_product_style',
        );

        $default_wishlist_button_hover_text_color        = '#DC2626';
        $wishlist_button_hover_text_color                = get_option( 'stwlite_settings_wishlist_button_product_hover_text_color', $default_wishlist_button_hover_text_color );
        $wishlist_button_product_hover_text_color_option = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Hover Text Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_product_hover_text_color',
            'default'     => $wishlist_button_hover_text_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button hover text color on product page. This option will be used for the button with text.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_product_style',
        );

        $default_wishlist_button_background_color        = '#FFFFFF';
        $wishlist_button_background_color                = get_option( 'stwlite_settings_wishlist_button_product_background_color', $default_wishlist_button_background_color );
        $wishlist_button_product_background_color_option = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Background Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_product_background_color',
            'default'     => $wishlist_button_background_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button background color on product page. This option will be used for the button with background color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_product_style',
        );

        $default_wishlist_button_hover_background_color        = '#F9FAFB';
        $wishlist_button_hover_background_color                = get_option( 'stwlite_settings_wishlist_button_product_hover_background_color', $default_wishlist_button_hover_background_color );
        $wishlist_button_product_hover_background_color_option = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Hover Background Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_product_hover_background_color',
            'default'     => $wishlist_button_hover_background_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button hover background color on product page. This option will be used for the button with background color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_product_style',
        );

        $default_wishlist_button_border_color        = '#E5E7EB';
        $wishlist_button_border_color                = get_option( 'stwlite_settings_wishlist_button_product_border_color', $default_wishlist_button_border_color );
        $wishlist_button_product_border_color_option = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Border Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_product_border_color',
            'default'     => $wishlist_button_border_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button border color on product page. This option will be used for the button with border color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_product_style',
        );

        $default_wishlist_button_hover_border_color        = '#DC2626';
        $wishlist_button_hover_border_color                = get_option( 'stwlite_settings_wishlist_button_product_hover_border_color', $default_wishlist_button_hover_border_color );
        $wishlist_button_product_hover_border_color_option = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Hover Border Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_product_hover_border_color',
            'default'     => $wishlist_button_hover_border_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button hover border color on product page. This option will be used for the button with border color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_product_style',
        );

        $default_wishlist_button_border_width        = 1;
        $wishlist_button_border_width                = get_option( 'stwlite_settings_wishlist_button_product_border_width', $default_wishlist_button_border_width );
        $wishlist_button_product_border_width_option = array(
            'type'        => 'number',
            'label'       => __( 'Button Border Width', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_product_border_width',
            'default'     => $wishlist_button_border_width,
            'min'         => 0,
            'max'         => 5,
            'step'        => 1,
            'desc_tip'    => __( 'Wishlist button border width on product page. This option will be used for the button with border width.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_product_style',
        );

        $default_wishlist_button_icon_color        = '#DC2626';
        $wishlist_button_icon_color                = get_option( 'stwlite_settings_wishlist_button_product_icon_color', $default_wishlist_button_icon_color );
        $wishlist_button_product_icon_color_option = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Icon Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_product_icon_color',
            'default'     => $wishlist_button_icon_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button icon color on product page. This option will be used for the button with icon color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_product_style',
        );

        $wishlist_button_text_size                = get_option( 'stwlite_settings_wishlist_button_product_text_size', 14 );
        $wishlist_button_product_text_size_option = array(
            'type'        => 'number',
            'label'       => __( 'Button Text Size', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_product_text_size',
            'default'     => $wishlist_button_text_size,
            'min'         => 10,
            'max'         => 24,
            'step'        => 1,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button text size on product page. This option will be used for the button with text size. The default value is 14px.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_product_style',
        );

        $wishlist_button_text_style                = get_option( 'stwlite_settings_wishlist_button_product_text_style', 'normal' );
        $wishlist_button_product_text_style_option = array(
            'type'        => 'select',
            'label'       => __( 'Button Text Style', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_product_text_style',
            'default'     => $wishlist_button_text_style,
            'options'     => array(
                'normal' => __( 'Normal', 'saveto-wishlist-lite-for-woocommerce' ),
                'italic' => __( 'Italic', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'desc_tip'    => __( 'Wishlist button text style on product page. This option will be used for the button with text style. The default value is normal.', 'saveto-wishlist-lite-for-woocommerce' ),
            'multiple'    => false,
            'preview'     => true,
            'preview_ref' => 'stwlite_settings_wishlist_button_product_style',
        );

        $wishlist_button_product_style        = get_option( 'stwlite_settings_wishlist_button_product_style', 'minimal_and_text' );
        $wishlist_button_product_style_option = array(
            'type'            => 'select',
            'label'           => __( 'Button Type', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'              => 'stwlite_settings_wishlist_button_product_style',
            'default'         => $wishlist_button_product_style,
            'options'         => array(
                'text_only'             => __( 'Text Only', 'saveto-wishlist-lite-for-woocommerce' ),
                'icon_only'             => __( 'Icon Only', 'saveto-wishlist-lite-for-woocommerce' ),
                'icon_and_text'         => __( 'Icon and Text', 'saveto-wishlist-lite-for-woocommerce' ),
                'icon_and_text_pill'    => __( 'Icon and Text Pill', 'saveto-wishlist-lite-for-woocommerce' ),
                'solid_icon'            => __( 'Solid Icon', 'saveto-wishlist-lite-for-woocommerce' ),
                'solid_and_text'        => __( 'Solid Icon and Text', 'saveto-wishlist-lite-for-woocommerce' ),
                'solid_and_text_pill'   => __( 'Solid Icon and Text Pill', 'saveto-wishlist-lite-for-woocommerce' ),
                'minimal_icon'          => __( 'Minimal Icon', 'saveto-wishlist-lite-for-woocommerce' ),
                'minimal_and_text'      => __( 'Minimal Icon and Text', 'saveto-wishlist-lite-for-woocommerce' ),
                'minimal_and_text_pill' => __( 'Minimal Icon and Text Pill', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'preview'         => true,
            'preview_options' => array(
                'text_color'             => 'stwlite_settings_wishlist_button_product_text_color',
                'hover_text_color'       => 'stwlite_settings_wishlist_button_product_hover_text_color',
                'background_color'       => 'stwlite_settings_wishlist_button_product_background_color',
                'hover_background_color' => 'stwlite_settings_wishlist_button_product_hover_background_color',
                'border_color'           => 'stwlite_settings_wishlist_button_product_border_color',
                'hover_border_color'     => 'stwlite_settings_wishlist_button_product_hover_border_color',
                'border_width'           => 'stwlite_settings_wishlist_button_product_border_width',
                'icon_color'             => 'stwlite_settings_wishlist_button_product_icon_color',
                'text_size'              => 'stwlite_settings_wishlist_button_product_text_size',
                'text_style'             => 'stwlite_settings_wishlist_button_product_text_style',
            ),
            'desc_tip'        => __( 'Wishlist button style on product page.', 'saveto-wishlist-lite-for-woocommerce' ),
            'description'     => __( 'Checkout the preview to see the button style for both normal and hover state.', 'saveto-wishlist-lite-for-woocommerce' ),
            'multiple'        => false,
        );

        // Collect custom fields into array for applying preset conditions.
        $product_custom_fields = array(
            &$product_custom_heading_option,
            &$wishlist_button_product_text_color_option,
            &$wishlist_button_product_hover_text_color_option,
            &$wishlist_button_product_background_color_option,
            &$wishlist_button_product_hover_background_color_option,
            &$wishlist_button_product_border_color_option,
            &$wishlist_button_product_hover_border_color_option,
            &$wishlist_button_product_border_width_option,
            &$wishlist_button_product_icon_color_option,
            &$wishlist_button_product_text_size_option,
            &$wishlist_button_product_text_style_option,
            &$wishlist_button_product_style_option,
        );

        // Apply preset conditions programmatically.
        $this->apply_preset_conditions(
            $product_custom_fields,
            'stwlite_settings_wishlist_button_product_mode',
            'preset' === $product_page_mode
        );

        // Add fields to product page fields array.
        $product_page_fields[] = $product_custom_heading_option;
        $product_page_fields[] = $wishlist_button_product_text_color_option;
        $product_page_fields[] = $wishlist_button_product_hover_text_color_option;
        $product_page_fields[] = $wishlist_button_product_background_color_option;
        $product_page_fields[] = $wishlist_button_product_hover_background_color_option;
        $product_page_fields[] = $wishlist_button_product_border_color_option;
        $product_page_fields[] = $wishlist_button_product_hover_border_color_option;
        $product_page_fields[] = $wishlist_button_product_border_width_option;
        $product_page_fields[] = $wishlist_button_product_icon_color_option;
        $product_page_fields[] = $wishlist_button_product_text_size_option;
        $product_page_fields[] = $wishlist_button_product_text_style_option;
        $product_page_fields[] = $wishlist_button_product_style_option;

        $controls['wishlist_product_page_settings'] = $product_page_fields;

        // Shop page settings.
        $shop_page_fields = array();

        $wishlist_button_shop_placement        = get_option( 'stwlite_settings_wishlist_button_shop_placement', 'below_button' );
        $wishlist_button_shop_placement_option = array(
            'type'     => 'select',
            'label'    => __( 'Button Placement', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_button_shop_placement',
            'default'  => $wishlist_button_shop_placement,
            'options'  => array(
                'top_right'    => __( 'Top Right of the Product Image', 'saveto-wishlist-lite-for-woocommerce' ),
                'top_left'     => __( 'Top Left of the Product Image', 'saveto-wishlist-lite-for-woocommerce' ),
                'above_title'  => __( 'Above the Product Title', 'saveto-wishlist-lite-for-woocommerce' ),
                'below_title'  => __( 'Below the Product Title', 'saveto-wishlist-lite-for-woocommerce' ),
                'above_button' => __( 'Above the Add to Cart Button', 'saveto-wishlist-lite-for-woocommerce' ),
                'below_button' => __( 'Below the Add to Cart Button', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'desc_tip' => __( 'Wishlist button placement on shop page.', 'saveto-wishlist-lite-for-woocommerce' ),
            'multiple' => false,
        );

        $shop_page_fields[] = $wishlist_button_shop_placement_option;

        // Add mode selector (Preset or Custom) for shop page.
        $shop_page_mode        = get_option( 'stwlite_settings_wishlist_button_shop_mode', 'preset' );
        $shop_page_mode_option = array(
            'type'           => 'radio',
            'label'          => __( 'Configuration Mode', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'             => 'stwlite_settings_wishlist_button_shop_mode',
            'default'        => $shop_page_mode,
            'options'        => array(
                'preset' => __( 'Use Presets', 'saveto-wishlist-lite-for-woocommerce' ),
                'custom' => __( 'Custom Settings', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'desc_tip'       => __( 'Choose between using preset styles or customizing settings manually.', 'saveto-wishlist-lite-for-woocommerce' ),
            'with_condition' => true,
        );

        $shop_page_fields[] = $shop_page_mode_option;

        // Add preset options for quick style selection.
        $shop_presets       = get_option( 'stwlite_settings_wishlist_button_shop_preset', 'minimal_dark' );
        $shop_preset_option = array(
            'type'        => 'preset',
            'label'       => __( 'Style Presets', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_shop_preset',
            'description' => __( 'Choose from pre-configured style combinations to quickly apply a professional look to your wishlist buttons on shop pages.', 'saveto-wishlist-lite-for-woocommerce' ),
            'hide'        => 'custom' === $shop_page_mode,
            'presets'     => $this->get_preset_config( 'shop', $wishlist_button_label ),
            'default'     => $shop_presets ?? 'minimal_dark',
        );

        // Add preset condition for shop page.
        $shop_preset_option['condition'] = array(
            array(
                'key'   => 'stwlite_settings_wishlist_button_shop_mode',
                'value' => 'preset',
            ),
        );

        $shop_page_fields[] = $shop_preset_option;

        // Add heading control for the shop page settings.
        $shop_custom_heading_option = array(
            'type'    => 'heading',
            'content' => __( 'Customize the wishlist button on the shop page', 'saveto-wishlist-lite-for-woocommerce' ),
            'classes' => 'stwlite-tw-text-lg stwlite-tw-font-bold stwlite-tw-mb-4',
        );

        $default_wishlist_button_shop_text_color = '#1F2937';
        $wishlist_button_shop_text_color         = get_option( 'stwlite_settings_wishlist_button_shop_text_color', $default_wishlist_button_shop_text_color );
        $wishlist_button_shop_text_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Text Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_shop_text_color',
            'default'     => $wishlist_button_shop_text_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button text color on shop page. This option will be used for the button with text.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_shop_style',
        );

        $default_wishlist_button_shop_hover_text_color = '#DC2626';
        $wishlist_button_shop_hover_text_color         = get_option( 'stwlite_settings_wishlist_button_shop_hover_text_color', $default_wishlist_button_shop_hover_text_color );
        $wishlist_button_shop_hover_text_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Hover Text Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_shop_hover_text_color',
            'default'     => $wishlist_button_shop_hover_text_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button hover text color on shop page. This option will be used for the button with text.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_shop_style',
        );

        $default_wishlist_button_shop_background_color = '#FFFFFF';
        $wishlist_button_shop_background_color         = get_option( 'stwlite_settings_wishlist_button_shop_background_color', $default_wishlist_button_shop_background_color );
        $wishlist_button_shop_background_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Background Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_shop_background_color',
            'default'     => $wishlist_button_shop_background_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button background color on shop page. This option will be used for the button with background color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_shop_style',
        );

        $default_wishlist_button_shop_hover_background_color = '#F9FAFB';
        $wishlist_button_shop_hover_background_color         = get_option( 'stwlite_settings_wishlist_button_shop_hover_background_color', $default_wishlist_button_shop_hover_background_color );
        $wishlist_button_shop_hover_background_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Hover Background Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_shop_hover_background_color',
            'default'     => $wishlist_button_shop_hover_background_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button hover background color on shop page. This option will be used for the button with background color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_shop_style',
        );

        $default_wishlist_button_shop_border_color = '#E5E7EB';
        $wishlist_button_shop_border_color         = get_option( 'stwlite_settings_wishlist_button_shop_border_color', $default_wishlist_button_shop_border_color );
        $wishlist_button_shop_border_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Border Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_shop_border_color',
            'default'     => $wishlist_button_shop_border_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button border color on shop page. This option will be used for the button with border color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_shop_style',
        );

        $default_wishlist_button_shop_hover_border_color = '#DC2626';
        $wishlist_button_shop_hover_border_color         = get_option( 'stwlite_settings_wishlist_button_shop_hover_border_color', $default_wishlist_button_shop_hover_border_color );
        $wishlist_button_shop_hover_border_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Hover Border Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_shop_hover_border_color',
            'default'     => $wishlist_button_shop_hover_border_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button hover border color on shop page. This option will be used for the button with border color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_shop_style',
        );

        $default_wishlist_button_shop_border_width = 1;
        $wishlist_button_shop_border_width         = get_option( 'stwlite_settings_wishlist_button_shop_border_width', $default_wishlist_button_shop_border_width );
        $wishlist_button_shop_border_width_option  = array(
            'type'        => 'number',
            'label'       => __( 'Button Border Width', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_shop_border_width',
            'default'     => $wishlist_button_shop_border_width,
            'min'         => 0,
            'max'         => 5,
            'step'        => 1,
            'desc_tip'    => __( 'Wishlist button border width on shop page. This option will be used for the button with border width.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_shop_style',
        );

        $default_wishlist_button_shop_icon_color = '#DC2626';
        $wishlist_button_shop_icon_color         = get_option( 'stwlite_settings_wishlist_button_shop_icon_color', $default_wishlist_button_shop_icon_color );
        $wishlist_button_shop_icon_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Icon Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_shop_icon_color',
            'default'     => $wishlist_button_shop_icon_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button icon color on shop page. This option will be used for the button with icon color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_shop_style',
        );

        $wishlist_button_shop_text_size        = get_option( 'stwlite_settings_wishlist_button_shop_text_size', 14 );
        $wishlist_button_shop_text_size_option = array(
            'type'        => 'number',
            'label'       => __( 'Button Text Size', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_shop_text_size',
            'default'     => $wishlist_button_shop_text_size,
            'min'         => 10,
            'max'         => 24,
            'step'        => 1,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button text size on shop page. This option will be used for the button with text size. The default value is 14px.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_shop_style',
        );

        $wishlist_button_shop_text_style        = get_option( 'stwlite_settings_wishlist_button_shop_text_style', 'normal' );
        $wishlist_button_shop_text_style_option = array(
            'type'        => 'select',
            'label'       => __( 'Button Text Style', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_shop_text_style',
            'default'     => $wishlist_button_shop_text_style,
            'options'     => array(
                'normal' => __( 'Normal', 'saveto-wishlist-lite-for-woocommerce' ),
                'italic' => __( 'Italic', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'desc_tip'    => __( 'Wishlist button text style on shop page. This option will be used for the button with text style. The default value is normal.', 'saveto-wishlist-lite-for-woocommerce' ),
            'multiple'    => false,
            'preview'     => true,
            'preview_ref' => 'stwlite_settings_wishlist_button_shop_style',
        );

        $wishlist_button_shop_style        = get_option( 'stwlite_settings_wishlist_button_shop_style', 'minimal_and_text' );
        $wishlist_button_shop_style_option = array(
            'type'            => 'select',
            'label'           => __( 'Button Style', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'              => 'stwlite_settings_wishlist_button_shop_style',
            'default'         => $wishlist_button_shop_style,
            'options'         => array(
                'text_only'             => __( 'Text Only', 'saveto-wishlist-lite-for-woocommerce' ),
                'icon_only'             => __( 'Icon Only', 'saveto-wishlist-lite-for-woocommerce' ),
                'icon_and_text'         => __( 'Icon and Text', 'saveto-wishlist-lite-for-woocommerce' ),
                'icon_and_text_pill'    => __( 'Icon and Text Pill', 'saveto-wishlist-lite-for-woocommerce' ),
                'solid_icon'            => __( 'Solid Icon', 'saveto-wishlist-lite-for-woocommerce' ),
                'solid_and_text'        => __( 'Solid Icon and Text', 'saveto-wishlist-lite-for-woocommerce' ),
                'solid_and_text_pill'   => __( 'Solid Icon and Text Pill', 'saveto-wishlist-lite-for-woocommerce' ),
                'minimal_icon'          => __( 'Minimal Icon', 'saveto-wishlist-lite-for-woocommerce' ),
                'minimal_and_text'      => __( 'Minimal Icon and Text', 'saveto-wishlist-lite-for-woocommerce' ),
                'minimal_and_text_pill' => __( 'Minimal Icon and Text Pill', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'preview'         => true,
            'preview_options' => array(
                'text_color'             => 'stwlite_settings_wishlist_button_shop_text_color',
                'hover_text_color'       => 'stwlite_settings_wishlist_button_shop_hover_text_color',
                'background_color'       => 'stwlite_settings_wishlist_button_shop_background_color',
                'hover_background_color' => 'stwlite_settings_wishlist_button_shop_hover_background_color',
                'border_color'           => 'stwlite_settings_wishlist_button_shop_border_color',
                'hover_border_color'     => 'stwlite_settings_wishlist_button_shop_hover_border_color',
                'border_width'           => 'stwlite_settings_wishlist_button_shop_border_width',
                'icon_color'             => 'stwlite_settings_wishlist_button_shop_icon_color',
                'text_size'              => 'stwlite_settings_wishlist_button_shop_text_size',
                'text_style'             => 'stwlite_settings_wishlist_button_shop_text_style',
            ),
            'desc_tip'        => __( 'Wishlist button style on shop page.', 'saveto-wishlist-lite-for-woocommerce' ),
            'description'     => __( 'Checkout the preview to see the button style for both normal and hover state.', 'saveto-wishlist-lite-for-woocommerce' ),
            'multiple'        => false,
        );

        // Collect custom fields into array for applying preset conditions.
        $shop_custom_fields = array(
            &$shop_custom_heading_option,
            &$wishlist_button_shop_text_color_option,
            &$wishlist_button_shop_hover_text_color_option,
            &$wishlist_button_shop_background_color_option,
            &$wishlist_button_shop_hover_background_color_option,
            &$wishlist_button_shop_border_color_option,
            &$wishlist_button_shop_hover_border_color_option,
            &$wishlist_button_shop_border_width_option,
            &$wishlist_button_shop_icon_color_option,
            &$wishlist_button_shop_text_size_option,
            &$wishlist_button_shop_text_style_option,
            &$wishlist_button_shop_style_option,
        );

        // Apply preset conditions programmatically.
        $this->apply_preset_conditions(
            $shop_custom_fields,
            'stwlite_settings_wishlist_button_shop_mode',
            'preset' === $shop_page_mode
        );

        // Add fields to shop page fields array.
        $shop_page_fields[] = $shop_custom_heading_option;
        $shop_page_fields[] = $wishlist_button_shop_text_color_option;
        $shop_page_fields[] = $wishlist_button_shop_hover_text_color_option;
        $shop_page_fields[] = $wishlist_button_shop_background_color_option;
        $shop_page_fields[] = $wishlist_button_shop_hover_background_color_option;
        $shop_page_fields[] = $wishlist_button_shop_border_color_option;
        $shop_page_fields[] = $wishlist_button_shop_hover_border_color_option;
        $shop_page_fields[] = $wishlist_button_shop_border_width_option;
        $shop_page_fields[] = $wishlist_button_shop_icon_color_option;
        $shop_page_fields[] = $wishlist_button_shop_text_size_option;
        $shop_page_fields[] = $wishlist_button_shop_text_style_option;
        $shop_page_fields[] = $wishlist_button_shop_style_option;

        $controls['wishlist_shop_page_settings'] = $shop_page_fields;

        // Cart page settings.
        $cart_page_fields = array();

        $default_cart_button_label = __( 'Save Cart to Wishlist', 'saveto-wishlist-lite-for-woocommerce' );
        $cart_button_label         = get_option( 'stwlite_settings_wishlist_button_cart_label', $default_cart_button_label );
        $cart_button_label_option  = array(
            'type'     => 'text',
            'label'    => __( 'Cart Button Label', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'       => 'stwlite_settings_wishlist_button_cart_label',
            'default'  => $cart_button_label,
            'desc_tip' => __( 'The "Cart Button Label" seen in the frontpage cart page.', 'saveto-wishlist-lite-for-woocommerce' ),
        );

        $cart_page_fields[] = $cart_button_label_option;

        // Add mode selector (Preset or Custom) for cart page.
        $cart_page_mode        = get_option( 'stwlite_settings_wishlist_button_cart_mode', 'preset' );
        $cart_page_mode_option = array(
            'type'           => 'radio',
            'label'          => __( 'Configuration Mode', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'             => 'stwlite_settings_wishlist_button_cart_mode',
            'default'        => $cart_page_mode,
            'options'        => array(
                'preset' => __( 'Use Presets', 'saveto-wishlist-lite-for-woocommerce' ),
                'custom' => __( 'Custom Settings', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'desc_tip'       => __( 'Choose between using preset styles or customizing settings manually.', 'saveto-wishlist-lite-for-woocommerce' ),
            'with_condition' => true,
        );

        $cart_page_fields[] = $cart_page_mode_option;

        // Add preset options for quick style selection.
        $cart_presets       = get_option( 'stwlite_settings_wishlist_button_cart_preset', 'minimal_dark' );
        $cart_preset_option = array(
            'type'        => 'preset',
            'label'       => __( 'Style Presets', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_cart_preset',
            'description' => __( 'Choose from pre-configured style combinations to quickly apply a professional look to your wishlist buttons on cart page.', 'saveto-wishlist-lite-for-woocommerce' ),
            'hide'        => 'custom' === $cart_page_mode,
            'presets'     => $this->get_preset_config( 'cart', $cart_button_label ),
            'default'     => $cart_presets ?? 'minimal_dark',
        );

        // Add preset condition for cart page.
        $cart_preset_option['condition'] = array(
            array(
                'key'   => 'stwlite_settings_wishlist_button_cart_mode',
                'value' => 'preset',
            ),
        );

        $cart_page_fields[] = $cart_preset_option;

        // Add heading control for the cart page settings.
        $cart_custom_heading_option = array(
            'type'    => 'heading',
            'content' => __( 'Customize the wishlist button on the cart page', 'saveto-wishlist-lite-for-woocommerce' ),
            'classes' => 'stwlite-tw-text-lg stwlite-tw-font-bold stwlite-tw-mb-4',
        );

        $default_wishlist_button_cart_text_color = '#1F2937';
        $wishlist_button_cart_text_color         = get_option( 'stwlite_settings_wishlist_button_cart_text_color', $default_wishlist_button_cart_text_color );
        $wishlist_button_cart_text_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Text Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_cart_text_color',
            'default'     => $wishlist_button_cart_text_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button text color on cart page. This option will be used for the button with text.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_cart_style',
        );

        $default_wishlist_button_cart_hover_text_color = '#DC2626';
        $wishlist_button_cart_hover_text_color         = get_option( 'stwlite_settings_wishlist_button_cart_hover_text_color', $default_wishlist_button_cart_hover_text_color );
        $wishlist_button_cart_hover_text_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Hover Text Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_cart_hover_text_color',
            'default'     => $wishlist_button_cart_hover_text_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button hover text color on cart page. This option will be used for the button with text.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_cart_style',
        );

        $default_wishlist_button_cart_background_color = '#FFFFFF';
        $wishlist_button_cart_background_color         = get_option( 'stwlite_settings_wishlist_button_cart_background_color', $default_wishlist_button_cart_background_color );
        $wishlist_button_cart_background_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Background Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_cart_background_color',
            'default'     => $wishlist_button_cart_background_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button background color on cart page. This option will be used for the button with background color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_cart_style',
        );

        $default_wishlist_button_cart_hover_background_color = '#F9FAFB';
        $wishlist_button_cart_hover_background_color         = get_option( 'stwlite_settings_wishlist_button_cart_hover_background_color', $default_wishlist_button_cart_hover_background_color );
        $wishlist_button_cart_hover_background_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Hover Background Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_cart_hover_background_color',
            'default'     => $wishlist_button_cart_hover_background_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button hover background color on cart page. This option will be used for the button with background color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_cart_style',
        );

        $default_wishlist_button_cart_border_color = '#E5E7EB';
        $wishlist_button_cart_border_color         = get_option( 'stwlite_settings_wishlist_button_cart_border_color', $default_wishlist_button_cart_border_color );
        $wishlist_button_cart_border_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Border Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_cart_border_color',
            'default'     => $wishlist_button_cart_border_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button border color on cart page. This option will be used for the button with border color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_cart_style',
        );

        $default_wishlist_button_cart_hover_border_color = '#DC2626';
        $wishlist_button_cart_hover_border_color         = get_option( 'stwlite_settings_wishlist_button_cart_hover_border_color', $default_wishlist_button_cart_hover_border_color );
        $wishlist_button_cart_hover_border_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Hover Border Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_cart_hover_border_color',
            'default'     => $wishlist_button_cart_hover_border_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button hover border color on cart page. This option will be used for the button with border color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_cart_style',
        );

        $default_wishlist_button_cart_border_width = 1;
        $wishlist_button_cart_border_width         = get_option( 'stwlite_settings_wishlist_button_cart_border_width', $default_wishlist_button_cart_border_width );
        $wishlist_button_cart_border_width_option  = array(
            'type'        => 'number',
            'label'       => __( 'Button Border Width', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_cart_border_width',
            'default'     => $wishlist_button_cart_border_width,
            'min'         => 0,
            'max'         => 5,
            'step'        => 1,
            'desc_tip'    => __( 'Wishlist button border width on cart page. This option will be used for the button with border width.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_cart_style',
        );

        $default_wishlist_button_cart_icon_color = '#DC2626';
        $wishlist_button_cart_icon_color         = get_option( 'stwlite_settings_wishlist_button_cart_icon_color', $default_wishlist_button_cart_icon_color );
        $wishlist_button_cart_icon_color_option  = array(
            'type'        => 'color_picker',
            'label'       => __( 'Button Icon Color', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_cart_icon_color',
            'default'     => $wishlist_button_cart_icon_color,
            'preview'     => true,
            'desc_tip'    => __( 'Wishlist button icon color on cart page. This option will be used for the button with icon color.', 'saveto-wishlist-lite-for-woocommerce' ),
            'preview_ref' => 'stwlite_settings_wishlist_button_cart_style',
        );

        $wishlist_button_cart_text_size        = get_option( 'stwlite_settings_wishlist_button_cart_text_size', 14 );
        $wishlist_button_cart_text_size_option = array(
            'type'        => 'number',
            'label'       => __( 'Button Text Size', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_cart_text_size',
            'default'     => $wishlist_button_cart_text_size,
            'min'         => 10,
            'max'         => 24,
            'step'        => 1,
            'desc_tip'    => __( 'Wishlist button text size on cart page. This option will be used for the button with text size. The default value is 14px.', 'saveto-wishlist-lite-for-woocommerce' ),
            'multiple'    => false,
            'preview_ref' => 'stwlite_settings_wishlist_button_cart_style',
            'preview'     => true,
        );

        $wishlist_button_cart_text_style        = get_option( 'stwlite_settings_wishlist_button_cart_text_style', 'normal' );
        $wishlist_button_cart_text_style_option = array(
            'type'        => 'select',
            'label'       => __( 'Button Text Style', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'          => 'stwlite_settings_wishlist_button_cart_text_style',
            'default'     => $wishlist_button_cart_text_style,
            'options'     => array(
                'normal' => __( 'Normal', 'saveto-wishlist-lite-for-woocommerce' ),
                'italic' => __( 'Italic', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'desc_tip'    => __( 'Wishlist button text style on cart page. This option will be used for the button with text style. The default value is normal.', 'saveto-wishlist-lite-for-woocommerce' ),
            'multiple'    => false,
            'preview'     => true,
            'preview_ref' => 'stwlite_settings_wishlist_button_cart_style',
        );

        $wishlist_button_cart_style        = get_option( 'stwlite_settings_wishlist_button_cart_style', 'minimal_and_text' );
        $wishlist_button_cart_style_option = array(
            'type'            => 'select',
            'label'           => __( 'Button Style', 'saveto-wishlist-lite-for-woocommerce' ),
            'id'              => 'stwlite_settings_wishlist_button_cart_style',
            'default'         => $wishlist_button_cart_style,
            'options'         => array(
                'text_only'             => __( 'Text Only', 'saveto-wishlist-lite-for-woocommerce' ),
                'icon_only'             => __( 'Icon Only', 'saveto-wishlist-lite-for-woocommerce' ),
                'icon_and_text'         => __( 'Icon and Text', 'saveto-wishlist-lite-for-woocommerce' ),
                'icon_and_text_pill'    => __( 'Icon and Text Pill', 'saveto-wishlist-lite-for-woocommerce' ),
                'solid_icon'            => __( 'Solid Icon', 'saveto-wishlist-lite-for-woocommerce' ),
                'solid_and_text'        => __( 'Solid Icon and Text', 'saveto-wishlist-lite-for-woocommerce' ),
                'solid_and_text_pill'   => __( 'Solid Icon and Text Pill', 'saveto-wishlist-lite-for-woocommerce' ),
                'minimal_icon'          => __( 'Minimal Icon', 'saveto-wishlist-lite-for-woocommerce' ),
                'minimal_and_text'      => __( 'Minimal Icon and Text', 'saveto-wishlist-lite-for-woocommerce' ),
                'minimal_and_text_pill' => __( 'Minimal Icon and Text Pill', 'saveto-wishlist-lite-for-woocommerce' ),
            ),
            'preview'         => true,
            'preview_options' => array(
                'text_color'             => 'stwlite_settings_wishlist_button_cart_text_color',
                'hover_text_color'       => 'stwlite_settings_wishlist_button_cart_hover_text_color',
                'background_color'       => 'stwlite_settings_wishlist_button_cart_background_color',
                'hover_background_color' => 'stwlite_settings_wishlist_button_cart_hover_background_color',
                'border_color'           => 'stwlite_settings_wishlist_button_cart_border_color',
                'hover_border_color'     => 'stwlite_settings_wishlist_button_cart_hover_border_color',
                'border_width'           => 'stwlite_settings_wishlist_button_cart_border_width',
                'icon_color'             => 'stwlite_settings_wishlist_button_cart_icon_color',
                'text_size'              => 'stwlite_settings_wishlist_button_cart_text_size',
                'text_style'             => 'stwlite_settings_wishlist_button_cart_text_style',
            ),
            'desc_tip'        => __( 'Wishlist button style on cart page.', 'saveto-wishlist-lite-for-woocommerce' ),
            'description'     => __( 'Checkout the preview to see the button style for both normal and hover state.', 'saveto-wishlist-lite-for-woocommerce' ),
            'multiple'        => false,
        );

        // Collect custom fields into array for applying preset conditions.
        $cart_custom_fields = array(
            &$cart_custom_heading_option,
            &$wishlist_button_cart_text_color_option,
            &$wishlist_button_cart_hover_text_color_option,
            &$wishlist_button_cart_background_color_option,
            &$wishlist_button_cart_hover_background_color_option,
            &$wishlist_button_cart_border_color_option,
            &$wishlist_button_cart_hover_border_color_option,
            &$wishlist_button_cart_border_width_option,
            &$wishlist_button_cart_icon_color_option,
            &$wishlist_button_cart_text_size_option,
            &$wishlist_button_cart_text_style_option,
            &$wishlist_button_cart_style_option,
        );

        // Apply preset conditions programmatically.
        $this->apply_preset_conditions(
            $cart_custom_fields,
            'stwlite_settings_wishlist_button_cart_mode',
            'preset' === $cart_page_mode
        );

        // Add fields to cart page fields array.
        $cart_page_fields[] = $cart_custom_heading_option;
        $cart_page_fields[] = $wishlist_button_cart_text_color_option;
        $cart_page_fields[] = $wishlist_button_cart_hover_text_color_option;
        $cart_page_fields[] = $wishlist_button_cart_background_color_option;
        $cart_page_fields[] = $wishlist_button_cart_hover_background_color_option;
        $cart_page_fields[] = $wishlist_button_cart_border_color_option;
        $cart_page_fields[] = $wishlist_button_cart_hover_border_color_option;
        $cart_page_fields[] = $wishlist_button_cart_border_width_option;
        $cart_page_fields[] = $wishlist_button_cart_icon_color_option;
        $cart_page_fields[] = $wishlist_button_cart_text_size_option;
        $cart_page_fields[] = $wishlist_button_cart_text_style_option;
        $cart_page_fields[] = $wishlist_button_cart_style_option;

        $controls['wishlist_cart_page_settings'] = $cart_page_fields;

        // Filter to modify wishlist button tab controls.
        $controls = apply_filters( 'stwlite_admin_setting_default_wishlist_button_tab_controls', $controls );

        return $controls;
    }

    /**
     * Apply preset conditions to fields programmatically.
     *
     * Sets condition and hide properties on fields based on preset mode.
     * Reduces repetitive code by applying conditions to multiple fields at once.
     *
     * @param array  $field_refs Array of field variable references (e.g., [&$field1, &$field2]).
     * @param string $mode_option_key The option key for the mode setting (e.g., 'stwlite_settings_wishlist_button_product_mode').
     * @param bool   $is_preset Whether the current mode is 'preset' (true) or 'custom' (false).
     * @since 1.0.4
     * @access private
     * @return void
     */
    private function apply_preset_conditions( array $field_refs, $mode_option_key, $is_preset ) {
        // Create condition array - show fields when mode is 'custom'.
        $condition = array(
            array(
                'key'   => $mode_option_key,
                'value' => 'custom',
            ),
        );

        // Apply condition and hide properties to all field references.
        foreach ( $field_refs as &$field_ref ) {
            if ( is_array( $field_ref ) ) {
                $field_ref['condition'] = $condition;
                $field_ref['hide']      = $is_preset;
            }
        }
        unset( $field_ref ); // Unset reference to avoid issues.
    }

    /**
     * Get preset configuration.
     *
     * @param string $preset_key The preset key.
     * @param string $wishlist_button_label The wishlist button label.
     * @since 1.0.4
     * @access private
     * @return array The preset configuration.
     */
    private function get_preset_config( $preset_key, $wishlist_button_label ) {
        $preset_config = array(
            'classic_red'     => array(
                'label'        => __( 'Classic Red', 'saveto-wishlist-lite-for-woocommerce' ),
                'description'  => __( 'Traditional wishlist style with bold red icon', 'saveto-wishlist-lite-for-woocommerce' ),
                'preview_text' => $wishlist_button_label,
                'show_icon'    => true,
                'show_text'    => true,
                'pill'         => false,
                'settings'     => array(
                    'stwlite_settings_wishlist_button_' . $preset_key . '_style'                    => 'solid_and_text',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_color'               => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_text_color'         => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_background_color'         => '#DC2626',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_background_color'   => '#B91C1C',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_color'             => '#DC2626',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_border_color'       => '#B91C1C',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_width'             => 0,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_icon_color'               => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_size'                => 14,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_style'               => 'normal',
                ),
            ),
            'minimal_dark'    => array(
                'label'        => __( 'Minimal Dark', 'saveto-wishlist-lite-for-woocommerce' ),
                'description'  => __( 'Clean and minimal with dark borders', 'saveto-wishlist-lite-for-woocommerce' ),
                'preview_text' => $wishlist_button_label,
                'show_icon'    => true,
                'show_text'    => true,
                'pill'         => false,
                'settings'     => array(
                    'stwlite_settings_wishlist_button_' . $preset_key . '_style'                    => 'minimal_and_text',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_color'               => '#1F2937',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_text_color'         => '#DC2626',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_background_color'         => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_background_color'   => '#F9FAFB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_color'             => '#E5E7EB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_border_color'       => '#DC2626',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_width'             => 1,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_icon_color'               => '#DC2626',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_size'                => 14,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_style'               => 'normal',
                ),
            ),
            'modern_pill'     => array(
                'label'        => __( 'Modern Pill', 'saveto-wishlist-lite-for-woocommerce' ),
                'description'  => __( 'Rounded pill style with pink accent', 'saveto-wishlist-lite-for-woocommerce' ),
                'preview_text' => $wishlist_button_label,
                'show_icon'    => true,
                'show_text'    => true,
                'pill'         => true,
                'settings'     => array(
                    'stwlite_settings_wishlist_button_' . $preset_key . '_style'                    => 'icon_and_text_pill',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_color'               => '#EC4899',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_text_color'         => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_background_color'         => '#FCE7F3',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_background_color'   => '#EC4899',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_color'             => '#EC4899',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_border_color'       => '#EC4899',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_width'             => 1,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_icon_color'               => '#EC4899',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_size'                => 14,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_style'               => 'normal',
                ),
            ),
            'icon_only_light' => array(
                'label'       => __( 'Icon Only Light', 'saveto-wishlist-lite-for-woocommerce' ),
                'description' => __( 'Simple icon-only button with subtle background', 'saveto-wishlist-lite-for-woocommerce' ),
                'show_icon'   => true,
                'show_text'   => false,
                'pill'        => false,
                'settings'    => array(
                    'stwlite_settings_wishlist_button_' . $preset_key . '_style'                    => 'solid_icon',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_color'               => '#6B7280',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_text_color'         => '#1F2937',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_background_color'         => '#F3F4F6',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_background_color'   => '#E5E7EB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_color'             => '#D1D5DB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_border_color'       => '#9CA3AF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_width'             => 0,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_icon_color'               => '#EF4444',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_size'                => 14,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_style'               => 'normal',
                ),
            ),
            'bold_outline'    => array(
                'label'        => __( 'Bold Outline', 'saveto-wishlist-lite-for-woocommerce' ),
                'description'  => __( 'Strong outlined button with blue accent', 'saveto-wishlist-lite-for-woocommerce' ),
                'preview_text' => $wishlist_button_label,
                'show_icon'    => true,
                'show_text'    => true,
                'pill'         => false,
                'settings'     => array(
                    'stwlite_settings_wishlist_button_' . $preset_key . '_style'                    => 'icon_and_text',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_color'               => '#2563EB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_text_color'         => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_background_color'         => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_background_color'   => '#2563EB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_color'             => '#2563EB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_border_color'       => '#2563EB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_width'             => 2,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_icon_color'               => '#2563EB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_size'                => 14,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_style'               => 'normal',
                ),
            ),
            'elegant_purple'  => array(
                'label'        => __( 'Elegant Purple', 'saveto-wishlist-lite-for-woocommerce' ),
                'description'  => __( 'Sophisticated purple theme for luxury brands', 'saveto-wishlist-lite-for-woocommerce' ),
                'preview_text' => $wishlist_button_label,
                'show_icon'    => true,
                'show_text'    => true,
                'pill'         => false,
                'settings'     => array(
                    'stwlite_settings_wishlist_button_' . $preset_key . '_style'                    => 'solid_and_text',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_color'               => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_text_color'         => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_background_color'         => '#7C3AED',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_background_color'   => '#6D28D9',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_color'             => '#7C3AED',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_border_color'       => '#6D28D9',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_width'             => 0,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_icon_color'               => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_size'                => 14,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_style'               => 'normal',
                ),
            ),
            'nature_green'    => array(
                'label'        => __( 'Nature Green', 'saveto-wishlist-lite-for-woocommerce' ),
                'description'  => __( 'Eco-friendly green for sustainable brands', 'saveto-wishlist-lite-for-woocommerce' ),
                'preview_text' => $wishlist_button_label,
                'show_icon'    => true,
                'show_text'    => true,
                'pill'         => true,
                'settings'     => array(
                    'stwlite_settings_wishlist_button_' . $preset_key . '_style'                    => 'solid_and_text_pill',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_color'               => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_text_color'         => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_background_color'         => '#10B981',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_background_color'   => '#059669',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_color'             => '#10B981',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_border_color'       => '#059669',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_width'             => 0,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_icon_color'               => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_size'                => 14,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_style'               => 'normal',
                ),
            ),
            'warm_orange'     => array(
                'label'        => __( 'Warm Orange', 'saveto-wishlist-lite-for-woocommerce' ),
                'description'  => __( 'Inviting orange for energetic brands', 'saveto-wishlist-lite-for-woocommerce' ),
                'preview_text' => $wishlist_button_label,
                'show_icon'    => true,
                'show_text'    => true,
                'pill'         => false,
                'settings'     => array(
                    'stwlite_settings_wishlist_button_' . $preset_key . '_style'                    => 'icon_and_text',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_color'               => '#EA580C',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_text_color'         => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_background_color'         => '#FFF7ED',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_background_color'   => '#EA580C',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_color'             => '#EA580C',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_border_color'       => '#EA580C',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_width'             => 1,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_icon_color'               => '#EA580C',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_size'                => 14,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_style'               => 'normal',
                ),
            ),
            'sleek_black'     => array(
                'label'        => __( 'Sleek Black', 'saveto-wishlist-lite-for-woocommerce' ),
                'description'  => __( 'Premium black for sophisticated stores', 'saveto-wishlist-lite-for-woocommerce' ),
                'preview_text' => $wishlist_button_label,
                'show_icon'    => true,
                'show_text'    => true,
                'pill'         => false,
                'settings'     => array(
                    'stwlite_settings_wishlist_button_' . $preset_key . '_style'                    => 'solid_and_text',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_color'               => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_text_color'         => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_background_color'         => '#1F2937',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_background_color'   => '#111827',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_color'             => '#1F2937',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_border_color'       => '#111827',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_width'             => 0,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_icon_color'               => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_size'                => 14,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_style'               => 'normal',
                ),
            ),
            'soft_gray'       => array(
                'label'        => __( 'Soft Gray', 'saveto-wishlist-lite-for-woocommerce' ),
                'description'  => __( 'Neutral subtle gray for minimalist design', 'saveto-wishlist-lite-for-woocommerce' ),
                'preview_text' => $wishlist_button_label,
                'show_icon'    => true,
                'show_text'    => true,
                'pill'         => true,
                'settings'     => array(
                    'stwlite_settings_wishlist_button_' . $preset_key . '_style'                    => 'minimal_and_text_pill',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_color'               => '#4B5563',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_text_color'         => '#1F2937',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_background_color'         => '#F9FAFB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_background_color'   => '#F3F4F6',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_color'             => '#E5E7EB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_border_color'       => '#D1D5DB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_width'             => 1,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_icon_color'               => '#DC2626',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_size'                => 14,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_style'               => 'normal',
                ),
            ),
            'teal_modern'     => array(
                'label'        => __( 'Teal Modern', 'saveto-wishlist-lite-for-woocommerce' ),
                'description'  => __( 'Fresh teal color for modern brands', 'saveto-wishlist-lite-for-woocommerce' ),
                'preview_text' => $wishlist_button_label,
                'show_icon'    => true,
                'show_text'    => true,
                'pill'         => false,
                'settings'     => array(
                    'stwlite_settings_wishlist_button_' . $preset_key . '_style'                    => 'solid_and_text',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_color'               => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_text_color'         => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_background_color'         => '#14B8A6',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_background_color'   => '#0D9488',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_color'             => '#14B8A6',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_border_color'       => '#0D9488',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_width'             => 0,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_icon_color'               => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_size'                => 14,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_style'               => 'normal',
                ),
            ),
            'minimal_white'   => array(
                'label'        => __( 'Minimal White', 'saveto-wishlist-lite-for-woocommerce' ),
                'description'  => __( 'Clean white outline for any theme', 'saveto-wishlist-lite-for-woocommerce' ),
                'preview_text' => $wishlist_button_label,
                'show_icon'    => true,
                'show_text'    => true,
                'pill'         => false,
                'settings'     => array(
                    'stwlite_settings_wishlist_button_' . $preset_key . '_style'                    => 'minimal_and_text',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_color'               => '#374151',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_text_color'         => '#111827',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_background_color'         => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_background_color'   => '#FFFFFF',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_color'             => '#D1D5DB',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_hover_border_color'       => '#6B7280',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_border_width'             => 1,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_icon_color'               => '#EF4444',
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_size'                => 14,
                    'stwlite_settings_wishlist_button_' . $preset_key . '_text_style'               => 'normal',
                ),
            ),
        );

        return $preset_config;
    }
}
