<?php

use Bookingor\Backend\Controller\Dashboard\DashboardControl;

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
} ?>

<div class="wrap bookingor">
    <div>
        <h2><?php esc_html_e('Dashboard', 'bookingor'); ?></h2>
    </div>
    <div class="main">
        <div class="bookingor-g-0">
            <div class="main-top">

                <div class="row justify-content-between top-reverse bookingor-g-0">
                    <div>
                        <div>
                            <div>
                                <div>
                                    <div class="bookingor-container bookingor-d-none">
                                        <div class="row ">
                                            <div class="bookingor-col-xxl-3 bookingor-col-md-4 bookingor-col-sm-12 bookingor-col-12">
                                                <div class="card">
                                                    <div class="bookingor-ecwg bookingor-ecwg6">
                                                        <div class="card-inner">
                                                            <div class="card-title-group">
                                                                <div class="card-title">
                                                                    <h6 class="title"><?php esc_html_e('Total Bookings', 'bookingor'); ?></h6>
                                                                </div>
                                                            </div>
                                                            <div class="data">
                                                                <div class="bookingor-d-flex">
                                                                    <div class="bookingor-dashbaord-amount"><?php echo esc_html(DashboardControl::bookingor_total_booking()); ?></div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="bookingor-col-xxl-3 bookingor-col-md-4 bookingor-col-sm-12 bookingor-col-12">
                                                <div class="card">
                                                    <div class="bookingor-ecwg bookingor-ecwg6">
                                                        <div class="card-inner">
                                                            <div class="card-title-group">
                                                                <div class="card-title">
                                                                    <h6 class="title"><?php esc_html_e('Revenue', 'bookingor'); ?></h6>
                                                                </div>
                                                            </div>
                                                            <div class="data">
                                                                <div class="bookingor-d-flex">
                                                                    <div class="bookingor-dashbaord-amount">
                                                                        <div class="<?php echo esc_attr(get_option('bookingor_currency_position_change  ')); ?> bookingor-flex">
                                                                            <div class="<?php echo esc_attr(get_option('bookingor_currency_position_change  ')); ?>"><?php echo esc_html(get_option('bookingor_settings_currency_symbol')); ?></div>
                                                                            <div><?php echo esc_html(DashboardControl::bookingor_total_revenue()); ?></div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="bookingor-col-xxl-3 bookingor-col-md-4 bookingor-col-sm-12 bookingor-col-12">
                                                <div class="card">
                                                    <div class="bookingor-ecwg bookingor-ecwg6">
                                                        <div class="card-inner">
                                                            <div class="card-title-group">
                                                                <div class="card-title">
                                                                    <h6 class="title"><?php esc_html_e('Customers', 'bookingor'); ?></h6>
                                                                </div>
                                                            </div>
                                                            <div class="data">
                                                                <div class="bookingor-d-flex">
                                                                    <div class="bookingor-dashbaord-amount"><?php echo esc_html(DashboardControl::bookingor_total_customer()); ?></div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="bookingor-col-xxl-3 bookingor-col-md-12 bookingor-col-sm-12 bookingor-col-12">
                                                <div class="card">
                                                    <div class="bookingor-ecwg bookingor-ecwg6">
                                                        <div class="card-inner">
                                                            <div class="card-title-group">
                                                                <div class="card-title">
                                                                    <h6 class="title"><?php esc_html_e('Approved Appointment', 'bookingor'); ?></h6>
                                                                </div>
                                                            </div>
                                                            <div class="data">
                                                                <div class="bookingor-d-flex">
                                                                    <div class="bookingor-dashbaord-amount"><?php echo esc_html(DashboardControl::bookingor_total_approved_appointment()); ?></div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row g-gs ">
                                            <div class="bookingor-col-xxl-12">
                                                <div class="bookingor-chart-card card-full">
                                                    <div class="bookingor-ecwg bookingor-ecwg8 h-100">
                                                        <div class="card-inner">
                                                            <div class="card-title-group mb-3">
                                                                <div class="card-title">
                                                                    <h6 class="title"><?php esc_html_e('Revenue Statistics', 'bookingor'); ?></h6>
                                                                </div>
                                                                <div class="card-tools">
                                                                </div>
                                                            </div>
                                                            <div class="bookingor-ecwg8-ck">
                                                                <canvas class="ecommerce-line-chart-s4" id="bookingor-chart"></canvas>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>