<?php if (!defined('ABSPATH')) exit; ?>

<div class="h-100 w-100 pt-4 d-flex gap-4">
    <div class="container">
        <div class="row g-2">
            <div class="col-lg-8 g-2 d-flex flex-column">
                <div class="row g-2 align-items-start">                   
                    <div class="col-lg-6 bg-white rounded ass-shadow ass-dashboard-card p-3 position-relative">
                        <div class="d-flex flex-column justify-content-center align-items-start mb-4">
                            <!-- <i class="bi bi-file-earmark-text fs-5"></i> -->
                            <h5 class="fw-bold mb-0"><?php esc_html_e('AI Writing Toolkit', 'assistini') ?></h5>
                            <span class="ass-size-14"><?php esc_html_e('Create better Content with Assistini', 'assistini') ?></span>
                        </div>
                        <div class="ass-dashboard-newest-template-loader placeholder-wave flex-column gap-2" style="display:none;">
                            <div class="placeholder card ass-max-w-none p-0 m-0 pb-3">
                                <div class="card-body py-0">
                                    <div class="d-flex justify-content-between align-items-center">
                                        <p class="card-title lh-1 mb-0 fw-bolder fs-6">Placeholder</p>
                                        <button class="btn ass-transparent-border">
                                            <i class="bi bi-three-dots-vertical fs-4"></i>
                                        </button>
                                    </div>
                                    <p class="card-text">Placeholder</p>
                                </div>
                            </div>
                            <div class="placeholder card ass-max-w-none p-0 m-0 pb-3">
                                <div class="card-body py-0">
                                    <div class="d-flex justify-content-between align-items-center">
                                        <p class="card-title lh-1 mb-0 fw-bolder fs-6">Placeholder</p>
                                        <button class="btn ass-transparent-border">
                                            <i class="bi bi-three-dots-vertical fs-4"></i>
                                        </button>
                                    </div>
                                    <p class="card-text">Placeholder</p>
                                </div>
                            </div>
                            <div class="placeholder card ass-max-w-none p-0 m-0 pb-3">
                                <div class="card-body py-0">
                                    <div class="d-flex justify-content-between align-items-center">
                                        <p class="card-title lh-1 mb-0 fw-bolder fs-6">Placeholder</p>
                                        <button class="btn ass-transparent-border">
                                            <i class="bi bi-three-dots-vertical fs-4"></i>
                                        </button>
                                    </div>
                                    <p class="card-text">Placeholder</p>
                                </div>
                            </div>
                        </div>
                        <!-- <div class="ass-dashboard-newest-template d-flex flex-column gap-2" style="display: none;">
                        </div> -->
                        <div class="ass-dashboard-newest-template d-flex flex-column gap-2">
                            <div class="card ass-max-w-none m-0 w-100 h-100 px-3">
                                <div class="d-flex justify-content-between gap-3">
                                    <div>
                                        <div class="d-flex flex-column">
                                            <span class="fw-bold text-primary ass-size-16"><?php echo esc_html(ASSI_Tools::getSystemTemplateTranslation(1)['header']) ?></span>
                                            <span class="ass-size-14"><?php echo esc_html(ASSI_Tools::getSystemTemplateTranslation(1)['info']) ?></span>
                                            <div class="mt-2">
                                                <div class="ass-template-badge badge bg-secondary"><?php esc_html_e('by Assistini', 'assistini'); ?></div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="d-flex align-items-center justify-content-center">
                                        <a href="#/chat?sys_template_id=1" class="btn btn-sm btn-outline-secondary ass-w-max-content"><?php esc_html_e('+ Create Content', 'assistini'); ?></a>
                                    </div>
                                </div>
                            </div>
                            <div class="card ass-max-w-none m-0 w-100 h-100 px-3">
                                <div class="d-flex justify-content-between gap-3">
                                    <div>
                                        <div class="d-flex flex-column">
                                            <span class="fw-bold text-primary ass-size-16"><?php echo esc_html(ASSI_Tools::getSystemTemplateTranslation(2)['header']) ?></span>
                                            <span class="ass-size-14"><?php echo esc_html(ASSI_Tools::getSystemTemplateTranslation(2)['info']) ?></span>
                                            <div class="mt-2">
                                                <div class="ass-template-badge badge bg-secondary"><?php esc_html_e('by Assistini', 'assistini'); ?></div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="d-flex align-items-center justify-content-center">
                                        <a href="#/chat?sys_template_id=2" class="btn btn-sm btn-outline-secondary ass-w-max-content"><?php esc_html_e('+ Create Content', 'assistini'); ?></a>
                                    </div>
                                </div>
                            </div>
                            <div class="card ass-max-w-none m-0 w-100 h-100 px-3">
                                <div class="d-flex justify-content-between gap-3">
                                    <div>
                                        <div class="d-flex flex-column">
                                            <span class="fw-bold text-primary ass-size-16"><?php esc_html_e('Custom Prompts', 'assistini'); ?></span>
                                            <span class="ass-size-14"><?php esc_html_e('Enter your own prompts and let the AI generate exactly what you need.', 'assistini'); ?></span>
                                        </div>
                                    </div>
                                    <div class="d-flex align-items-center justify-content-center">
                                        <a href="#/chat?do=click_create_content" class="btn btn-sm btn-outline-secondary ass-w-max-content"><?php esc_html_e('+ Create Content', 'assistini'); ?></a>
                                    </div>
                                </div>
                            </div>
                            <div class="card ass-max-w-none m-0 w-100 h-100 px-3">
                                <div class="d-flex justify-content-between gap-3">
                                    <div>
                                        <div class="d-flex flex-column">
                                            <span class="fw-bold text-primary ass-size-16"><?php esc_html_e('Templates', 'assistini'); ?></span>
                                            <span class="ass-size-14"><?php esc_html_e('Choose from ready-to-use system templates or customize your own templates for text length, style, and structure, ensuring consistent results.', 'assistini'); ?></span>
                                        </div>
                                    </div>
                                    <div class="d-flex align-items-center justify-content-center">
                                        <a href="#/template" class="btn btn-sm btn-outline-secondary ass-w-max-content"><?php esc_html_e('Go to Templates', 'assistini'); ?></a>
                                    </div>
                                </div>
                            </div>
                            <div class="card ass-max-w-none m-0 w-100 h-100 px-3">
                                <div class="d-flex justify-content-between gap-3">
                                    <div>
                                        <div class="d-flex flex-column">
                                            <span class="fw-bold text-primary ass-size-16"><?php esc_html_e('AI Editor Assistant', 'assistini'); ?></span>
                                            <span class="ass-size-14"><?php esc_html_e('Create, edit, and optimize your blog posts directly in the WP editor - with AI-powered tools for text quality, structure, SEO, and keywords.', 'assistini'); ?></span>
                                        </div>
                                    </div>
                                    <div class="d-flex align-items-center justify-content-center">
                                        <a href="#" class="btn btn-sm btn-outline-secondary ass-w-max-content ass-ai-editor-selection"><?php esc_html_e('Go to Editor', 'assistini'); ?></a>
                                    </div>
                                </div>
                            </div>
                            <div class="card ass-max-w-none m-0 w-100 h-100 px-3">
                                <div class="d-flex justify-content-between gap-3">
                                    <div>
                                        <div class="d-flex flex-column">
                                            <span class="fw-bold text-primary ass-size-16"><?php esc_html_e('Image Editor', 'assistini'); ?></span>
                                            <span class="ass-size-14"><?php esc_html_e('Generate custom visuals with AI—define your own design ideas or let Assistini automatically create images that perfectly match your content.', 'assistini'); ?></span>
                                        </div>
                                    </div>
                                    <div class="d-flex align-items-center justify-content-center">
                                        <a href="#" class="btn btn-sm btn-outline-secondary ass-w-max-content ass-ai-editor-selection"><?php esc_html_e('+ Create Images', 'assistini'); ?></a>
                                    </div>
                                </div>
                            </div>
                            <div class="card ass-max-w-none m-0 w-100 h-100 px-3">
                                <div class="d-flex justify-content-between gap-3">
                                    <div>
                                        <div class="d-flex flex-column">
                                            <span class="fw-bold text-primary ass-size-16"><?php esc_html_e('Custom AI Integrations', 'assistini'); ?></span>
                                            <span class="ass-size-14"><?php esc_html_e('Connect your own OpenAI API key to power content in Assistini. Choose from the AI model.', 'assistini'); ?>
                                                <br><span class="text-secondary fw-bold"><?php esc_html_e('Coming soon', 'assistini'); ?></span>: <?php esc_html_e('More AI models like Gemini, Anthropic, Grok, LLaMA and Le Chat.', 'assistini'); ?></span>
                                        </div>
                                    </div>
                                    <div class="d-flex align-items-center justify-content-center">
                                        <a href="#/settings" class="btn btn-sm btn-outline-secondary ass-w-max-content"><?php esc_html_e('+ Connect APIs', 'assistini'); ?></a>
                                    </div>
                                </div>
                            </div>
                            <div class="card ass-max-w-none m-0 w-100 h-100 px-3">
                                <div class="d-flex justify-content-between gap-3">
                                    <div>
                                        <div class="d-flex flex-column">
                                            <span class="fw-bold text-primary ass-size-16"><?php esc_html_e('Workflow Manager', 'assistini'); ?></span>
                                            <span class="ass-size-14"><span class="text-secondary fw-bold"><?php esc_html_e('Coming soon', 'assistini'); ?>: </span><?php esc_html_e('Automate your entire content pipeline—from idea generation and drafting to scheduled publishing and optimized social media sharing. Let Assistini manage each step so you can focus on creation.', 'assistini'); ?></span>
                                        </div>
                                    </div>
                                    <div class="d-flex align-items-center justify-content-center">
                                        <a href="" class="btn btn-sm btn-outline-secondary ass-w-max-content disabled"><?php esc_html_e('+ Set up Workflow', 'assistini'); ?></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="col-lg-4 d-flex flex-column flex-grow-0">
                <div class="ass-dashboard-activity row g-2">
                    <div class="bg-white rounded ass-shadow p-3 pb-5 ass-dashboard-card position-relative">
                        <div class="d-flex flex-column justify-content-center align-items-start mb-4">
                            <!-- <i class="bi bi-file-earmark-text fs-5"></i> -->
                            <h5 class="fw-bold mb-0"><?php esc_html_e('Activity', 'assistini') ?></h5>
                            <span class="ass-size-14"><?php esc_html_e('Your latest content creations', 'assistini') ?></span>
                        </div>
                        <div class="ass-dashboard-last-chat-loader placeholder-wave w-100 flex-column gap-2">
                            <div class="card p-0 m-0 placeholder">
                                <div class="card-body my-3">
                                    <p class="text-truncate text-start mb-0 fw-bolder">Placeholder</p>
                                    <p class="text-start text-muted small mb-0">Placeholder</p>
                                </div>
                            </div>
                            <div class="card p-0 m-0 placeholder">
                                <div class="card-body my-3">
                                    <p class="text-truncate text-start mb-0 fw-bolder">Placeholder</p>
                                    <p class="text-start text-muted small mb-0">Placeholder</p>
                                </div>
                            </div>
                            <div class="card p-0 m-0 placeholder">
                                <div class="card-body my-3">
                                    <p class="text-truncate text-start mb-0 fw-bolder">Placeholder</p>
                                    <p class="text-start text-muted small mb-0">Placeholder</p>
                                </div>
                            </div>
                        </div>
                        <div class="ass-dashboard-last-chat w-100 d-flex flex-column gap-2" style="display:none;">

                        </div>
                        <div class="position-absolute bottom-0 start-0">
                            <a class="ass-dashboard-last-chat-create btn text-secondary text-xs ass-transparent-border" href="#/chat"><?php esc_html_e('Create Content', 'assistini'); ?></a>
                        </div>
                        <div class="position-absolute bottom-0 end-0">
                            <a class="ass-dashboard-last-chat-show-all btn text-secondary text-xs ass-transparent-border" href="#/chat"><?php esc_html_e('Show all', 'assistini'); ?></a>
                        </div>
                    </div>
                </div>
                <div class="ass-dashboard-premium row g-2">
                    <div class="d-flex flex-column justify-content-start align-items-center col-sm ass-shadow px-2 pt-4 pb-3 ass-dashboard-premium-card gap-3">
                        <!-- <img src="<?php echo esc_url(plugins_url('/assets/images/ass_dashboard_premium_badge.png', ASSI_PLUGIN_FILE)); ?>" alt="Assistini Premium Badge" class="mb-3 rounded-circle w-25 h-25"> -->
                        <!-- <h5 class="fw-bold text-center"><?php esc_html_e('Get Assistini Premium', 'assistini'); ?></h5> -->
                        <div class="d-flex align-items-start">
                            <div class="d-flex flex-column gap-1 ps-2">
                                <span class="fw-bold ass-size-13"><?php esc_html_e('You want to get even more out of Assistini?', 'assistini'); ?></span>
                                <span class="ass-size-13"><?php esc_html_e('The Smart version gives you access to professional tools and advanced features – including 25,000 words per month for your AI-generated content.', 'assistini'); ?></span>
                            </div>
                            <img src="<?php echo esc_url(plugins_url('/assets/images/ass_dashboard_premium_badge.png', ASSI_PLUGIN_FILE)); ?>" alt="Assistini Premium Badge">
                        </div>
                        <a href="https://app.assistini.com/?screen=Plan" target="_blank" rel="noopener noreferrer" type="button" class="btn btn-secondary btn-sm">
                            <?php esc_html_e('Upgrade now', 'assistini'); ?>
                        </a>
                    </div>
                </div>
                <div class="ass-dashboard-review row g-2">
                    <div class="col-lg d-flex flex-column align-items-center bg-white rounded ass-shadow py-2 px-4 gap-2 ass-dashboard-card">
                        <div class="d-flex justify-content-center align-items-center gap-2 mt-2">
                            <h5 class="fw-bold mb-0"><?php esc_html_e('Enjoying Assistini-AI?', 'assistini'); ?></h5>
                        </div>
                        <p class="mb-2"><?php esc_html_e('Your review means the world to us!', 'assistini'); ?></p>
                        <div class="d-flex gap-2 justify-content-center mb-3">
                            <i class="bi bi-star-fill text-primary ass-size-25"></i>
                            <i class="bi bi-star-fill text-primary ass-size-25"></i>
                            <i class="bi bi-star-fill text-primary ass-size-25"></i>
                            <i class="bi bi-star-fill text-primary ass-size-25"></i>
                            <i class="bi bi-star-fill text-primary ass-size-25"></i>
                        </div>
                        <div class="d-flex mb-2">
                            <a class="btn btn-sm btn-secondary" href="https://wordpress.org/support/plugin/assistini/reviews/" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Leave a Review', 'assistini'); ?></a>
                        </div>
                    </div>
                </div>
                <div class="ass-dashboard-tools row g-2">
                    <div class="col-lg d-flex flex-column gap-3 bg-white rounded ass-shadow h-100 py-2 px-4 ass-dashboard-card">
                        <div class="d-flex justify-content-center align-items-center gap-2 mt-2 mb-2">
                            <i class="bi bi-wrench-adjustable fs-5"></i>
                            <h5 class="fw-bold mb-0"><?php esc_html_e('Other useful tools', 'assistini'); ?></h5>
                        </div>
                        <a href="https://www.blog2social.com/" target="_blank" rel="noopener noreferrer" class="btn d-flex align-items-center gap-2 p-2 ass-dashboard-tools-item ass-dashboard-b2s-tool text-start">
                            <img src="<?php echo esc_url(plugins_url('/assets/images/b2s/ass_b2s_logo_64.png', ASSI_PLUGIN_FILE)); ?>" alt="Blog2Social Logo">
                            <div class="d-flex flex-column gap-1">
                                <h6 class="fw-bold mb-0">Blog2Social</h6>
                                <p class="mb-0 lh-1">
                                    <?php esc_html_e('Publish your content to 20+ social media platforms with one click.', 'assistini'); ?>
                                </p>
                            </div>
                        </a>
                        <a href="https://www.pr-gateway.de/" target="_blank" rel="noopener noreferrer" class="btn d-flex align-items-center gap-2 p-2 ass-dashboard-tools-item ass-dashboard-prg-tool text-start">
                            <img src="<?php echo esc_url(plugins_url('/assets/images/prg/ass_prg_logo_64.png', ASSI_PLUGIN_FILE)); ?>" id="pr-gateway-logo" alt="PR-Gateway Logo">
                            <div class="d-flex flex-column gap-1">
                                <h6 class="fw-bold mb-0">PR-Gateway</h6>
                                <p class="mb-0 lh-1">
                                    <?php esc_html_e('Publish your press releases on 250+ media outlets.', 'assistini'); ?>                            
                                </p>
                            </div>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>