<?php
/*
Theme Designed By: Meysam Hosseinkhani
Email: Meysam98@Gmail.com
Author Website: Hosseinkhani.ir
*/
   // Exit if accessed directly
   if ( ! defined( 'ABSPATH' ) ) exit;
global $az_data;
?>
 <?php               if (is_user_logged_in()) {
                     $user = wp_get_current_user();
                     $user_id = get_current_user_id(); }
                     $user_vendor = false;
                     if(function_exists('EDD_FES')){
                     if ( EDD_FES()->vendors->user_is_vendor( $user_id ) ){
                         $user_vendor = true;}}                     
                     if(!$user_vendor){  ?>
                    <li><a href="<?php
		echo esc_url(home_url()); ?>/dashboard/?task=profile"><span class="fas fa-user"></span><?php echo $az_data['text_uac']; ?></a></li>
                        <li><a href="<?php
		echo esc_url(home_url()); ?>/dashboard/?task=purchases"><span class="fas fa-history"></span><?php echo $az_data['text_uhi']; ?></a></li>
                        <li><a href="<?php
		echo esc_url(home_url()); ?>/dashboard/?task=download"><span class="fas fa-download"></span><?php echo $az_data['text_udl']; ?></a></li>
                       <?php if( class_exists( 'EDD_Points_Renderer' ) ) { ?>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/dashboard/?task=points"><span class="fas fa-gift"></span>امتیازها</a></li>
                    <?php } ?>
                     <?php if( class_exists( 'EDD_Software_Licensing' ) ) { ?>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/dashboard/?task=license"><span class="fas fa-key"></span>لایسنس ها</a></li>
                    <?php } ?>
                        <?php
		if (class_exists('EDD_Wallet'))
			{ ?>
                        <li><a href="<?php
echo esc_url(home_url()); ?>/dashboard/?task=wallet"><span class="fas fa-credit-card"></span><?php echo $az_data['text_uwa']; ?></a></li>
                        <?php
			} ?>
                        <li><a href="<?php
		echo edd_get_checkout_uri(); ?>"><span class="fas fa-shopping-basket"></span><?php echo $az_data['text_ush']; ?></a></li>
                     <?php if( class_exists( 'Awesome_Support' ) ) { ?>
                    <li><a href="<?php echo wpas_get_submission_page_url(); ?>"><span class="fas fa-paper-plane"></span>ارسال تیکت</a></li>
                    <?php } ?>
                    <?php if( class_exists( 'Awesome_Support' ) ) { ?>
                    <li><a href="<?php echo wpas_get_tickets_list_page_url(); ?>"><span class="fas fa-list"></span>تیکت ها</a></li>
                    <?php } ?>
                      <?php if (class_exists('EDD_Front_End_Submissions')) { ?>
                        <li><a href="<?php
echo esc_url(home_url()); ?>/vendor-dashboard" class="fes-bav"><span class="fas fa-star"></span><?php echo $az_data['text_bav']; ?></a></li>
                        <?php } ?>
                        <?php if( class_exists( 'Affiliate_WP' ) ) { ?>
                     <li><a href="<?php echo esc_url( affwp_get_affiliate_area_page_url() ); ?>"><span class="fas fa-handshake"></span>همکاری در فروش</a></li>
                         <?php } ?>
                         <li><a href="<?php
		echo wp_logout_url(home_url()); ?>"><span class="fas fa-power-off"></span><?php echo $az_data['text_ucl']; ?></a></li>
                   
                    <?php } else { ?>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/vendor-dashboard/?task=dashboard"><span class="fas fa-tachometer-alt"></span>پیشخوان</a></li>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/vendor-dashboard/?task=profile"><span class="fas fa-pen-square"></span>نمایه</a></li>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/vendor-dashboard/?task=products"><span class="fas fa-briefcase"></span>محصولات</a></li>
                    <?php if ( EDD_FES()->vendors->vendor_can_create_product() ) { ?>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/vendor-dashboard/?task=new-product"><span class="fas fa-plus-circle"></span>محصول جدید</a></li>
                    <?php } ?>
                    <?php if ( EDD_FES()->integrations->is_commissions_active() ) { ?>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/vendor-dashboard/?task=earnings"><span class="fas fa-dollar-sign"></span>درآمد</a></li>
                    <?php } ?>
                    <?php if ( EDD_FES()->vendors->vendor_can_view_orders() ){ ?>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/vendor-dashboard/?task=orders"><span class="fas fa-shopping-cart"></span>فروش های من</a></li>
                    <?php } ?>
                    <?php if( class_exists( 'EDD_Points_Renderer' ) ) { ?>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/vendor-dashboard/?task=points"><span class="fas fa-gift"></span>امتیازها</a></li>
                    <?php } ?>
                    <?php if( class_exists( 'EDD_Software_Licensing' ) ) { ?>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/vendor-dashboard/?task=license"><span class="fas fa-key"></span>لایسنس ها</a></li>
                    <?php } ?>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/vendor-dashboard/?task=download"><span class="fas fa-download"></span>دانلودها</a></li>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/vendor-dashboard/?task=purchases"><span class="fas fa-list-alt"></span>خریدهای من</a></li>
                    <?php if( class_exists( 'EDD_Wallet' ) ) { ?>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/vendor-dashboard/?task=wallet"><span class="fas fa-credit-card"></span>کیف پول</a></li>
                    <?php } ?>
                    <?php if( class_exists( 'Awesome_Support' ) ) { ?>
                    <li><a href="<?php echo wpas_get_submission_page_url(); ?>"><span class="fas fa-paper-plane"></span>ارسال تیکت</a></li>
                    <?php } ?>
                    <?php if( class_exists( 'Awesome_Support' ) ) { ?>
                    <li><a href="<?php echo wpas_get_tickets_list_page_url(); ?>"><span class="fas fa-list"></span>تیکت ها</a></li>
                    <?php } ?>
                    <?php if( class_exists( 'Affiliate_WP' ) ) { ?>
                     <li><a href="<?php echo esc_url( affwp_get_affiliate_area_page_url( ) ); ?>"><span class="fas fa-handshake"></span>همکاری در فروش</a></li>
                    <?php } ?>
                    <li><a href="<?php echo esc_url( home_url() ); ?>/vendor-dashboard/?task=logout"><span class="fas fa-power-off"></span>خروج</a></li>
                    <?php } ?>