<?php

/**
 * Admin View: General Information page.
 *
 * @package MediaTasker
 *
 * @var array $mediat_stats Dashboard statistics passed from Mediat_Admin::render_general_info().
 */
// Prevent direct file access.
if ( !defined( 'ABSPATH' ) ) {
    exit;
}
?>

<div class="wrap mediat_admin-wrap">
    <h1>
        <?php 
esc_html_e( 'MediaTasker', 'mediatasker' );
?>
    </h1>

    <?php 
/* ================================================================
   1. Quick Start — Shortcode Box
   ================================================================ */
?>
    <div class="mediat_shortcode-box">
        <h2>
            <?php 
esc_html_e( 'Quick Start', 'mediatasker' );
?>
        </h2>
        <p>
            <?php 
esc_html_e( 'Embed the MediaTasker gallery anywhere on your site using the shortcode below:', 'mediatasker' );
?>
        </p>
        <div class="mediat_shortcode-row">
            <code class="mediat_shortcode-code">[mediat_gallery]</code>
            <button type="button" class="button button-primary mediat_copy-shortcode" data-shortcode="[mediat_gallery]">
                <?php 
esc_html_e( 'Copy Shortcode', 'mediatasker' );
?>
            </button>
        </div>
    </div>

    <?php 
/* ================================================================
   2. About & Features Grid
   ================================================================ */
?>
    <h2>
        <?php 
esc_html_e( 'Features', 'mediatasker' );
?>
    </h2>
    <p>
        <?php 
esc_html_e( 'MediaTasker is a media & task management hub for teams and clients.', 'mediatasker' );
?>
    </p>

    <div class="mediat_feature-grid">
        <div class="mediat_feature-card">
            <span class="dashicons dashicons-clipboard"></span>
            <h3>
                <?php 
esc_html_e( 'Task Management', 'mediatasker' );
?>
            </h3>
            <p>
                <?php 
esc_html_e( 'Organize work with custom statuses — Pending, In Progress, Completed, Approved, and Rejected — so every item has a clear lifecycle.', 'mediatasker' );
?>
            </p>
        </div>
        <div class="mediat_feature-card">
            <span class="dashicons dashicons-groups"></span>
            <h3>
                <?php 
esc_html_e( 'Team Collaboration', 'mediatasker' );
?>
            </h3>
            <p>
                <?php 
esc_html_e( 'Comment directly on tasks, get notifications, and keep all feedback in one place — no more email chains.', 'mediatasker' );
?>
            </p>
        </div>
        <div class="mediat_feature-card">
            <span class="dashicons dashicons-media-document"></span>
            <h3>
                <?php 
esc_html_e( 'File Management', 'mediatasker' );
?>
            </h3>
            <p>
                <?php 
esc_html_e( 'Upload originals and edited versions with drag-and-drop, track revisions, and keep your media library organised.', 'mediatasker' );
?>
            </p>
        </div>
    </div>

    <?php 
/* ================================================================
   3. Usage Statistics
   ================================================================ */
?>
    <h2>
        <?php 
esc_html_e( 'Usage Statistics', 'mediatasker' );
?>
    </h2>

    <div class="mediat_stats-grid">
        <div class="mediat_stat-card">
            <span class="mediat_stat-number">
                <?php 
echo esc_html( $mediat_stats['original_images'] );
?>
            </span>
            <span class="mediat_stat-label">
                <?php 
esc_html_e( 'Original Images', 'mediatasker' );
?>
            </span>
        </div>
        <div class="mediat_stat-card">
            <span class="mediat_stat-number">
                <?php 
echo esc_html( $mediat_stats['edited_images'] );
?>
            </span>
            <span class="mediat_stat-label">
                <?php 
esc_html_e( 'Edited Images', 'mediatasker' );
?>
            </span>
        </div>
        <div class="mediat_stat-card">
            <span class="mediat_stat-number">
                <?php 
echo esc_html( $mediat_stats['total_comments'] );
?>
            </span>
            <span class="mediat_stat-label">
                <?php 
esc_html_e( 'Total Comments', 'mediatasker' );
?>
            </span>
        </div>
    </div>

    <?php 
/* ================================================================
   4. Getting Started Steps
   ================================================================ */
?>
    <div class="mediat_getting-started">
        <h2>
            <?php 
esc_html_e( 'Getting Started', 'mediatasker' );
?>
        </h2>
        <ol>
            <li>
                <?php 
esc_html_e( 'Add the [mediat_gallery] shortcode to any page or post.', 'mediatasker' );
?>
            </li>
            <li>
                <?php 
esc_html_e( 'Configure your preferences under MediaTasker → Settings.', 'mediatasker' );
?>
            </li>
            <li>
                <?php 
esc_html_e( 'Set up team access by assigning WordPress user roles.', 'mediatasker' );
?>
            </li>
            <li>
                <?php 
esc_html_e( 'Invite collaborators to upload their first image!', 'mediatasker' );
?>
            </li>
        </ol>
    </div>

    <?php 
?>

</div>
