<?php
/**
 * Plugin settings page template.
 *
 * @package SAAI
 */

use SAAI\Classes\Admin_Menu_Handler;
use SAAI\Helpers\Connect;

if ( ! defined( 'ABSPATH' ) ) {
    die( 'You are not allowed to call this page directly.' );
}
$current_page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
?>
<div class="wrap">
    <div class="storeagent-admin-container">
        <h2 class="storeagent-admin-title">
            <?php if ( ! Connect::is_connected() ) : ?>
                <?php esc_html_e( 'StoreAgent AI', 'storeagent-ai-for-woocommerce' ); ?>
            <?php elseif ( Admin_Menu_Handler::SETTINGS_SLUG === $current_page ) : ?>
                <?php esc_html_e( 'StoreAgent AI Settings', 'storeagent-ai-for-woocommerce' ); ?>
            <?php elseif ( Admin_Menu_Handler::PARENT_SLUG === $current_page || Admin_Menu_Handler::LEGACY_PARENT_SLUG === $current_page ) : ?>
                <?php esc_html_e( 'Dashboard', 'storeagent-ai-for-woocommerce' ); ?>
            <?php elseif ( Admin_Menu_Handler::AGENTS_SLUG === $current_page ) : ?>
                <?php esc_html_e( 'AI Tools For Your WooCommerce Store', 'storeagent-ai-for-woocommerce' ); ?>
            <?php elseif ( Connect::is_connected() ) : ?>
                <?php esc_html_e( 'AI Tools For Your WooCommerce Store', 'storeagent-ai-for-woocommerce' ); ?>
            <?php endif; ?>
        </h2>
        
        <div class="storeagent-ai-admin-content">
            <div id="storeagent-admin-app"></div>
        </div>
    </div>
</div>
