<div class="theme-offer">
    <?php
        // Check if the demo import has been completed
        $auction_bidding_demo_import_completed = get_option('auction_bidding_demo_import_completed', false);

        // If the demo import is completed, display the "View Site" button
        if ($auction_bidding_demo_import_completed) {
        echo '<p class="notice-text">' . esc_html__('Your demo import has been completed successfully.', 'auction-bidding') . '</p>';
        echo '<span><a href="' . esc_url(home_url()) . '" class="button button-primary site-btn" target="_blank">' . esc_html__('View Site', 'auction-bidding') . '</a></span>';
        echo '<span><a href="'. esc_url(admin_url('customize.php') ) .'" class="button button-primary demo-btn" target=_blank>'. esc_html__( 'Customize Your Site', 'auction-bidding' ) .'</a></span>';
        echo '<span><a href="'. esc_url( 'https://preview.vwthemesdemo.com/docs/free-auction-bidding/' ) .'" class="button button-primary doc-btn" target=_blank>'. esc_html__( 'Free Theme Documentation', 'auction-bidding' ) .'</a></span>';     
    }

        //POST and update the customizer and other related data
        if (isset($_POST['submit'])) {

            // Check if ibtana visual editor is installed and activated
            if (!is_plugin_active('ibtana-visual-editor/plugin.php')) {
              // Install the plugin if it doesn't exist
              $auction_bidding_plugin_slug = 'ibtana-visual-editor';
              $auction_bidding_plugin_file = 'ibtana-visual-editor/plugin.php';

              // Check if plugin is installed
              $auction_bidding_installed_plugins = get_plugins();
              if (!isset($auction_bidding_installed_plugins[$auction_bidding_plugin_file])) {
                  include_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
                  include_once(ABSPATH . 'wp-admin/includes/file.php');
                  include_once(ABSPATH . 'wp-admin/includes/misc.php');
                  include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');

                  // Install the plugin
                  $auction_bidding_upgrader = new Plugin_Upgrader();
                  $auction_bidding_upgrader->install('https://downloads.wordpress.org/plugin/ibtana-visual-editor.latest-stable.zip');
              }
              // Activate the plugin
              activate_plugin($auction_bidding_plugin_file);
            }

            // Check if woocommerce is installed and activated
            if (!is_plugin_active('woocommerce/woocommerce.php')) {
              // Install the plugin if it doesn't exist
              $auction_bidding_plugin_slug = 'woocommerce';
              $auction_bidding_plugin_file = 'woocommerce/woocommerce.php';

              // Check if plugin is installed
              $auction_bidding_installed_plugins = get_plugins();
              if (!isset($auction_bidding_installed_plugins[$auction_bidding_plugin_file])) {
                  include_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
                  include_once(ABSPATH . 'wp-admin/includes/file.php');
                  include_once(ABSPATH . 'wp-admin/includes/misc.php');
                  include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');

                  // Install the plugin
                  $auction_bidding_upgrader = new Plugin_Upgrader();
                  $auction_bidding_upgrader->install('https://downloads.wordpress.org/plugin/woocommerce.latest-stable.zip');
              }
              // Activate the plugin
              activate_plugin($auction_bidding_plugin_file);
            }

            // Check if gtranslate is installed and activated
            if (!is_plugin_active('gtranslate/gtranslate.php')) {
                // Install the plugin if it doesn't exist
                $auction_bidding_plugin_slug = 'gtranslate';
                $auction_bidding_plugin_file = 'gtranslate/gtranslate.php';
  
                // Check if plugin is installed
                $auction_bidding_installed_plugins = get_plugins();
                if (!isset($auction_bidding_installed_plugins[$auction_bidding_plugin_file])) {
                    include_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
                    include_once(ABSPATH . 'wp-admin/includes/file.php');
                    include_once(ABSPATH . 'wp-admin/includes/misc.php');
                    include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');
  
                    // Install the plugin
                    $auction_bidding_upgrader = new Plugin_Upgrader();
                    $auction_bidding_upgrader->install('https://downloads.wordpress.org/plugin/gtranslate.latest-stable.zip');
                }
                // Activate the plugin
                activate_plugin($auction_bidding_plugin_file);
            }
  
            // Check if ultimate-woocommerce-auction is installed and activated 
            if (!is_plugin_active('ultimate-woocommerce-auction/ultimate-woocommerce-auction.php')) {
                // Install the plugin if it doesn't exist
                $auction_bidding_plugin_slug = 'ultimate-woocommerce-auction';
                $auction_bidding_plugin_file = 'ultimate-woocommerce-auction/ultimate-woocommerce-auction.php';
  
                // Check if plugin is installed
                $auction_bidding_installed_plugins = get_plugins();
                if (!isset($auction_bidding_installed_plugins[$auction_bidding_plugin_file])) {
                    include_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
                    include_once(ABSPATH . 'wp-admin/includes/file.php');
                    include_once(ABSPATH . 'wp-admin/includes/misc.php');
                    include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');
  
                    // Install the plugin
                    $auction_bidding_upgrader = new Plugin_Upgrader();
                    $auction_bidding_upgrader->install('https://downloads.wordpress.org/plugin/ultimate-woocommerce-auction.latest-stable.zip');
                }
                // Activate the plugin
                activate_plugin($auction_bidding_plugin_file);
            }

            //Check if currency-switcher-woocommerce is installed and activated
            if (!is_plugin_active('currency-switcher-woocommerce/currency-switcher-woocommerce.php')) {
                // Install the plugin if it doesn't exist
                $auction_bidding_plugin_slug = 'currency-switcher-woocommerce';
                $auction_bidding_plugin_file = 'currency-switcher-woocommerce/currency-switcher-woocommerce.php';
  
                // Check if plugin is installed
                $auction_bidding_installed_plugins = get_plugins();
                if (!isset($auction_bidding_installed_plugins[$auction_bidding_plugin_file])) {
                    include_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
                    include_once(ABSPATH . 'wp-admin/includes/file.php');
                    include_once(ABSPATH . 'wp-admin/includes/misc.php');
                    include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');
  
                    // Install the plugin
                    $auction_bidding_upgrader = new Plugin_Upgrader();
                    $auction_bidding_upgrader->install('https://downloads.wordpress.org/plugin/currency-switcher-woocommerce.latest-stable.zip');
                }
                // Activate the plugin
                activate_plugin($auction_bidding_plugin_file);
            }

            //Check if  YITH WooCommerce Wishlist is installed and activated
            if (!is_plugin_active('yith-woocommerce-wishlist/init.php')) {
                // Install the plugin if it doesn't exist
                $auction_bidding_plugin_slug = 'yith-woocommerce-wishlist';
                $auction_bidding_plugin_file = 'yith-woocommerce-wishlist/init.php';

                // Check if plugin is installed
                $auction_bidding_installed_plugins = get_plugins();
                if (!isset($auction_bidding_installed_plugins[$auction_bidding_plugin_file])) {
                include_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
                include_once(ABSPATH . 'wp-admin/includes/file.php');
                include_once(ABSPATH . 'wp-admin/includes/misc.php');
                include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');

                // Install the plugin
                $auction_bidding_upgrader = new Plugin_Upgrader();
                $auction_bidding_upgrader->install('https://downloads.wordpress.org/plugin/yith-woocommerce-wishlist.latest-stable.zip');
                }

                // Activate the plugin
                activate_plugin($auction_bidding_plugin_file);
            }

            
            // ------- Create Nav Menu --------
            

            // Check if the left menu exists
            $auction_bidding_menuname_left = 'Primary Left Menu';
            $auction_bidding_bpmenulocation_left = 'primary-left';
            $auction_bidding_menuname_right = 'Primary Right Menu';
            $auction_bidding_bpmenulocation_right = 'primary-right';

            // Check if the left menu exists
            $auction_bidding_left_menu_exists = wp_get_nav_menu_object($auction_bidding_menuname_left);

            if (!$auction_bidding_left_menu_exists) {
                $auction_bidding_left_menu_id = wp_create_nav_menu($auction_bidding_menuname_left);

                // Create Home Page
                $auction_bidding_home_title = 'Home';
                $auction_bidding_home = array(
                    'post_type' => 'page',
                    'post_title' => $auction_bidding_home_title,
                    'post_content' => '',
                    'post_status' => 'publish',
                    'post_author' => 1,
                    'post_name' => 'home'
                );
                $auction_bidding_home_id = wp_insert_post($auction_bidding_home);
                add_post_meta($auction_bidding_home_id, '_wp_page_template', 'page-template/custom-home-page.php');
                update_option('page_on_front', $auction_bidding_home_id);
                update_option('show_on_front', 'page');

                // Add Home Page to Left Menu
                wp_update_nav_menu_item($auction_bidding_left_menu_id, 0, array(
                    'menu-item-title' => __('Home', 'auction-bidding'),
                    'menu-item-classes' => 'home',
                    'menu-item-url' => home_url('/'),
                    'menu-item-status' => 'publish',
                    'menu-item-object-id' => $auction_bidding_home_id,
                    'menu-item-object' => 'page',
                    'menu-item-type' => 'post_type'
                ));

                // Add 'Pages' to Left Menu
                $auction_bidding_pages_title = 'Pages';
                $auction_bidding_pages_content = '...';
                $auction_bidding_pages = array(
                    'post_type' => 'page',
                    'post_title' => $auction_bidding_pages_title,
                    'post_content' => $auction_bidding_pages_content,
                    'post_status' => 'publish',
                    'post_author' => 1,
                    'post_name' => 'pages'
                );
                $auction_bidding_pages_id = wp_insert_post($auction_bidding_pages);
                wp_update_nav_menu_item($auction_bidding_left_menu_id, 0, array(
                    'menu-item-title' => __('Pages', 'auction-bidding'),
                    'menu-item-classes' => 'pages',
                    'menu-item-url' => home_url('/pages/'),
                    'menu-item-status' => 'publish',
                    'menu-item-object-id' => $auction_bidding_pages_id,
                    'menu-item-object' => 'page',
                    'menu-item-type' => 'post_type'
                ));

                // Add 'About Us' to Left Menu
                $auction_bidding_about_title = 'About Us';
                $auction_bidding_about_content = '...'; 
                $auction_bidding_about = array(
                    'post_type' => 'page',
                    'post_title' => $auction_bidding_about_title,
                    'post_content' => $auction_bidding_about_content,
                    'post_status' => 'publish',
                    'post_author' => 1,
                    'post_name' => 'about-us'
                );
                $auction_bidding_about_id = wp_insert_post($auction_bidding_about);
                wp_update_nav_menu_item($auction_bidding_left_menu_id, 0, array(
                    'menu-item-title' => __('About Us', 'auction-bidding'),
                    'menu-item-classes' => 'about-us',
                    'menu-item-url' => home_url('/about-us/'),
                    'menu-item-status' => 'publish',
                    'menu-item-object-id' => $auction_bidding_about_id,
                    'menu-item-object' => 'page',
                    'menu-item-type' => 'post_type'
                ));

                // Assign Left Menu to its location
                if (!has_nav_menu($auction_bidding_bpmenulocation_left)) {
                    $auction_bidding_locations = get_theme_mod('nav_menu_locations', array());
                    $auction_bidding_locations[$auction_bidding_bpmenulocation_left] = $auction_bidding_left_menu_id;
                    set_theme_mod('nav_menu_locations', $auction_bidding_locations);
                }
            }
                // Check if the right menu exists
                $auction_bidding_right_menu_exists = wp_get_nav_menu_object($auction_bidding_menuname_right);
                if ( !$auction_bidding_right_menu_exists ) {
                    $auction_bidding_right_menu_id = wp_create_nav_menu($auction_bidding_menuname_right);
    
                // CREATE SHOP PAGE
                $auction_bidding_about_title = 'Shop';
                $auction_bidding_about_content = 'Lorem ipsum dolor sit amet...';

                $shop_page = get_page_by_path('shop');
                if ( !$shop_page ) {
                    $auction_bidding_about = array(
                        'post_type'   => 'page',
                        'post_title'  => $auction_bidding_about_title,
                        'post_content'=> $auction_bidding_about_content,
                        'post_status' => 'publish',
                        'post_author' => 1,
                        'post_name'   => 'shop' 
                        );
                        $auction_bidding_about_id = wp_insert_post($auction_bidding_about);
                    } else {
                        $auction_bidding_about_id = $shop_page->ID;
                    }

                    wp_update_nav_menu_item($auction_bidding_right_menu_id, 0, array(
                        'menu-item-title'   => __('Shop', 'auction-bidding'),
                        'menu-item-classes' => 'shop',
                        'menu-item-object-id' => $auction_bidding_about_id,
                        'menu-item-object'  => 'page',
                        'menu-item-type'    => 'post_type',
                        'menu-item-status'  => 'publish'
                    ));
        
                // CREATE YOUR AUCTION PAGE
                $auction_bidding_your_auction_page = get_page_by_path('your-auction');

                if ( !$auction_bidding_your_auction_page ) {
                    $auction_bidding_auction_content = '
                        Lorem ipsum dolor sit amet, consectetur adipiscing elit.<br>
                        Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br>
                        Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.<br>
                        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum.<br>
                        Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia.<br>
                        Curabitur non nulla sit amet nisl tempus convallis quis ac lectus.<br>
                        Nulla porttitor accumsan tincidunt.
                    ';
                    $auction_bidding_auction_page_data = array(
                        'post_type'    => 'page',
                        'post_title'   => 'Your Auction',
                        'post_content' => $auction_bidding_auction_content,
                        'post_status'  => 'publish',
                        'post_author'  => 1,
                        'post_name'    => 'your-auction'
                    );
                    $auction_bidding_your_auction_page_id = wp_insert_post($auction_bidding_auction_page_data);
                    } else {
                        $auction_bidding_your_auction_page_id = $auction_bidding_your_auction_page->ID;
                    }
                    wp_update_nav_menu_item($auction_bidding_right_menu_id, 0, array(
                        'menu-item-title'      => __('Your Auction', 'auction-bidding'),
                        'menu-item-classes'    => 'your-auction',
                        'menu-item-object-id'  => $auction_bidding_your_auction_page_id,
                        'menu-item-object'     => 'page',
                        'menu-item-type'       => 'post_type',
                        'menu-item-status'     => 'publish'
                    ));

                    // 2. CREATE BLOG PAGE                    
                    $auction_bidding_blog_page_title = 'Blog';
                    $auction_bidding_blog_page_query = new WP_Query(array(
                        'post_type'      => 'page',
                        'title'          => $auction_bidding_blog_page_title,
                        'post_status'    => 'publish',
                        'posts_per_page' => 1
                    ));
                    if ($auction_bidding_blog_page_query->have_posts()) {
                        $auction_bidding_blog_page_id = $auction_bidding_blog_page_query->posts[0]->ID;
                    } else {
                        // Create Blog Page
                        $auction_bidding_blog_page = array(
                        'post_type'   => 'page',
                        'post_title'  => $auction_bidding_blog_page_title,
                        'post_status' => 'publish',
                        'post_author' => 1,
                        'post_name'   => 'blog'
                        );
                        $auction_bidding_blog_page_id = wp_insert_post($auction_bidding_blog_page);
                    }
                    update_option('page_for_posts', $auction_bidding_blog_page_id);
                    $blog_url = get_permalink($auction_bidding_blog_page_id);
                    wp_update_nav_menu_item($auction_bidding_right_menu_id, 0, array(
                        'menu-item-title'   => __('Blog', 'auction-bidding'),
                        'menu-item-classes' => 'blog',
                        'menu-item-url'     => $blog_url,
                        'menu-item-status'  => 'publish',
                        'menu-item-type'    => 'custom' 
                    ));

                // Assign Right Menu to its location
                if (!has_nav_menu($auction_bidding_bpmenulocation_right)) {
                    $auction_bidding_locations = get_theme_mod('nav_menu_locations', array());
                    $auction_bidding_locations[$auction_bidding_bpmenulocation_right] = $auction_bidding_right_menu_id;
                    set_theme_mod('nav_menu_locations', $auction_bidding_locations);
                }
            }

            // Set the demo import completion flag
            update_option('auction_bidding_demo_import_completed', true);
            // Display success message and "View Site" button
            echo '<p class="notice-text">' . esc_html__('Your demo import has been completed successfully.', 'auction-bidding') . '</p>';
            echo '<span><a href="' . esc_url(home_url()) . '" class="button button-primary site-btn" target="_blank">' . esc_html__('View Site', 'auction-bidding') . '</a></span>';
            echo '<span><a href="'. esc_url(admin_url('customize.php') ) .'" class="button button-primary demo-btn" target=_blank>'. esc_html__( 'Customize Your Site', 'auction-bidding' ) .'</a></span>';
            echo '<span><a href="'. esc_url( 'https://preview.vwthemesdemo.com/docs/free-auction-bidding/' ) .'" class="button button-primary doc-btn" target=_blank>'. esc_html__( 'Free Theme Documentation', 'auction-bidding' ) .'</a></span>'; 
            //end


            // Top Bar //
            set_theme_mod( 'auction_bidding_phone_number', '+00 123 456 7890' );
            set_theme_mod( 'auction_bidding_email_address', 'support@example.com' );

            // slider section start //
            set_theme_mod( 'auction_bidding_slider_button_text', 'Start Exploring' );
            set_theme_mod( 'aauction_bidding_top_button_url', 'www.example-info.com' );

            for($auction_bidding_i=1;$auction_bidding_i<=3;$auction_bidding_i++){
                $auction_bidding_slider_title = 'Hurry Up To Catch the Ultimate Sale on Bid';
            
                   // Create post object
                $auction_bidding_my_post = array(
                'post_title'    => wp_strip_all_tags( $auction_bidding_slider_title ),
                'post_status'   => 'publish',
                'post_type'     => 'page',
                );

                // Insert the post into the database
                $auction_bidding_post_id = wp_insert_post( $auction_bidding_my_post );

                if ($auction_bidding_post_id) {
                  // Set the theme mod for the slider page
                  set_theme_mod('auction_bidding_slider_page' . $auction_bidding_i, $auction_bidding_post_id);

                   $auction_bidding_image_url = get_template_directory_uri().'/assets/images/slider'.$auction_bidding_i.'.png';

                 $auction_bidding_image_id = media_sideload_image($auction_bidding_image_url, $auction_bidding_post_id, null, 'id');

                    if (!is_wp_error($auction_bidding_image_id)) {
                         // Set the downloaded image as the post's featured image
                        set_post_thumbnail($auction_bidding_post_id, $auction_bidding_image_id);
                    }
                }
            }

            // products
            set_theme_mod( 'auction_bidding_product_heading_product', 'Live Auction' );
            set_theme_mod( 'auction_bidding_product_title', 'Explore on the worlds best & largest Bidding marketplace ' );
            set_theme_mod('auction_bidding_services_number', '5' );

            $auction_bidding_tab_text_array = array("Houses", "Vehicles", "Furnitures", "Phones", "Electronics");
            $auction_bidding_category_names = array("postcategory1", "postcategory2", "postcategory3", "postcategory4", "postcategory5");
            $auction_bidding_title_array = array(
                array("Apartment & Office", "Modern Office", "Trend Villa", "California Penthhouse"),
                array("California Penthhouse", "Trend Villa", "Apartment & Office", "Modern Office"),
                array("Apartment & Office", "Modern Office", "Trend Villa", "California Penthhouse"),
                array("California Penthhouse", "Trend Villa", "Apartment & Office", "Modern Office"),
                array("Apartment & Office", "Modern Office", "Trend Villa", "California Penthhouse")
            );
            
            for ($auction_bidding_tab_index = 1; $auction_bidding_tab_index <= 5; $auction_bidding_tab_index++) {
                $auction_bidding_theme_mod_key = 'auction_bidding_services_text' . $auction_bidding_tab_index;
                $auction_bidding_theme_mod_value = $auction_bidding_tab_text_array[$auction_bidding_tab_index - 1];
                set_theme_mod($auction_bidding_theme_mod_key, $auction_bidding_theme_mod_value);
            
                // Set the category for this tab
                $auction_bidding_current_category = $auction_bidding_category_names[$auction_bidding_tab_index - 1];
                set_theme_mod('auction_bidding_product_settings' . $auction_bidding_tab_index, $auction_bidding_current_category);
            
                // Create or retrieve the product category term ID
                $auction_bidding_term = term_exists($auction_bidding_current_category, 'product_cat'); // For WooCommerce product categories
                if ($auction_bidding_term === 0 || $auction_bidding_term === null) {
                    // If the term does not exist, create it
                    $auction_bidding_term = wp_insert_term($auction_bidding_current_category, 'product_cat');
                }
                if (is_wp_error($auction_bidding_term)) {
                    error_log('Error creating category: ' . $auction_bidding_term->get_error_message());
                    continue; // Skip to the next iteration if category creation fails
                }
            
                for ($auction_bidding_i = 0; $auction_bidding_i < 4; $auction_bidding_i++) {
                    // Create product data
                    $auction_bidding_title = $auction_bidding_title_array[$auction_bidding_tab_index - 1][$auction_bidding_i];
                    $auction_bidding_content = 'Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s.';

                    // Create product post object
                    $auction_bidding_my_post = array(
                        'post_title'    => wp_strip_all_tags($auction_bidding_title),
                        'post_content'  => $auction_bidding_content,
                        'post_status'   => 'publish',
                        'post_type'     => 'product',
                    );

                    // Insert the product into the database
                    $auction_bidding_product_id = wp_insert_post($auction_bidding_my_post);

                    if (is_wp_error($auction_bidding_product_id)) {
                        error_log('Error creating product: ' . $auction_bidding_product_id->get_error_message());
                        continue; // Skip to the next product if creation fails
                    }

                    // Set product type to auction
                    wp_set_object_terms($auction_bidding_product_id, 'auction', 'product_type');

                    // Assign the product category to the product
                    wp_set_object_terms($auction_bidding_product_id, array((int)$auction_bidding_term['term_id']), 'product_cat');

                    // Set product price
                    update_post_meta($auction_bidding_product_id, 'woo_ua_auction_end_date','2026-05-10');
                    update_post_meta($auction_bidding_product_id, 'woo_ua_opening_price','100');

                    // Handle the featured image
                    $auction_bidding_image_url = get_template_directory_uri() . '/assets/images/post' . ($auction_bidding_i + 1) . '.png';
                    $auction_bidding_image_id = media_sideload_image($auction_bidding_image_url, $auction_bidding_product_id, null, 'id');

                    if (is_wp_error($auction_bidding_image_id)) {
                        error_log('Error downloading image: ' . $auction_bidding_image_id->get_error_message());
                        continue; // Skip to the next product if image download fails
                    }

                    // Assign featured image to product
                    set_post_thumbnail($auction_bidding_product_id, $auction_bidding_image_id);

                }

            }
                    echo "<script>window.location.href='" . admin_url('themes.php?page=auction_bidding_guide') . "';</script>";
                    //Copyright Text
                    set_theme_mod( 'auction_bidding_footer_text', 'By VWThemes' );
        }
    ?>

    <form action="<?php echo esc_url(home_url()); ?>/wp-admin/themes.php?page=auction_bidding_guide" method="POST" onsubmit="return validate(this);">
        <?php if (!get_option('auction_bidding_demo_import_completed')) : ?>
            <form method="post">   
            <p class="run-import-text"><?php esc_html_e('Click On The Below Run Importer Button To Import Demo Content Of Auction Bidding', 'auction-bidding'); ?></p>
                <p><?php esc_html_e('Please back up your website if it’s already live with data. This importer will overwrite your existing settings with the new customizer values for Auction Bidding', 'auction-bidding'); ?></p>
                <input class="run-import" type="submit" name="submit" value="<?php esc_attr_e('Run Importer', 'auction-bidding'); ?>" class="button button-primary button-large">
        </form>
        <?php endif; ?>
        <div id="spinner" style="display:none;">
            
            <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/images/spinner.png" alt="" />
        </div>
    </form>
    <script type="text/javascript">
        function validate(form) {
            if (confirm("Do you really want to import the theme demo content?")) {
                // Show the spinner
                document.getElementById('spinner').style.display = 'block';
                // Allow the form to be submitted
                return true;
            } else {
                return false;
            }
        }
    </script>

</div>
