<?php
/**
 * Zenvy Theme Customizer Page Header settings
 *
 * @package Zenvy
 */

/**
 * Class Zenvy_Customize_Global_Page_Header_Fields
 *
 * Handles customizer global page header fields for the Zenvy theme.
 */
class Zenvy_Customize_Global_Page_Header_Fields extends Zenvy_Customize_Base_Field {

	/**
	 * Arguments for fields.
	 *
	 * @return void
	 */
	public function init() {
		$this->args = [
			// Background image.
			'zenvy_page_header_background'         => [
				'type'              => 'background',
				'default'           => '',
				'sanitize_callback' => [ 'Zenvy_Customizer_Sanitize_Callback', 'sanitize_background' ],
				'label'             => esc_html__( 'Background Image', 'zenvy' ),
				'description'       => esc_html__( 'To set the background image for the page header container.', 'zenvy' ),
				'section'           => 'zenvy_page_header_section',
				'priority'          => 5,
				'fields'            => [
					'image'      => true,
					'position'   => true,
					'attachment' => true,
					'repeat'     => true,
					'size'       => true,
				],
			],
			// Background overlay.
			'zenvy_page_header_background_overlay' => [
				'type'              => 'background',
				'default'           => '',
				'sanitize_callback' => [ 'Zenvy_Customizer_Sanitize_Callback', 'sanitize_background' ],
				'label'             => esc_html__( 'Background Overlay', 'zenvy' ),
				'description'       => esc_html__( 'Set Background overlay color on page header container.', 'zenvy' ),
				'section'           => 'zenvy_page_header_section',
				'priority'          => 5,
				'inherits'          => [
					'color_1' => 'var(--color-bg-light)',
				],
				'fields'            => [ 'colors' => true ],
			],
		];
	}
}
new Zenvy_Customize_Global_Page_Header_Fields();
