<?php
/**
 * Services Page Template Customizer Settings
 *
 * @package Paws_And_Care
 * @since 1.2.6
 */

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

/**
 * Add Services Page Template customizer settings
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function paws_and_care_customizer_services_page_template($wp_customize)
{

    // ========================================
    // Services Page Template Section
    // ========================================
    $wp_customize->add_section('paws_and_care_services_page_template', array(
        'title' => __('Services Page Template', 'paws-and-care'),
        'description' => __('Customize the Services page template. Uses services from Front Page Settings > Services Section.', 'paws-and-care'),
        'panel' => 'paws_and_care_templates',
        'priority' => 20,
    ));

    // ========================================
    // Page Content Section
    // ========================================
    $wp_customize->add_setting('paws_and_care_services_page_content_heading', array(
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control(new Paws_And_Care_Customize_Heading_Control($wp_customize, 'paws_and_care_services_page_content_heading', array(
        'label' => __('Page Content', 'paws-and-care'),
        'section' => 'paws_and_care_services_page_template',
    )));

    // Show Page Content (from editor)
    $wp_customize->add_setting('paws_and_care_services_page_show_content', array(
        'default' => false,
        'sanitize_callback' => 'paws_and_care_sanitize_checkbox',
    ));
    $wp_customize->add_control(new Paws_And_Care_Customize_Toggle_Control($wp_customize, 'paws_and_care_services_page_show_content', array(
        'label' => __('Show Page Content', 'paws-and-care'),
        'description' => __('Display content from the page editor at the top.', 'paws-and-care'),
        'section' => 'paws_and_care_services_page_template',
    )));

    // ========================================
    // Services Section
    // ========================================
    $wp_customize->add_setting('paws_and_care_services_page_section_heading', array(
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control(new Paws_And_Care_Customize_Heading_Control($wp_customize, 'paws_and_care_services_page_section_heading', array(
        'label' => __('Services Section', 'paws-and-care'),
        'section' => 'paws_and_care_services_page_template',
    )));

    // Section Title
    $wp_customize->add_setting('paws_and_care_services_page_title', array(
        'default' => __('What We Offer', 'paws-and-care'),
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control('paws_and_care_services_page_title', array(
        'label' => __('Section Title', 'paws-and-care'),
        'section' => 'paws_and_care_services_page_template',
        'type' => 'text',
    ));

    // Section Subtitle
    $wp_customize->add_setting('paws_and_care_services_page_subtitle', array(
        'default' => __('We offer a comprehensive range of services to keep your pets happy and healthy.', 'paws-and-care'),
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control('paws_and_care_services_page_subtitle', array(
        'label' => __('Section Subtitle', 'paws-and-care'),
        'section' => 'paws_and_care_services_page_template',
        'type' => 'text',
    ));

    // Show Features Toggle
    $wp_customize->add_setting('paws_and_care_services_page_show_features', array(
        'default' => true,
        'sanitize_callback' => 'paws_and_care_sanitize_checkbox',
    ));
    $wp_customize->add_control(new Paws_And_Care_Customize_Toggle_Control($wp_customize, 'paws_and_care_services_page_show_features', array(
        'label' => __('Show Features List', 'paws-and-care'),
        'description' => __('Display features list on service cards.', 'paws-and-care'),
        'section' => 'paws_and_care_services_page_template',
    )));

    // ========================================
    // Pricing Section
    // ========================================
    $wp_customize->add_setting('paws_and_care_services_page_pricing_heading', array(
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control(new Paws_And_Care_Customize_Heading_Control($wp_customize, 'paws_and_care_services_page_pricing_heading', array(
        'label' => __('Pricing Section', 'paws-and-care'),
        'section' => 'paws_and_care_services_page_template',
    )));

    // Show Pricing Section
    $wp_customize->add_setting('paws_and_care_services_page_show_pricing', array(
        'default' => true,
        'sanitize_callback' => 'paws_and_care_sanitize_checkbox',
    ));
    $wp_customize->add_control(new Paws_And_Care_Customize_Toggle_Control($wp_customize, 'paws_and_care_services_page_show_pricing', array(
        'label' => __('Show Pricing Section', 'paws-and-care'),
        'description' => __('Uses pricing from Front Page Settings > Pricing Section.', 'paws-and-care'),
        'section' => 'paws_and_care_services_page_template',
    )));

    // ========================================
    // CTA Section
    // ========================================
    $wp_customize->add_setting('paws_and_care_services_page_cta_heading', array(
        'sanitize_callback' => 'sanitize_text_field',
    ));
    $wp_customize->add_control(new Paws_And_Care_Customize_Heading_Control($wp_customize, 'paws_and_care_services_page_cta_heading', array(
        'label' => __('CTA Section', 'paws-and-care'),
        'section' => 'paws_and_care_services_page_template',
    )));

    // Show CTA Section
    $wp_customize->add_setting('paws_and_care_services_page_show_cta', array(
        'default' => true,
        'sanitize_callback' => 'paws_and_care_sanitize_checkbox',
    ));
    $wp_customize->add_control(new Paws_And_Care_Customize_Toggle_Control($wp_customize, 'paws_and_care_services_page_show_cta', array(
        'label' => __('Show CTA Section', 'paws-and-care'),
        'description' => __('Uses CTA from Front Page Settings > CTA Section.', 'paws-and-care'),
        'section' => 'paws_and_care_services_page_template',
    )));
}
