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

// Typography Setting
$wp_customize->add_section(
    'handmade_craft_typography_setting',
    array(
        'panel' => 'handmade_craft_theme_options',
        'title' => esc_html__( 'Typography Setting', 'handmade-craft' ),
    )
);

$wp_customize->add_setting(
    'handmade_craft_site_title_font',
    array(
        'default'           => 'Cinzel',
        'sanitize_callback' => 'handmade_craft_sanitize_google_fonts',
    )
);

$wp_customize->add_control(
    'handmade_craft_site_title_font',
    array(
        'label'    => esc_html__( 'Site Title Font Family', 'handmade-craft' ),
        'section'  => 'handmade_craft_typography_setting',
        'settings' => 'handmade_craft_site_title_font',
        'type'     => 'select',
        'choices'  => handmade_craft_get_all_google_font_families(),
    )
);

// Typography - Site Description Font.
$wp_customize->add_setting(
	'handmade_craft_site_description_font',
	array(
		'default'           => 'Tenor Sans',
		'sanitize_callback' => 'handmade_craft_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'handmade_craft_site_description_font',
	array(
		'label'    => esc_html__( 'Site Description Font Family', 'handmade-craft' ),
		'section'  => 'handmade_craft_typography_setting',
		'settings' => 'handmade_craft_site_description_font',
		'type'     => 'select',
		'choices'  => handmade_craft_get_all_google_font_families(),
	)
);

// Typography - Header Font.
$wp_customize->add_setting(
	'handmade_craft_header_font',
	array(
		'default'           => 'Marcellus',
		'sanitize_callback' => 'handmade_craft_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'handmade_craft_header_font',
	array(
		'label'    => esc_html__( 'Heading Font Family', 'handmade-craft' ),
		'section'  => 'handmade_craft_typography_setting',
		'settings' => 'handmade_craft_header_font',
		'type'     => 'select',
		'choices'  => handmade_craft_get_all_google_font_families(),
	)
);

// Typography - Body Font.
$wp_customize->add_setting(
	'handmade_craft_content_font',
	array(
		'default'           => 'Jost',
		'sanitize_callback' => 'handmade_craft_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'handmade_craft_content_font',
	array(
		'label'    => esc_html__( 'Content Font Family', 'handmade-craft' ),
		'section'  => 'handmade_craft_typography_setting',
		'settings' => 'handmade_craft_content_font',
		'type'     => 'select',
		'choices'  => handmade_craft_get_all_google_font_families(),
	)
);