<?php
/**
 * Notice Item Class
 *
 * @package errigal
 * @since 1.1.0
 */

namespace Errigal\Admin;

defined( 'ABSPATH' ) || exit;

use Errigal\Admin\{
	Errigal_Admin as Admin,
	Errigal_Documentation as Documentation,
	Errigal_Notice as Notice,
};
use Errigal\Constant\{
	Errigal_Customiser_Object as Customiser_Object,
	Errigal_Customiser_Panel as Customiser_Panel,
	Errigal_Documentation_Relative_Url as Documentation_Relative_Url,
};
use Errigal\Customiser\{
	Errigal_Custom_Breadcrumb as Breadcrumb,
	Errigal_Custom_Heading_Style as Heading_Style,
	Errigal_Custom_Post_Author as Post_Author,
};
use Errigal\Icon\Errigal_Icon as Icon;

/**
 * This class is in charge of providing notice item configurations.
 *
 * @since 1.1.0
 */
class Errigal_Notice_Item {
	/**
	 * Gets profile widget.
	 *
	 * @since 1.0.5
	 *
	 * @return array
	 */
	public static function get_profile_widget() {
		return array(
			Notice::ICON                   => Icon::PROFILE_WIDGET,
			Notice::ITEM_TITLE             => esc_html__( 'Profile widget', 'errigal' ),
			Notice::ITEM_DESCRIPTION       => esc_html__( 'You can build your profile quickly and easily with the custom profile widget in the side bar.', 'errigal' ),
			Notice::ITEM_INSTRUCTIONS      => esc_html__( 'Navigate to Appearance > Customise > Widgets, add and configure the profile widget.', 'errigal' ),
			Notice::CTA_CUSTOMISER_URL     => Admin::get_customiser_url( Customiser_Object::PANEL, Customiser_Panel::WIDGETS ),
			Notice::CTA_CUSTOMISER_TEXT    => esc_html__( 'Build profile widget', 'errigal' ),
			Notice::CTA_DOCUMENTATION_URL  => Documentation::get_documentation_url( Documentation_Relative_Url::PROFILE_WIDGET ),
			Notice::CTA_DOCUMENTATION_TEXT => esc_html__( 'Learn about profile widget', 'errigal' ),
		);
	}

	/**
	 * Gets custom heading style.
	 *
	 * @since 1.1.0
	 *
	 * @return array
	 */
	public static function get_custom_heading_style() {
		return array(
			Notice::ICON                => Icon::CUSTOM_HEADING_STYLE,
			Notice::ITEM_TITLE          => esc_html__( 'Simple heading style available', 'errigal' ),
			Notice::ITEM_DESCRIPTION    => esc_html__( 'Choose between decorated or simple heading styles for your posts.', 'errigal' ),
			Notice::ITEM_INSTRUCTIONS   => esc_html__( 'Navigate to Appearance > Customise > Appearance > Heading Styles, and choose your desired style.', 'errigal' ),
			Notice::CTA_CUSTOMISER_URL  => Admin::get_customiser_url( Customiser_Object::CONTROL, Heading_Style::ID_HEADING_STYLE ),
			Notice::CTA_CUSTOMISER_TEXT => esc_html__( 'Customise heading style', 'errigal' ),
		);
	}

	/**
	 * Gets custom post author.
	 *
	 * @since 1.1.0
	 *
	 * @return array
	 */
	public static function get_custom_post_author() {
		return array(
			Notice::ICON                => Icon::CUSTOM_POST_AUTHOR,
			Notice::ITEM_TITLE          => esc_html__( "Hide author's name in post header", 'errigal' ),
			Notice::ITEM_DESCRIPTION    => esc_html__( "Hiding the author's name keeps the spotlight on the content, perfect for those who prefer a cleaner look or value privacy.", 'errigal' ),
			Notice::ITEM_INSTRUCTIONS   => esc_html__( 'Navigate to Appearance > Customise > Post Settings > Post Author, and uncheck Show post author.', 'errigal' ),
			Notice::CTA_CUSTOMISER_URL  => Admin::get_customiser_url( Customiser_Object::CONTROL, Post_Author::ID_POST_AUTHOR ),
			Notice::CTA_CUSTOMISER_TEXT => esc_html__( 'Customise author name display', 'errigal' ),
		);
	}

	/**
	 * Gets custom breadcrumb.
	 *
	 * @since 1.2.0
	 *
	 * @return array
	 */
	public static function get_custom_breadcrumb() {
		return array(
			Notice::ICON                => Icon::CUSTOM_BREADCRUMB,
			Notice::ITEM_TITLE          => esc_html__( 'Breadcrumbs available', 'errigal' ),
			Notice::ITEM_DESCRIPTION    => esc_html__( 'Improve navigation and keep visitors engaged with clear breadcrumbs.', 'errigal' ),
			Notice::ITEM_INSTRUCTIONS   => esc_html__( 'Navigate to Appearance > Customise > Breadcrumb, and check Show breadcrumbs.', 'errigal' ),
			Notice::CTA_CUSTOMISER_URL  => Admin::get_customiser_url( Customiser_Object::CONTROL, Breadcrumb::ID_BREADCRUMB ),
			Notice::CTA_CUSTOMISER_TEXT => esc_html__( 'Customise breadcrumbs', 'errigal' ),
		);
	}
}
