<?php
/**
 * Provide a admin area view for the plugin
 *
 * This file is used to markup the admin-facing aspects of the plugin.
 *
 * @link       https://yourwebsite.com
 * @since      1.0.0
 *
 * @package    Subscription_System
 * @subpackage Subscription_System/admin/partials
 */

// If this file is called directly, abort.
if (!defined('WPINC')) {
    die;
}
?>

<div class="subscription-system-admin-page">
    <div class="wrap">
        <h1 class="wp-heading-inline"><?php echo esc_html__('Subscription Dashboard', 'subscription-system'); ?></h1>
        <hr class="wp-header-end">
        
        <div class="card">
            <h2><?php echo esc_html__('Overview', 'subscription-system'); ?></h2>
            <p><?php echo esc_html__('This is where you can see the overall status of your subscription system.', 'subscription-system'); ?></p>
        </div>
        
        <div class="card">
            <h2><?php echo esc_html__('Statistics', 'subscription-system'); ?></h2>
            
            <div class="ss-admin-dashboard">
                <div class="ss-stats-cards">
                    <div class="ss-stats-card">
                        <h3><?php esc_html_e('Total Revenue', 'subscription-system'); ?></h3>
                        <div class="ss-stats-value">$<?php echo esc_html(number_format($total_revenue, 2)); ?></div>
                    </div>
                    
                    <div class="ss-stats-card">
                        <h3><?php esc_html_e('Active Subscriptions', 'subscription-system'); ?></h3>
                        <div class="ss-stats-value"><?php echo esc_html($active_subscriptions); ?></div>
                    </div>
                    
                    <div class="ss-stats-card">
                        <h3><?php esc_html_e('Paused Subscriptions', 'subscription-system'); ?></h3>
                        <div class="ss-stats-value"><?php echo esc_html($paused_subscriptions); ?></div>
                    </div>
                </div>
                
                <div style="width: 300px; height: 300px; margin: 20px auto;">
                    <canvas id="subscription-status-chart"></canvas>
                </div>
            </div>
        </div>
        
        <div class="card">
            <h2><?php echo esc_html__('Quick Actions', 'subscription-system'); ?></h2>
            <p><?php echo esc_html__('Use the buttons below to quickly manage your subscription system.', 'subscription-system'); ?></p>
            
            <div class="subscription-actions">
                <a href="<?php echo esc_url(admin_url('post-new.php?post_type=subscription')); ?>" class="button button-primary">
                    <?php echo esc_html__('Add New Subscription', 'subscription-system'); ?>
                </a>
                <a href="<?php echo esc_url(admin_url('users.php')); ?>" class="button">
                    <?php echo esc_html__('View All Users', 'subscription-system'); ?>
                </a>
            </div>
        </div>
    </div>
</div> 