<?php
/**
 * Custom Site Header Colour Option Class
 *
 * @package errigal
 * @since 1.1.0
 */

namespace Errigal\Customiser;

defined( 'ABSPATH' ) || exit;

use Errigal\Constant\Errigal_Header_Class as Header_Class;
use Errigal\Customiser\Errigal_Custom_Site_Header_Colour as Site_Header_Colour;
use Errigal\Shared\Errigal_Utility as Utility;

/**
 * This class is in charge of site header colour customisation via customiser.
 *
 * @since 1.1.0
 */
class Errigal_Custom_Site_Header_Colour_Option extends Errigal_Custom_Option_Base {
	/**
	 * Gets controls args.
	 *
	 * @since 1.1.0
	 *
	 * @return array
	 */
	public function get_controls_args() {
		return array(
			self::CONTROLS_TO_ADD => array(
				Site_Header_Colour::ID_SITE_HEADER_COLOUR => array(
					self::CUSTOMISE_ARGS_SETTING => array(
						self::SETTING_DEFAULT   => Site_Header_Colour::DEFAULT_SITE_HEADER_COLOUR,
						self::SETTING_TRANSPORT => self::SETTING_TRANSPORT_POST_MESSAGE,
					),
					self::CUSTOMISE_ARGS_CONTROL => array(
						self::CONTROL_PRIORITY    => self::CONTROL_PRIORITY_APPEARANCE_SITE_HEADER_COLOUR,
						self::CONTROL_LABEL       => esc_html__( 'Site Header Colour', 'errigal' ),
						self::CONTROL_DESCRIPTION => esc_html__( 'Make sure your logo shows clearly on the colour selected.', 'errigal' ),
						self::CONTROL_CHOICES     => array(
							Site_Header_Colour::SITE_HEADER_COLOUR_LIGHT   => esc_html__( 'Light', 'errigal' ),
							Site_Header_Colour::SITE_HEADER_COLOUR_DARK    => esc_html__( 'Dark', 'errigal' ),
							Site_Header_Colour::SITE_HEADER_COLOUR_STRIPES => esc_html__( 'Stripes', 'errigal' ),
						),
						self::CONTROL_TYPE        => self::CONTROL_TYPE_RADIO,
					),
					self::CUSTOMISE_ARGS_PARTIAL => array(
						self::PARTIAL_SELECTOR         => Utility::get_selector( Header_Class::SITE_HEADER ),
						self::PARTIAL_FALLBACK_REFRESH => false,
					),
				),
			),
		);
	}
}
