<?php
/**
 * Sidebar.
 *
 * @package MadeByAura\Prime\Modules
 * @author  MadeByAura.com
 */

namespace MadeByAura\Prime\Modules;

defined( 'ABSPATH' ) || die();

/**
 * Sidebar.
 */
class Sidebar {
	/**
	 * Get position.
	 *
	 * @return string|bool  $position
	 */
	public static function get_position() {
		$position = apply_filters( 'aura_theme_sidebar_position', 'right' );

		// If position is not left or right, it should false.
		$position = in_array( $position, [ 'left', 'right' ], true ) ? $position : false;

		return $position;
	}

	/**
	 * Get position choices.
	 *
	 * @return array
	 */
	public static function get_position_choices() {
		static $choices;

		if ( ! $choices ) {
			$choices = [
				'none'  => esc_attr__( 'No sidebar', 'aura-prime' ),
				'left'  => esc_attr__( 'Left sidebar', 'aura-prime' ),
				'right' => esc_attr__( 'Right sidebar', 'aura-prime' ),
			];
		}

		return $choices;
	}
}
