<?php
/**
 * Typography Setting
 *
 * @package design_studio
 */

// Typography Setting
$wp_customize->add_section(
    'design_studio_typography_setting',
    array(
        'panel' => 'design_studio_theme_options',
        'title' => esc_html__( 'Typography Setting', 'design-studio' ),
    )
);

$wp_customize->add_setting(
    'design_studio_site_title_font',
    array(
        'default'           => 'Sora',
        'sanitize_callback' => 'design_studio_sanitize_google_fonts',
    )
);

$wp_customize->add_control(
    'design_studio_site_title_font',
    array(
        'label'    => esc_html__( 'Site Title Font Family', 'design-studio' ),
        'section'  => 'design_studio_typography_setting',
        'settings' => 'design_studio_site_title_font',
        'type'     => 'select',
        'choices'  => design_studio_get_all_google_font_families(),
    )
);

// Typography - Site Description Font.
$wp_customize->add_setting(
	'design_studio_site_description_font',
	array(
		'default'           => 'DM Sans',
		'sanitize_callback' => 'design_studio_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'design_studio_site_description_font',
	array(
		'label'    => esc_html__( 'Site Description Font Family', 'design-studio' ),
		'section'  => 'design_studio_typography_setting',
		'settings' => 'design_studio_site_description_font',
		'type'     => 'select',
		'choices'  => design_studio_get_all_google_font_families(),
	)
);

// Typography - Header Font.
$wp_customize->add_setting(
	'design_studio_header_font',
	array(
		'default'           => 'Sora',
		'sanitize_callback' => 'design_studio_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'design_studio_header_font',
	array(
		'label'    => esc_html__( 'Heading Font Family', 'design-studio' ),
		'section'  => 'design_studio_typography_setting',
		'settings' => 'design_studio_header_font',
		'type'     => 'select',
		'choices'  => design_studio_get_all_google_font_families(),
	)
);

// Typography - Body Font.
$wp_customize->add_setting(
	'design_studio_content_font',
	array(
		'default'           => 'DM Sans',
		'sanitize_callback' => 'design_studio_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'design_studio_content_font',
	array(
		'label'    => esc_html__( 'Content Font Family', 'design-studio' ),
		'section'  => 'design_studio_typography_setting',
		'settings' => 'design_studio_content_font',
		'type'     => 'select',
		'choices'  => design_studio_get_all_google_font_families(),
	)
);