<?php

add_action( 'admin_menu', 'swimming_pool_cleaning_gettingstarted' );
function swimming_pool_cleaning_gettingstarted() {    	
	add_theme_page( esc_html__('About Theme', 'swimming-pool-cleaning'), esc_html__('Theme Demo Import', 'swimming-pool-cleaning'), 'edit_theme_options', 'swimming-pool-cleaning-guide-page', 'swimming_pool_cleaning_guide');   
}

function swimming_pool_cleaning_admin_theme_style() {
   wp_enqueue_style('swimming-pool-cleaning-custom-admin-style', esc_url(get_template_directory_uri()) . '/inc/dashboard/get_started_info.css');
   wp_enqueue_script('swimming-pool-cleaning-tab', esc_url( get_template_directory_uri() ) . '/inc/dashboard/js/get_started_tab.js');

    // Admin notice code START
	wp_register_script('swimming-pool-cleaning-notice', esc_url(get_template_directory_uri()) . '/inc/dashboard/js/notice.js', array('jquery'), time(), true);
	wp_enqueue_script('swimming-pool-cleaning-notice');
	// Admin notice code END
}
add_action('admin_enqueue_scripts', 'swimming_pool_cleaning_admin_theme_style');

// Notice after Theme Activation
add_action('admin_notices', 'swimming_pool_cleaning_activation_notice');

function swimming_pool_cleaning_activation_notice() {
    // Hide permanently if dismissed
    if ( get_option('swimming_pool_cleaning_admin_notice') == 1 ) {
        return;
    }
    // Hide ONLY on Get Started page
    if ( isset($_GET['page']) && $_GET['page'] === 'swimming-pool-cleaning-guide-page' ) {
        return;
    } ?>       
        <div id="swimming-pool-cleaning-welcome-notice" class="notice notice-success is-dismissible getting_started activation-notice	">
            <div class="notice-info">
                <div class="notice-image">
                    <img style="width: 100%;max-width: 320px;line-height: 40px;display: inline-block;vertical-align: top;" src="<?php echo esc_url( get_stylesheet_directory_uri() . '/screenshot.png' ); ?>" />
                </div>
                <div class="notice-content">
                    <h2><?php esc_html_e( 'Thanks For Installing Swimming Pool Cleaning, You Rock!', 'swimming-pool-cleaning' ); ?></h2>
                    <p><?php esc_html_e( 'Take benefit of a variety of features, functionalities, elements, and an exclusive set of customization options to build your own professional store website. Please click the link below for theme setup details.', 'swimming-pool-cleaning' ); ?></p>
                    <div style="display: grid;">
                        <a class="button notice-btn" href="<?php echo esc_url( admin_url( 'themes.php?page=swimming-pool-cleaning-guide-page' ) ); ?>">
                            <?php esc_html_e( 'Getting Started', 'swimming-pool-cleaning' ); ?>
                        </a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url( SWIMMING_POOL_CLEANING_LIVE_DEMO ); ?>">
                            <?php esc_html_e('Pro Demo', 'swimming-pool-cleaning'); ?>
                        </a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url( SWIMMING_POOL_CLEANING_FREE_DOC ); ?>">
                            <?php esc_html_e('Free Doc', 'swimming-pool-cleaning'); ?>
                        </a>
                        <a class="button notice-btn" target="_blank" href="<?php echo esc_url( SWIMMING_POOL_CLEANING_BUY_PRO ); ?>">
                            <?php esc_html_e('Upgrade To Pro', 'swimming-pool-cleaning'); ?>
                        </a>
                    </div>
                </div>
            </div>
        </div>

    <?php
	
}
//Hook (VERY IMPORTANT)
add_action('admin_notices', 'swimming_pool_cleaning_activation_notice');

// Admin notice code START
add_action('wp_ajax_swimming_pool_cleaning_dismiss_notice', 'swimming_pool_cleaning_dismiss_notice');
function swimming_pool_cleaning_dismiss_notice() {
    update_option('swimming_pool_cleaning_admin_notice', 1);
    wp_die();
}

//After Switch theme function
add_action('after_switch_theme', 'swimming_pool_cleaning_getstart_setup_options');
function swimming_pool_cleaning_getstart_setup_options () {
    delete_option('swimming_pool_cleaning_admin_notice');
}
// Admin notice code END

/**
 * Theme Info Page
 */
