<?php
/**
 * Custom HTML Section
 *
 * @package Minimal_Shop_Ecommerce
 */

$wp_customize->add_section(
	'luca_portfolio_custom_html_section',
	array(
		'panel'    => 'luca_portfolio_front_page_options',
		'title'    => esc_html__( 'Custom Content', 'luca-portfolio' ),
		'priority' => luca_portfolio_priority_section('luca_portfolio_custom_html_section'),
	)
);

$wp_customize->add_setting(
	'luca_portfolio_enable_custom_html_section',
	array(
		'default'           => false,
		'sanitize_callback' => 'luca_portfolio_sanitize_switch',
	)
);

$wp_customize->add_control(
	new Luca_Portfolio_Toggle_Switch_Custom_Control(
		$wp_customize,
		'luca_portfolio_enable_custom_html_section',
		array(
			'label'    => esc_html__( 'Enable Custom HTML Section', 'luca-portfolio' ),
			'section'  => 'luca_portfolio_custom_html_section',
			'settings' => 'luca_portfolio_enable_custom_html_section',
		)
	)
);

if ( isset( $wp_customize->selective_refresh ) ) {
	$wp_customize->selective_refresh->add_partial(
		'luca_portfolio_enable_custom_html_section',
		array(
			'selector' => '#custom-html .section-link',
			'settings' => 'luca_portfolio_enable_custom_html_section',
		)
	);
}

$wp_customize->add_setting(
    'luca_portfolio_content_section_background_grey',
    array(
        'default'           => false,
        'sanitize_callback' => 'luca_portfolio_sanitize_switch',
    )
);
$wp_customize->add_control(
    new Luca_Portfolio_Toggle_Switch_Custom_Control(
        $wp_customize,
        'luca_portfolio_content_section_background_grey',
        array(
            'label'    => esc_html__( 'Background Grey', 'luca-portfolio' ),
            'section'  => 'luca_portfolio_custom_html_section',
            'settings' => 'luca_portfolio_content_section_background_grey',
        )
    )
);