<?php
/**
 * Customizer: Social Links Section
 *
 * @package Paws_And_Care
 * @since 1.2.9
 */

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

/**
 * Register Social Links Section
 *
 * @param WP_Customize_Manager $wp_customize Customizer object.
 */
function paws_and_care_customizer_social($wp_customize)
{
    // ========================================
    // Social Links Section (inside Theme Settings panel)
    // ========================================
    $wp_customize->add_section('paws_and_care_social', array(
        'title' => __('Social Links', 'paws-and-care'),
        'panel' => 'paws_and_care_theme_settings',
        'priority' => 30,
    ));

    // Show Social Links Toggle
    $wp_customize->add_setting('paws_and_care_show_social', array(
        'default'           => true,
        'sanitize_callback' => 'paws_and_care_sanitize_checkbox',
        'transport'         => 'refresh',
    ));
    $wp_customize->add_control(new Paws_And_Care_Customize_Toggle_Control($wp_customize, 'paws_and_care_show_social', array(
        'label'       => __('Show Social Links in Topbar', 'paws-and-care'),
        'description' => __('Display social media icons in the topbar.', 'paws-and-care'),
        'section'     => 'paws_and_care_social',
        'priority'    => 1,
    )));

    // Facebook
    $wp_customize->add_setting('paws_and_care_facebook', array(
        'default' => '#',
        'sanitize_callback' => 'esc_url_raw',
    ));
    $wp_customize->add_control('paws_and_care_facebook', array(
        'label'       => __('Facebook URL', 'paws-and-care'),
        'description' => __('Leave empty to hide the Facebook icon.', 'paws-and-care'),
        'section'     => 'paws_and_care_social',
        'type'        => 'url',
    ));

    // Twitter
    $wp_customize->add_setting('paws_and_care_twitter', array(
        'default' => '#',
        'sanitize_callback' => 'esc_url_raw',
    ));
    $wp_customize->add_control('paws_and_care_twitter', array(
        'label'       => __('Twitter URL', 'paws-and-care'),
        'description' => __('Leave empty to hide the Twitter icon.', 'paws-and-care'),
        'section'     => 'paws_and_care_social',
        'type'        => 'url',
    ));

    // Instagram
    $wp_customize->add_setting('paws_and_care_instagram', array(
        'default' => '#',
        'sanitize_callback' => 'esc_url_raw',
    ));
    $wp_customize->add_control('paws_and_care_instagram', array(
        'label'       => __('Instagram URL', 'paws-and-care'),
        'description' => __('Leave empty to hide the Instagram icon.', 'paws-and-care'),
        'section'     => 'paws_and_care_social',
        'type'        => 'url',
    ));

    // LinkedIn
    $wp_customize->add_setting('paws_and_care_linkedin', array(
        'default' => '#',
        'sanitize_callback' => 'esc_url_raw',
    ));
    $wp_customize->add_control('paws_and_care_linkedin', array(
        'label'       => __('LinkedIn URL', 'paws-and-care'),
        'description' => __('Leave empty to hide the LinkedIn icon.', 'paws-and-care'),
        'section'     => 'paws_and_care_social',
        'type'        => 'url',
    ));
}
