<?php
/**
 * Welcome Page Template
 *
 * @package YourTheme
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

function welcome_page() {
	$template_uri = esc_url( get_template_directory_uri() );
	?>

	<div id="welcome">
		<div class="admin-wrap">

			<div class="discount-box">

				<div class="discount-content">
					<h2><?php esc_html_e( 'Get Special Discount', 'prime-software-company' ); ?></h2>

					<p><?php esc_html_e( 'Copy Code & Save 20% OFF!', 'prime-software-company' ); ?></p>

					<div class="coupon-code" onclick="copyCouponCode(this)">
						<?php echo esc_html( 'SAVE20NOW' ); ?>
					</div>

					<div class="buy-button">

						<a href="<?php echo esc_url( 'https://webnotick.com/cart/51149540491556:1?channel=buy_button' ); ?>" target="_blank" rel="noopener noreferrer">
							➤
							<span>
								<?php esc_html_e( 'Buy Now', 'prime-software-company' ); ?>
							</span>
						</a>

					</div>

				</div>

			</div>

			<div class="admin-images">

				<img 
					src="<?php echo esc_url( $template_uri . '/wellcome-theme/assets/img/classic.png' ); ?>" 
					alt="<?php esc_attr_e( 'Classic Homepage', 'prime-software-company' ); ?>"
				>

				<img 
					src="<?php echo esc_url( $template_uri . '/wellcome-theme/assets/img/modern.png' ); ?>" 
					alt="<?php esc_attr_e( 'Modern Homepage', 'prime-software-company' ); ?>"
				>

			</div>

			<div class="theme-guide-box">

				<div class="theme-guide-title">
					<h2><?php esc_html_e( 'Homepage Design Settings', 'prime-software-company' ); ?></h2>

					<br>

					<p>
						<?php esc_html_e( 'Easily customize your homepage layout and website appearance using the options below.', 'prime-software-company' ); ?>
					</p>
				</div>

				<div class="theme-guide-grid">

					<div class="theme-guide-item">
						<span>1</span>

						<h3><?php esc_html_e( 'Select Homepage', 'prime-software-company' ); ?></h3>

						<p>
							<?php esc_html_e( 'Choose between Classic Homepage or Modern Homepage layout design.', 'prime-software-company' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>2</span>

						<h3><?php esc_html_e( 'Classic & Modern Sections', 'prime-software-company' ); ?></h3>

						<p>
							<?php esc_html_e( 'Customize homepage layout with flexible section ordering.', 'prime-software-company' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>3</span>

						<h3><?php esc_html_e( 'Theme Color', 'prime-software-company' ); ?></h3>

						<p>
							<?php esc_html_e( 'Enable or disable custom theme colors for buttons and sections.', 'prime-software-company' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>4</span>

						<h3><?php esc_html_e( 'Section Order', 'prime-software-company' ); ?></h3>

						<p>
							<?php esc_html_e( 'Drag and drop homepage sections to reorder them easily.', 'prime-software-company' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>5</span>

						<h3><?php esc_html_e( 'Enable / Disable Sections', 'prime-software-company' ); ?></h3>

						<p>
							<?php esc_html_e( 'Show or hide homepage sections instantly using checkboxes.', 'prime-software-company' ); ?>
						</p>
					</div>

					<div class="theme-guide-item">
						<span>6</span>

						<h3><?php esc_html_e( 'Live Preview', 'prime-software-company' ); ?></h3>

						<p>
							<?php esc_html_e( 'All changes appear instantly in the customizer preview window.', 'prime-software-company' ); ?>
						</p>
					</div>

				</div>

			</div>

			<div class="admin-buttons">

				<a 
					href="<?php echo esc_url( 'https://www.webnotickdemo.com/prime-software-company' ); ?>" 
					target="_blank" 
					rel="noopener noreferrer"
					class="button button-primary button-hero"
				>
					<?php esc_html_e( 'View Demo', 'prime-software-company' ); ?>
				</a>

				<a 
					href="<?php echo esc_url( 'https://webnotick.com/cart/51149540491556:1?channel=buy_button' ); ?>" 
					target="_blank" 
					rel="noopener noreferrer"
					class="button button-hero button2"
				>
					<?php esc_html_e( 'Buy Now', 'prime-software-company' ); ?>
				</a>

			</div>

		</div>
	</div>

	<script>
		function copyCouponCode(element) {

			const text = element.innerText;

			navigator.clipboard.writeText(text);

			element.innerText = "Copied!";

			setTimeout(() => {
				element.innerText = text;
			}, 1000);
		}
	</script>

	<?php
}
?>