<?php

/**
 * Typography Settings
 *
 * @package auto_mechanic
 */

// Typography Settings
$wp_customize->add_section(
    'auto_mechanic_typography_setting',
    array(
        'panel' => 'auto_mechanic_theme_options',
        'title' => esc_html__( 'Typography Settings', 'auto-mechanic' ),
    )
);

$wp_customize->add_setting(
    'auto_mechanic_site_title_font',
    array(
        'default'           => 'Raleway',
        'sanitize_callback' => 'auto_mechanic_sanitize_google_fonts',
    )
);

$wp_customize->add_control(
    'auto_mechanic_site_title_font',
    array(
        'label'    => esc_html__( 'Site Title Font Family', 'auto-mechanic' ),
        'section'  => 'auto_mechanic_typography_setting',
        'settings' => 'auto_mechanic_site_title_font',
        'type'     => 'select',
        'choices'  => auto_mechanic_get_all_google_font_families(),
    )
);

// Typography - Site Description Font.
$wp_customize->add_setting(
	'auto_mechanic_site_description_font',
	array(
		'default'           => 'Raleway',
		'sanitize_callback' => 'auto_mechanic_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'auto_mechanic_site_description_font',
	array(
		'label'    => esc_html__( 'Site Description Font Family', 'auto-mechanic' ),
		'section'  => 'auto_mechanic_typography_setting',
		'settings' => 'auto_mechanic_site_description_font',
		'type'     => 'select',
		'choices'  => auto_mechanic_get_all_google_font_families(),
	)
);

// Typography - Header Font.
$wp_customize->add_setting(
	'auto_mechanic_header_font',
	array(
		'default'           => 'Bebas Neue',
		'sanitize_callback' => 'auto_mechanic_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'auto_mechanic_header_font',
	array(
		'label'    => esc_html__( 'Heading Font Family', 'auto-mechanic' ),
		'section'  => 'auto_mechanic_typography_setting',
		'settings' => 'auto_mechanic_header_font',
		'type'     => 'select',
		'choices'  => auto_mechanic_get_all_google_font_families(),
	)
);

// Typography - Body Font.
$wp_customize->add_setting(
	'auto_mechanic_content_font',
	array(
		'default'           => 'Plus Jakarta Sans',
		'sanitize_callback' => 'auto_mechanic_sanitize_google_fonts',
	)
);

$wp_customize->add_control(
	'auto_mechanic_content_font',
	array(
		'label'    => esc_html__( 'Content Font Family', 'auto-mechanic' ),
		'section'  => 'auto_mechanic_typography_setting',
		'settings' => 'auto_mechanic_content_font',
		'type'     => 'select',
		'choices'  => auto_mechanic_get_all_google_font_families(),
	)
);