function swimming_pool_cleaning_guide() {

	// Theme info
	$swimming_pool_cleaning_return = add_query_arg( array()) ;
	$swimming_pool_cleaning_theme = wp_get_theme( 'swimming-pool-cleaning' ); ?>

	<div class="wrap getting-started">
		<div class="getting-started__header">
		    <div>
                <h2 class="tgmpa-notice-warning"></h2>
            </div>
		</div>
		<div class="tab-sec">
			<div class="tab">
				<button role="tab" class="tablinks home" onclick="swimming_pool_cleaning_openCity(event, 'bwp_getstart')"><?php esc_html_e( 'Theme Demo Import', 'swimming-pool-cleaning' ); ?></button>
				<button role="tab" class="tablinks" onclick="swimming_pool_cleaning_openCity(event, 'bwp_setup')"><?php esc_html_e( 'Free Theme Information', 'swimming-pool-cleaning' ); ?></button>
				<button role="tab" class="tablinks" onclick="swimming_pool_cleaning_openCity(event, 'bwp_premium_info')"><?php esc_html_e( 'Premium Theme Information', 'swimming-pool-cleaning' ); ?></button>
				<a class="tablinks tablinks-demo" role="tab" href="<?php echo esc_url( SWIMMING_POOL_CLEANING_LIVE_DEMO ); ?>" target="_blank">
					<?php esc_html_e( 'Live Demo', 'swimming-pool-cleaning' ); ?>
				</a>
				<a class="tablinks tablinks-pro" role="tab" href="<?php echo esc_url( SWIMMING_POOL_CLEANING_BUY_PRO ); ?>" target="_blank">
					<?php esc_html_e( 'Buy Pro', 'swimming-pool-cleaning' ); ?>
				</a>
			</div>
			<div  id="bwp_getstart" class="tabcontent">
				<div class="row">
					<div class="col-md-5 intro">
						<div class="pad-box">
							<h2><?php esc_html_e( 'Welcome to Swimming Pool Cleaning ', 'swimming-pool-cleaning' ); ?>
							<span><?php esc_html_e( 'Version: ', 'swimming-pool-cleaning' ); ?><?php echo esc_html($swimming_pool_cleaning_theme['Version']);?></span>
							</h2>
							<span class="intro__version"><?php esc_html_e( 'Congratulations! You are about to use the most easy to use and flexible WordPress theme.', 'swimming-pool-cleaning' ); ?>
							</span>
							<div class="powered-by">
								<p><strong><?php esc_html_e( 'Theme created by Buy WP Templates', 'swimming-pool-cleaning' ); ?></strong></p>
								<p>
									<img class="logo" src="<?php echo esc_url(get_template_directory_uri() . '/inc/dashboard/media/theme-logo.png'); ?>"/>
								</p>
								<div class="demo-content">
									<?php
										/* Demo Import */
										require get_parent_theme_file_path( '/inc/dashboard/demo-content.php' );
									?>
								</div>

								<div id="demo-import-loader">
									<img src="<?php echo esc_url(get_template_directory_uri() . '/inc/dashboard/media/spinner.gif'); ?>" alt="<?php echo esc_attr( 'Loading...', 'swimming-pool-cleaning'); ?>" />
								</div>
							</div>
						</div>
					</div>
					<div class="col-md-7">
						<div class="install-plugins">
							<img src="<?php echo esc_url(get_template_directory_uri() . '/inc/dashboard/media/responsive1.png'); ?>" alt="<?php echo esc_attr( 'responsive-image', 'swimming-pool-cleaning'); ?>" />
						</div>
					</div>
				</div>
				<div class="dashboard__blocks">
					<div class="row">
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Get Support','swimming-pool-cleaning'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( SWIMMING_POOL_CLEANING_FREE_SUPPORT ); ?>"><?php esc_html_e( 'Free Theme Support','swimming-pool-cleaning'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( SWIMMING_POOL_CLEANING_PRO_SUPPORT ); ?>"><?php esc_html_e( 'Premium Theme Support','swimming-pool-cleaning'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Getting Started','swimming-pool-cleaning'); ?></h3>
							<ol>
								<li><?php esc_html_e( 'Start','swimming-pool-cleaning'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','swimming-pool-cleaning'); ?></a> <?php esc_html_e( 'your website.','swimming-pool-cleaning'); ?> </li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Help Docs','swimming-pool-cleaning'); ?></h3>
							<ol>
								<li><a target="_blank" href="<?php echo esc_url( SWIMMING_POOL_CLEANING_FREE_DOC ); ?>"><?php esc_html_e( 'Free Theme Documentation','swimming-pool-cleaning'); ?></a></li>
								<li><a target="_blank" href="<?php echo esc_url( SWIMMING_POOL_CLEANING_PRO_DOC ); ?>"><?php esc_html_e( 'Premium Theme Documentation','swimming-pool-cleaning'); ?></a></li>
							</ol>
						</div>
						<div class="col-md-3">
							<h3><?php esc_html_e( 'Buy Premium','swimming-pool-cleaning'); ?></h3>
							<ol>
								<a href="<?php echo esc_url( SWIMMING_POOL_CLEANING_BUY_PRO ); ?>" target="_blank"><?php esc_html_e('Buy Pro', 'swimming-pool-cleaning'); ?></a>
							</ol>
						</div>
					</div>
				</div>
			</div>
			<div  id="bwp_setup" class="tabcontent">
				<h2 class="tg-docs-section intruction-title" id="section-4"><?php esc_html_e( '1) Setup Swimming Pool Cleaning Theme', 'swimming-pool-cleaning' ); ?></h2>
				<div class="row">
					<div class="theme-instruction-block col-md-7">
						<div class="pad-box">
							<p><?php esc_html_e( 'Swimming Pool Cleaning is a comprehensive solution for pool service businesses, offering everything needed for pool maintenance, water treatment, and outdoor cleaning services. Perfect for pool repair companies, cleaning agencies, backyard service professionals, and even a housewife managing residential upkeep, this platform covers all aspects of your pool care business. With features tailored for pool cleaning services, repair work, and maintenance solutions, this theme ensures an excellent user experience. It includes a responsive booking plugin for scheduling appointments, managing single events, and creating weekly timetables, making it convenient for a busy housewife or professional service provider to organize tasks efficiently. The drag-and-drop page builder simplifies website creation, allowing you to customize service offerings, cleaning solutions, and layouts without coding. Additionally, it features a mega menu, sticky navigation, mobile-friendly design, and flexible sections for underwater sports, sea diving, or boat booking services. With a fitness calculator, filterable portfolio, image galleries, and integrated contact form with map, this theme provides all the tools necessary to showcase your services, engage customers, and attract new clients. Fully responsive and optimized for speed and SEO, Swimming Pool Cleaning is ideal for residential and commercial pool care businesses looking to stand out online.', 'swimming-pool-cleaning' ); ?><p><br>
							<ol>
								<li><?php esc_html_e( 'Start','swimming-pool-cleaning'); ?> <a target="_blank" href="<?php echo esc_url( admin_url('customize.php') ); ?>"><?php esc_html_e( 'Customizing','swimming-pool-cleaning'); ?></a> <?php esc_html_e( 'your website.','swimming-pool-cleaning'); ?> </l>
								<li><?php esc_html_e( 'Swimming Pool Cleaning','swimming-pool-cleaning'); ?> <a target="_blank" href="<?php echo esc_url( SWIMMING_POOL_CLEANING_FREE_DOC ); ?>"><?php esc_html_e( 'Documentation','swimming-pool-cleaning'); ?></a> </li>
							</ol>
						</div>
					</div>
					<div class="col-md-5">
						<div class="pad-box">
								<img class="logo" src="<?php echo esc_url(get_template_directory_uri() . '/inc/dashboard/media/screenshot.png'); ?>"/>
						</div>
					</div>	
				</div>
			</div>
			<div class="col-md-12 text-block tabcontent"  id="bwp_premium_info">
				<h2 class="dashboard-install-title"><?php esc_html_e( '2) Premium Theme Information.','swimming-pool-cleaning'); ?></h2>
				<div class="row">
					<div class="col-md-7">
						<img src="<?php echo esc_url(get_template_directory_uri() . '/inc/dashboard/media/responsive.png'); ?>" alt="<?php echo esc_attr( 'responsive-image', 'swimming-pool-cleaning'); ?>">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Description','swimming-pool-cleaning'); ?></h3>
							<p class="pad-box-p"><?php esc_html_e( 'Our premium Swimming Pool WordPress Theme affords first-rate in-type features. It has distinctly useful plug-ins. It is customizable, which lets you modify your theme besides writing a single line of code. Its couple of web page layouts, responsiveness, pagination, footer customization option, WooCommerce assist, etc., make it a totally practical theme. Its superior points, like being retina-ready, parallax and favicon, and brand and title customization, get it the front seat amongst its competing themes. It has social media sharing facility provided. We dont simply do business; we take care of each and every want of yours. That is why we furnish full help even after furnishing our theme. Our professionals are constantly reachable at your carrier to assist you with any trouble you face. Not simply that our theme comes with full documentation that even a naive character can personalize, barring having to write any code. When you can have the great, then why compromise with something less? So install our Swimming Pool WordPress Theme and let it do all the online features of your commercial enterprise for you.', 'swimming-pool-cleaning' ); ?><p>
						</div>
					</div>
					<div class="col-md-5 install-plugin-right">
						<div class="pad-box">
							<h3><?php esc_html_e( 'Pro Theme Features','swimming-pool-cleaning'); ?></h3>
							<div class="dashboard-install-benefit">
								<ul>
									<li><?php esc_html_e( 'Car listing Shortcode with category','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Car listing Shortcode','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Multiple image feature for each property with slider.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Brand Listing Section','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Car Brand(categories) Option','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Car Tags(categories) Option','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Testimonial listing.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Testimonial shortcode.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Social icons widget.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Latest post with the image widget.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Live customize editor for the About US section.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Font Awesome integrated.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Advanced Color options and color pallets.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( '100+ Font Family Options.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Enable-Disable options on All sections.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Well sanitized as per WordPress standards.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Allow to set site title, tagline, logo.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Sticky post & Comment threads.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Left and Right Sidebar.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Customizable Home Page.','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Footer Widgets & Editor style','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Gallery & Banner functionality','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Multiple inner page templates','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Full-width Template','swimming-pool-cleaning'); ?></li>
									<li><?php esc_html_e( 'Custom Menu, Colors Editor','swimming-pool-cleaning'); ?></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

<?php }?>