<?php
/**
 * Main Menu Class
 *
 * @package errigal
 * @since 1.1.0
 */

namespace Errigal\Navigation;

defined( 'ABSPATH' ) || exit;

use Errigal\Constant\Errigal_Navigation_Hook as Navigation_Hook;
use Errigal\Shared\Errigal_Utility as Utility;

/**
 * This class is in charge of adding main menu to theme.
 *
 * @since 1.1.0
 */
class Errigal_Main_Menu extends Errigal_Menu_Base {
	/**
	 * Gets location.
	 *
	 * @since 1.1.0
	 *
	 * @return string
	 */
	public static function get_location() {
		return 'main-menu';
	}

	/**
	 * Gets description.
	 *
	 * @since 1.1.0
	 *
	 * @return string
	 */
	protected static function get_description() {
		return esc_html__( 'Main Menu', 'errigal' );
	}

	/**
	 * Gets menu classes.
	 *
	 * @since 1.1.0
	 *
	 * @return string[]
	 */
	protected static function get_menu_classes() {
		/**
		 * Filters main menu classes.
		 *
		 * @since 1.1.0
		 *
		 * @param string[] $classes Main menu class names.
		 */
		$classes = apply_filters(
			Navigation_Hook::MAIN_MENU_CLASSES,
			parent::get_menu_classes(),
		);

		return Utility::sanitise_classes( $classes );
	}
}
