<?php
/**
 *  Dashboard Widget Template
 *
 *  Dashboard Big Counter widget template
 *
 *  @since 2.4
 *
 *  @author weDevs <info@wedevs.com>
 *
 *  @package dokan
 */
?>
<div class="dashboard-widget big-counter">
    <ul class="list-inline">
         <li>
            <div class="gc-myacc-total">
              <div class="right-ar">
                <i class="fa fa-dollar-sign"></i>
              </div>
              <div class="left-ar text-center">
                <span class="gc-left-title"><?php esc_html_e( 'Sales', 'dokan-lite' ); ?></span>
                <span class="gc-left-desc"><?php echo wc_price( $earning ); ?></span>
              </div>
            </div>
        </li>
        <li>
            <div class="gc-myacc-total">
              <div class="right-ar">
                <i class="fas fa-file-invoice-dollar"></i>
              </div>
              <div class="left-ar text-center">
                <span class="gc-left-title"><?php esc_html_e( 'Earning', 'dokan-lite' ); ?></span>
                <span class="gc-left-desc"><?php echo dokan_get_seller_earnings( dokan_get_current_user_id() ); ?></span>
              </div>
            </div>
        </li>
        <li>
            <div class="gc-myacc-total">
              <div class="right-ar">
                <i class="far fa-eye"></i>
              </div>
              <div class="left-ar text-center">
                <span class="gc-left-title"><?php esc_html_e( 'Pageview', 'dokan-lite' ); ?></span>
                <span class="gc-left-desc"><?php echo dokan_number_format( esc_attr( $pageviews ) ); ?></span>
              </div>
            </div>
        </li>
        <li>
            <div class="gc-myacc-total">
              <div class="right-ar">
                <i class="fas fa-cart-arrow-down"></i>
              </div>
              <div class="left-ar text-center">
                <span class="gc-left-title"><?php esc_html_e( 'Order', 'dokan-lite' ); ?></span>
                <span class="gc-left-desc"><?php
                $status = dokan_withdraw_get_active_order_status();
                $total = 0;
                foreach ( $status as $order_status ){
                    $total += $orders_count->$order_status;
                }
                echo esc_html( number_format_i18n( $total, 0 ) );
                ?></span>
              </div>
            </div>
        </li>

        <?php do_action( 'dokan_seller_dashboard_widget_counter' ); ?>
    </ul>
</div> <!-- .big-counter -->
