<?php

/**
 * Plugin Dashboard.
 *
 * @link    https://aiopodcasting.com
 * @since   1.0.0
 *
 * @package AiO_Podcast_Studio
 */

// Exit if accessed directly
if ( ! defined( 'WPINC' ) ) {
	die;
}
?>
<div id="aiopod-dashboard" class="aiopod aiopod-dashboard">
    <div class="aiopod-container">
        <div class="wrap about-wrap">
            <h1><?php esc_html_e( 'AiO Podcast Studio', 'aio-podcast-studio' ); ?></h1>
            
            <p class="about-text">
                <?php esc_html_e( 'AiO Podcast Studio makes it easy to create, manage, and publish podcasts in WordPress. Import via RSS or add manually, organize content with categories, tags, and participants, and distribute to platforms like Apple and Spotify — all from a streamlined, creator-focused interface.', 'aio-podcast-studio' ); ?>
            </p>
                
            <div class="wp-badge">
                <?php printf( esc_html__( 'Version %s', 'aio-podcast-studio' ), AIOPOD_PLUGIN_VERSION ); ?>
            </div>
            
            <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
                <?php wp_nonce_field( 'aiopod_import_categories', 'aiopod_import_categories_nonce' ); // Nonce ?>
                <input type="hidden" name="action" value="aiopod_import_categories">
                <button class="button button-hero" onclick="return confirm('<?php esc_attr_e( 'This will add missing standard podcast categories. Continue?', 'aio-podcast-studio' ); ?>');">
                    <?php 
                    if ( 'yes' === get_option( 'aiopod_imported_categories' ) ) {
                        esc_html_e( 'Sync Standard Podcast Categories', 'aio-podcast-studio' ); 
                    } else {
                        esc_html_e( 'Import Standard Podcast Categories', 'aio-podcast-studio' ); 
                    } 
                    ?>
                </button>
                <p class="aiopod-text-small aiopod-text-muted">
                    <em><?php echo wp_kses( __( '<strong>Optional:</strong> Imports a standard set of podcast categories commonly used across podcast platforms. This is recommended as the first step if you plan to use standard podcast categories. Once completed, you can proceed with the forms below to create or import your podcasts.', 'aio-podcast-studio' ), array( 'strong' => array() ) ); ?></em>
                </p>
            </form>

            <hr /> 
        </div> 
    </div>
    
    <?php require_once AIOPOD_PLUGIN_DIR . 'admin/partials/podcasts/podcast-new.php'; ?>  
</div>