<?php
/**
 * Travel Agency Theme Compatibility.
 *
 * @package tripzzy
 */

namespace Tripzzy\Core\ThemeCompatibility;

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
use Tripzzy\Core\Traits\SingletonTrait;

if ( ! class_exists( 'Tripzzy\Core\ThemeCompatibility\ThemeTravelAgency' ) ) {
	/**
	 * Travel Agency Theme Compatibility.
	 *
	 * @since 1.0.0
	 */
	class ThemeTravelAgency {
		use SingletonTrait;

		/**
		 * Constructor.
		 */
		public function __construct() {
			// For Theme specific inline Scripts and Styles.
			add_action( 'wp_enqueue_scripts', array( $this, 'theme_scripts' ), 20 );
		}

		/**
		 * Add Theme specific Scripts and Styles.
		 *
		 * @return void
		 */
		public function theme_scripts() {
			$inline_styles = '
				:root{
					--tripzzy-primary-color:var(--primary-color);
				}
			';
			wp_add_inline_style( 'tripzzy-trips', $inline_styles );
		}
	}
	ThemeTravelAgency::instance();
}
