<?php
/**
 * Wizard Step 6: Import Process
 */
if (!defined('ABSPATH')) exit;
?> 

<div class="trstemp-import-step">
    <div class="import-container">
        
        <div class="trstemp-import-header-progress">
            <div class="import-progress-container">
                <div class="progress-circle" id="progress-circle">
                    <svg width="120" height="120">
                        <circle cx="60" cy="60" r="50" stroke="#e5e5e5" stroke-width="8" fill="none"/>
                        <circle cx="60" cy="60" r="50" stroke="#667eea" stroke-width="8" fill="none" 
                                stroke-dasharray="314" stroke-dashoffset="314" id="progress-bar"/>
                    </svg>
                <div class="progress-text" id="progress-text">0%</div>
            </div>
            <div class="import-header">
                <h2 id="import-title"><?php echo esc_html__('Building Your Website...', 'turbo-templates-library-for-elementor'); ?></h2>
                <p id="import-subtitle"><?php echo esc_html__('Please wait while we set up your professional website', 'turbo-templates-library-for-elementor'); ?></p>
            </div>
        </div>

        </div>
        
        <div class="import-status">
            <div class="status-item active" id="status-plugins">
                <div class="status-icon">🔧</div>
                <div class="status-content">
                    <h4><?php echo esc_html__('Checking Required Plugin Status', 'turbo-templates-library-for-elementor'); ?></h4>
                    <p><?php echo esc_html__('Elementor, Turbo Addons, and essential plugins', 'turbo-templates-library-for-elementor'); ?></p>
                </div>
            </div>
            
            <div class="status-item" id="status-template">
                <div class="status-icon">📥</div>
                <div class="status-content">
                    <h4><?php echo esc_html__('Downloading Template', 'turbo-templates-library-for-elementor'); ?></h4>
                    <p><?php echo esc_html__('Fetching professional template from our servers', 'turbo-templates-library-for-elementor'); ?></p>
                </div>
            </div>
            
            <div class="status-item" id="status-content">
                <div class="status-icon">📄</div>
                <div class="status-content">
                    <h4 id="content-title"><?php echo esc_html__('Creating Pages & Content', 'turbo-templates-library-for-elementor'); ?></h4>
                    <p id="content-description"><?php echo esc_html__('Setting up your selected template', 'turbo-templates-library-for-elementor'); ?></p>
                </div>
            </div>
            
            <div class="status-item" id="status-customization">
                <div class="status-icon">🎨</div>
                <div class="status-content">
                    <h4><?php echo esc_html__('Applying Your Customization', 'turbo-templates-library-for-elementor'); ?></h4>
                    <p><?php echo esc_html__('Colors, fonts, logo, and branding settings', 'turbo-templates-library-for-elementor'); ?></p>
                </div>
            </div>
            
            <div class="status-item" id="status-finalize">
                <div class="status-icon">🚀</div>
                <div class="status-content">
                    <h4><?php echo esc_html__('Finalizing Your Website', 'turbo-templates-library-for-elementor'); ?></h4>
                    <p><?php echo esc_html__('Optimizing performance and completing setup', 'turbo-templates-library-for-elementor'); ?></p>
                </div>
            </div>
        </div>
        
        <div class="import-tips">
            <div class="tip-content" id="tip-content">
            </div>
        </div>
        
        <div class="import-success" id="import-success" style="display: none;">
            <div class="success-animation">🎉</div>
            <h2><?php echo esc_html__('Congratulations! Your Website is Ready!', 'turbo-templates-library-for-elementor'); ?></h2>
            <p><?php echo esc_html__('Your professional website has been successfully created and is ready to go live.', 'turbo-templates-library-for-elementor'); ?></p>
            
            <div class="success-actions">
                <a href="<?php echo esc_url(home_url()); ?>" class="btn btn-primary" target="_blank">
                    <?php echo esc_html__('👁️ View Website', 'turbo-templates-library-for-elementor'); ?>
                </a>
                <a href="<?php echo esc_url(admin_url('post.php?post=' . absint(get_option('page_on_front')) . '&action=elementor')); ?>" class="btn btn-secondary">
                    <?php echo esc_html__('✏️ Edit with Elementor', 'turbo-templates-library-for-elementor'); ?>
                </a>
                <a href="<?php echo esc_url(admin_url('customize.php')); ?>" class="btn btn-secondary">
                    <?php echo esc_html__('🎨 Customize Theme', 'turbo-templates-library-for-elementor'); ?>
                </a>
                <a href="<?php echo esc_url(admin_url()); ?>" class="btn btn-secondary">
                    <?php echo esc_html__('← Back Dashboard', 'turbo-templates-library-for-elementor'); ?>
                </a>
            </div>
            
            <div class="next-steps">
                <h3>What's Next?</h3>
                <div class="next-steps-grid">
                    <div class="next-step">
                        <h4>📝 Add Your Content</h4>
                        <p>Replace demo content with your own text, images, and information</p>
                    </div>
                    <div class="next-step">
                        <h4>🎨 Customize Design</h4>
                        <p>Adjust colors, fonts, and layout to match your brand</p>
                    </div>
                    <div class="next-step">
                        <h4>🚀 Go Live</h4>
                        <p>Publish your website and share it with the world</p>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="import-error" id="import-error" style="display: none;">
            <div class="error-icon">❌</div>
            <h2>Import Failed</h2>
            <p id="error-message">Something went wrong during the import process.</p>
            <div class="error-actions">
                <button class="btn btn-primary" onclick="trstemp_retryImport()">Try Again</button>
                <button class="btn btn-secondary" onclick="trstemp_skipImport()">Skip & Continue</button>
                <button class="btn btn-secondary" onclick="trstemp_testImport()">Test Import</button>
                <button class="btn btn-secondary" onclick="trstemp_checkHomepage()">Check Homepage</button>
                <button class="btn btn-secondary" onclick="trstemp_fixHomepage()">Fix Homepage</button>
                <a href="<?php echo esc_url(home_url()); ?>" class="btn btn-secondary" target="_blank">View Site</a>
            </div>
        </div>
    </div>
</div>

