@extends('resturant-view.index')
@section('Rcontent')
@php
use App\Models\ProductUnits;
use App\Models\Products;
use App\Models\Coins;
use App\Models\VAPrice;
use App\Models\SalesDefaultData;
use App\Models\ResturantMenuStyle;
use App\Models\ResturantCartCheckStyle;

$styleXX=ResturantCartCheckStyle::orderBy('id','desc')->first();
$styleX=ResturantMenuStyle::orderBy('id','desc')->first();
$Def=SalesDefaultData::orderBy('id','desc')->first();
$coin=Coins::find($Def->CountryResturantWebsite);

@endphp
<title>{{trans('admin.Menu')}}</title>


@if($style->Menu == 1)


<style>

.bredcrumb_section.menu_list {
    background: linear-gradient(to left, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url({{URL::to($styleX->Menu_1_Image)}});
    }

    
    .section_title .sub_text {
        color: {{$styleX->Menu_1_Title}} !important;
    }
    
    .menu_list_section {
        background-color: {{$styleX->Menu_1_Bar_BG}} !important;
    
    }

    .text_block span{
          color: {{$styleX->Menu_1_Bar_Color}} !important;
        
    }
    
    .action_bar button{
           background-color: {{$styleX->Menu_1_Btn_BG}} !important;
  color: {{$styleX->Menu_1_Btn_Color}} !important;
    }
    
    .pricee {
        color: {{$styleX->Menu_1_Icon_Color}} !important;  
        
        }
    
        .pricee:hover {
        color: {{$styleX->Menu_1_Icon_Hover_Color}} !important;  
        
        }
    
        .priceee {
        color: {{$styleX->Menu_1_Icon_Active_Color}} !important;  
        
        }
    
    .dishList_block .dish_list ul li .mainCource .price{
        
         color: {{$styleX->Menu_1_Price_Color}} !important;  
    }
    .dishList_block .dish_list ul li .mainCource .dishName h4{
        font-size: 20px;
      color: {{$styleX->Menu_1_Icon_Color}} !important;  
    }
</style>



    <!-- Bread Crumb Start -->
    <section class="bredcrumb_section menu_list">
      <div class="container">
        <div class="section_title text-center" data-aos="fade-up" data-aos-duration="1500">
          <span class="icon"><img src="{{URL::to($styleX->Menu_1_Icon_Image)}}" alt="img"></span>
          <span class="sub_text">{{trans('admin.Menu')}}</span>
        </div>
      </div>
    </section>
    <!-- Bread Crumb End -->


@foreach($Groups as $grop)
       @php  
            
               $Products=Products::whereIn('Store_Show',[1,3])
      ->whereIn('P_Type',['Completed','Variable_Aggregate'])

            ->where('Group',$grop->id)
    ->orderBy('id','desc')->get();
            
            @endphp
    <!-- Main Dish Section Start -->
    <div class="menu_list_section menuList_page">
      <div class="owl-carousel owl-theme" id="menu_list_flow">
          
        
        <div class="item">
          <div class="text_block">
            <span>{{app()->getLocale() == 'ar' ?$grop->Name :$grop->NameEn}}</span>
            <span class="mark_star"><i class="icofont-restaurant-menu"></i></span>
          </div>
        </div>
        <div class="item">
          <div class="text_block">
            <span>{{app()->getLocale() == 'ar' ?$grop->Name :$grop->NameEn}}</span>
            <span class="mark_star"><i class="icofont-restaurant-menu"></i></span>
          </div>
        </div>
                <div class="item">
          <div class="text_block">
            <span>{{app()->getLocale() == 'ar' ?$grop->Name :$grop->NameEn}}</span>
            <span class="mark_star"><i class="icofont-restaurant-menu"></i></span>
          </div>
        </div>
        
      </div>
    </div>
    <!-- Main Dish Section End -->


@if($styleX->Menu_1_BG_Type == 1)  

    <section class="row_am dishList_block" style="background-image: url({{URL::to($styleX->Menu_1_BG_Image)}});">
  @elseif($styleX->Menu_1_BG_Type == 2)
    <section class="row_am dishList_block" style="background: {{$styleX->Menu_1_BG_Color}};">

@elseif($style->Menu_1_BG_Type == 0)
    <section class="row_am dishList_block">
 @endif
    <!-- Main Dish List Start -->

      <div class="container">
        <div class="row">
          <div class="col-md-12 col-lg-6" data-aos="fade-up" data-aos-duration="1500">
            <div class="dish_img dish_left text-center">
              <img class="img-fluid" src="{{URL::to($grop->Image)}}" alt="img">
            </div>
          </div>
          <div class="col-md-12 col-lg-6" data-aos="fade-up" data-aos-duration="1500">
            <div class="dish_list">
              <ul>
                  
                @foreach($Products as $pro)  
                  
              
                  
                  
                         @php
                  
                  $ProPrice=ProductUnits::where('Product',$pro->id)->where('Def',1)->first();
                  
                  @endphp
                <li>
                  <div class="img">
                      @if(!empty($pro->Image))
                    <img src="{{URL::to($pro->Image)}}" alt="img">
                      @else
                  <img src="{{asset('RFront/images/title_icon.png')}}" alt="img">      
                      @endif
                  </div>
                  <div class="info">
                      
                                  <div class="mainCource">
                         
                      <div class="dishName">
                         <h6>{{$pro->Calories}}</h6>
                            </div>
                      </div>
                      
                    <div class="mainCource">
                      <div class="dishName">
                        <h4>{{app()->getLocale() == 'ar' ?$pro->P_Ar_Name :$pro->P_En_Name}}</h4><br>
                           @if($pro->P_Type != 'Variable_Aggregate')   
                          
                   @if($style->Cart == 1)              
                                       @if($pro->Added == 1)
      <a    onclick="AddToCart({{$pro->id}})"><i id="Cart{{$pro->id}}" class="icofont-ui-cart icofont-2x priceee"></i> </a>   <br>  
   <input type="hidden" id="Added{{$pro->id}}" value="1">   
                  @else
       <a    onclick="AddToCart({{$pro->id}})"><i id="Cart{{$pro->id}}" class="icofont-ui-cart icofont-2x pricee"></i> </a>   <br>  
   <input type="hidden" id="Added{{$pro->id}}" value="0">                           
                @endif          
                @endif          
                          
                    <input type="hidden" id="Product{{$pro->id}}" value="{{$pro->id}}">             
                    <input type="hidden" id="SUbV{{$pro->id}}" value="0">             
                    <input type="hidden" id="VPriceID{{$pro->id}}" value="0">   
                          
                          @endif
                          
                      </div>
                        
                        
                    @if($pro->P_Type == 'Variable_Aggregate')    
                        
                                    @php
                  $ProVira=VAPrice::where('Product',$pro->id)->get();
                  @endphp
                         
                    <div class="row">    
                    @foreach($ProVira as $vv)    
                         <div class="dishName">
                        <h6 style="color: {{$styleX->Menu_1_Price_Color}} ">{{app()->getLocale() == 'ar' ?$vv->SubV()->first()->Name :$vv->SubV()->first()->NameEn}}</h6> <br>
                             
              @if($style->Cart == 1)                   
                                       @if($vv->Added == 1)
                   <a onclick="AddToCartV({{$vv->id}})"><i id="CartV{{$vv->id}}" class="icofont-ui-cart icofont-2x priceee"></i> </a> 
                       <input type="hidden" id="AddedV{{$vv->id}}" value="1">                     
                                
                    @else            
              <a onclick="AddToCartV({{$vv->id}})"><i id="CartV{{$vv->id}}" class="icofont-ui-cart icofont-2x pricee"></i> </a> 
                       <input type="hidden" id="AddedV{{$vv->id}}" value="0">                   
                @endif                
                @endif                
                                
                                
                       
                    <input type="hidden" id="Product{{$vv->id}}" value="{{$pro->id}}">             
                    <input type="hidden" id="SUbV{{$vv->id}}" value="{{$vv->SubV}}">             
                    <input type="hidden" id="VPriceID{{$vv->id}}" value="{{$vv->id}}">          
                             
                             
                      </div>    
                      <div class="doted"></div>
                        
                        
                             @if(!empty($vv->Offer_Price) and $vv->Offer_Price != 0)
                        <del style="color: {{$styleX->Menu_1_Offer_Price_Color}}" class="">{{$vv->Price}} {{$coin->Symbol}}</del>
                       <span class="price">{{$vv->Offer_Price}} {{$coin->Symbol}}</span>    
                              <input type="hidden" id="Price{{$vv->id}}" value="{{$vv->Offer_Price}}">   
                        @else
                        <span class="price">{{$vv->Price}} {{$coin->Symbol}}</span>
                               <input type="hidden" id="Price{{$vv->id}}" value="{{$vv->Price}}">       
                        @endif
                    @endforeach    
                        </div>
                    @else
                        
                           <div class="doted"></div>
                        
                             @if($pro->Offer == 1)
                        <del style="color: {{$styleX->Menu_1_Offer_Price_Color}}" class="">{{$ProPrice->Price}} {{$coin->Symbol}}</del>
                       <span class="price">{{$pro->OfferPrice}} {{$coin->Symbol}}</span>   
                               <input type="hidden" id="Price{{$pro->id}}" value="{{$pro->OfferPrice}}">  
                        @else
                        <span class="price">{{$ProPrice->Price}} {{$coin->Symbol}}</span>
                           <input type="hidden" id="Price{{$pro->id}}" value="{{$ProPrice->Price}}">   
                        @endif    
                        
                    @endif    

                    </div>
                    <div class="description">
                                                        <div class="action_bar">
                                           
         <button type="button" class="btn btn_primary "  style="margin-top: 0px;padding: 6px;"  data-toggle="collapse" href="#MODALPRO{{$pro->id}}" role="button" aria-expanded="false" aria-controls="collapseExample"   >
{{trans('admin.Details')}} <i class="icofont-book"></i>
</button>                                                     
                                                                                                            
                                                            
   </div>
                        
              
          
                 <div class="ASMODALL text-center collapse " id="MODALPRO{{$pro->id}}">
            <div class="row">
            <div class="col-md-12">
        <h6>{{app()->getLocale() == 'ar' ?$pro->P_Ar_Name :$pro->P_En_Name}}</h6>        
                </div>
                        <div class="col-md-12">
         {!!app()->getLocale() == 'ar' ?$pro->Ar_Desc :$pro->En_Desc!!}
                </div>

                </div>                        
            </div>              
                                                       
                                 
        
                    </div>
                  </div>  
                </li>
                  
                  
         
                  
              @endforeach
              </ul>
            </div>
          </div>
        </div>
      </div>
    </section>

        
@endforeach


@elseif($style->Menu == 2)

        <style>
            .offer_menu .item img{
                border-color: {{$styleX->Menu_2_Gallery_Border}} !important;
            }
            
            .section_title .sub_text{
                
                color: {{$styleX->Menu_2_Title}} !important;
            }
            
            .offer_menu_section .nav-tabs .nav-link{
                 color: {{$styleX->Menu_2_Category_Color}} !important;
            }
            
            .offer_menu_section .nav-tabs .nav-link:hover, .offer_menu_section .nav-tabs .nav-link.active{
                color: {{$styleX->Menu_2_Category_Active_Color}} !important;   
            }
            
            .offer_menu_section .nav-tabs .nav-link:hover:before, .offer_menu_section .nav-tabs .nav-link.active:before{
                       background: {{$styleX->Menu_2_Category_Active_Color}} !important;   
            }
            
            
                        
            .offer_menu_section .nav-tabs .nav-link:hover{
                 color: {{$styleX->Menu_2_Category_Hover_Color}} !important;
            }
            
            
            .offer_menu_section .nav-tabs {

    border-top: 1px solid {{$styleX->Menu_2_Lines_Color}} !important;
    border-bottom: 1px solid {{$styleX->Menu_2_Lines_Color}} !important;
            }
            
            .btn_primary {

    background-color: {{$styleX->Menu_2_Btn_BG}} !important;
    color: {{$styleX->Menu_2_Btn_Color}} !important;

            }
            

.menulist_wraper .menusub_text {

    color: {{$styleX->Menu_2_Name_Color}} !important;
    background-color: {{$styleX->Menu_2_Name_BG}} !important;
            }

            .menulist_wraper ul li .mainCource .dishName h4{
                color: {{$styleX->Menu_2_Icon_Color}} !important;
            }
            
            .pricee{
                color: {{$styleX->Menu_2_Icon_Color}} !important;    
            }
            
                   .pricee:hover{
                color: {{$styleX->Menu_2_Icon_Hover_Color}} !important;    
            }
            
            
                .priceee{
                color: {{$styleX->Menu_2_Icon_Active_Color}} !important;    
            }
            
            .menulist_wraper ul li .mainCource .price{
               color: {{$styleX->Menu_2_Price_Color}} !important;       
            }
        </style>

        

  @if($style->Gallery == 1) 
    <!-- Offer Menu Gallery Start -->
    <div class="gallery_direction_right gallery_slider offer_menu">
      <!-- Right To left -->
      <div class="owl-carousel owl-theme" id="gallery_flow_right" data-aos="fade-in" data-aos-duration="1500">
          
        @foreach($Gallery as $gal)  
        <div class="item">
          <div class="img">
            <img src="{{URL::to($gal->Image)}}" alt="img">
          </div>
        </div>
       @endforeach
      </div>
    </div>
    <!-- Offer Menu Gallery End -->
@endif
    <!-- Menu Section Start -->
        @if($styleX->Menu_2_BG_Type == 1)  
     <section class="row_am offer_menu_section" style="background-image: url({{URL::to($styleX->Menu_2_BG_Image)}});">    
  @elseif($styleX->Menu_2_BG_Type == 2)
 <section class="row_am offer_menu_section"  style="background: {{$styleX->Menu_2_BG_Color}};">         
@elseif($style->Menu_2_BG_Type == 0)
      <section class="row_am offer_menu_section">
 @endif
   
      <div class="container">
        <!-- Section Title Start -->
        <div class="section_title text-center" data-aos="fade-up" data-aos-duration="1500">
          <span class="sub_text">{{trans('admin.Menu')}}</span>
        </div>
        <!-- Section Title End -->
        <!-- Navigation tab Start -->
        <ul class="nav nav-tabs" id="myTab" role="tablist" data-aos="fade-up" data-aos-duration="1500">
            
        @foreach($Groups as $grop)    
          <li class="nav-item">
  <a class="nav-link @if($grop->id == $Last->id) active @endif" id="lunch-tab{{$grop->id}}" data-toggle="tab" href="#lunch{{$grop->id}}" role="tab" aria-controls="lunch{{$grop->id}}"
              aria-selected="true">{{app()->getLocale() == 'ar' ?$grop->Name :$grop->NameEn}}</a>
          </li>
        @endforeach    
     
        </ul>
        <!-- Navigation tab End -->

        <!-- Tab Content Start -->
        <div class="tab-content" id="myTabContent" data-aos="fade-up" data-aos-duration="1500">
            
            @foreach($Groups as $grop)    
                   @php  
            
                 $Products=Products::whereIn('Store_Show',[1,3])
      ->whereIn('P_Type',['Completed','Variable_Aggregate'])
    
            ->where('Group',$grop->id)
    ->orderBy('id','desc')->get();
            
            @endphp
          <!-- Tab Block -->
          <div class="tab-pane fade @if($grop->id == $Last->id) show active @endif" id="lunch{{$grop->id}}" role="tabpanel" aria-labelledby="lunch-tab{{$grop->id}}">
            <!-- MenuList Wraper -->
            <div class="menulist_wraper row">
                
              <!-- Menu Left Side -->
   
          
            
                       @foreach($Products as $pro)  
                  
                         @php
                  
                  $ProPrice=ProductUnits::where('Product',$pro->id)->where('Def',1)->first();
                  
                  @endphp      
                <div class="menulist_box col-md-6  col-12">
                
            <div class="steel">     
                                         @if(!empty($pro->Image))
                    <img style="max-width: 25%;border-radius: 50%;padding: 0px;" src="{{URL::to($pro->Image)}}" alt="img">
                      @else
                  <img src="{{asset('RFront/images/title_icon.png')}}" alt="img">      
                      @endif    
                    
                  <h3 class="menusub_text">{{app()->getLocale() == 'ar' ?$pro->P_Ar_Name :$pro->P_En_Name}}</h3>
                </div>   
                
                <br>
                       @if($pro->P_Type != 'Variable_Aggregate')
                    
              @if($style->Cart == 1)          
                                 @if($pro->Added == 1)
      <a    onclick="AddToCart({{$pro->id}})"><i id="Cart{{$pro->id}}" class="icofont-ui-cart icofont-2x priceee"></i> </a>   <br>  
   <input type="hidden" id="Added{{$pro->id}}" value="1">   
                  @else
       <a    onclick="AddToCart({{$pro->id}})"><i id="Cart{{$pro->id}}" class="icofont-ui-cart icofont-2x pricee"></i> </a>   <br>  
   <input type="hidden" id="Added{{$pro->id}}" value="0">                           
                @endif          
                @endif          
                          
                    <input type="hidden" id="Product{{$pro->id}}" value="{{$pro->id}}">             
                    <input type="hidden" id="SUbV{{$pro->id}}" value="0">             
                    <input type="hidden" id="VPriceID{{$pro->id}}" value="0">   
                    
                    @endif
                    
                      @if($pro->P_Type == 'Variable_Aggregate')    
                        
                                    @php
                  $ProVira=VAPrice::where('Product',$pro->id)->get();
                  @endphp
                             <div class="description">
                     <div class="action_bar">
                                           
         <button type="button" class="btn btn_primary "  style="margin-top: 0px;padding: 6px;"  data-toggle="collapse" href="#MODALPRO{{$pro->id}}" role="button" aria-expanded="false" aria-controls="collapseExample"   >
{{trans('admin.Details')}} <i class="icofont-book"></i>
</button>                                                                                                                                                    
                                                            
   </div>
                               <div class="ASMODALL text-center collapse " id="MODALPRO{{$pro->id}}">
            <div class="row">
            <div class="col-md-12">
        <h6>{{app()->getLocale() == 'ar' ?$pro->P_Ar_Name :$pro->P_En_Name}}</h6>   
               <h6>{{$pro->Calories}}</h6>    
                </div>
                        <div class="col-md-12">
         {!!app()->getLocale() == 'ar' ?$pro->Ar_Desc :$pro->En_Desc!!}
                </div>

                </div>                        
            </div>                           
                      </div>            
                      <ul>
                          
                       @foreach($ProVira as $vv)       
                    <li>
                      <div class="mainCource">
                        <div class="dishName">
                          <h4>{{app()->getLocale() == 'ar' ?$vv->SubV()->first()->Name :$vv->SubV()->first()->NameEn}}</h4> <br>
                          
              @if($style->Cart == 1)                  
                      @if($vv->Added == 1)
                   <a onclick="AddToCartV({{$vv->id}})"><i id="CartV{{$vv->id}}" class="icofont-ui-cart icofont-2x priceee"></i> </a> 
                       <input type="hidden" id="AddedV{{$vv->id}}" value="1">                     
                                
                    @else            
              <a onclick="AddToCartV({{$vv->id}})"><i id="CartV{{$vv->id}}" class="icofont-ui-cart icofont-2x pricee"></i> </a> 
                       <input type="hidden" id="AddedV{{$vv->id}}" value="0">                   
                @endif                
                @endif                
                                
                                
                       
                    <input type="hidden" id="Product{{$vv->id}}" value="{{$pro->id}}">             
                    <input type="hidden" id="SUbV{{$vv->id}}" value="{{$vv->SubV}}">             
                    <input type="hidden" id="VPriceID{{$vv->id}}" value="{{$vv->id}}">                   
                        </div>
                        <div class="doted"></div>
                                 @if(!empty($vv->Offer_Price) and $vv->Offer_Price != 0)
                        <del style="color:{{$styleX->Menu_2_Offer_Price_Color}}" class="">{{$vv->Price}} {{$coin->Symbol}}</del>
                       <span class="price">{{$vv->Offer_Price}} {{$coin->Symbol}}</span> 
                              <input type="hidden" id="Price{{$vv->id}}" value="{{$vv->Offer_Price}}">   
                        @else
                        <span class="price">{{$vv->Price}} {{$coin->Symbol}}</span>
                                   <input type="hidden" id="Price{{$vv->id}}" value="{{$vv->Price}}">   
                        @endif
                      </div>
 
                    </li>
                        @endforeach  
                   
                  </ul>
                   @else
                  <ul>
                    <li>
                        
                      <div class="mainCource">
                
                        
                             @if($pro->Offer == 1)
                        <del style="color: {{$styleX->Menu_2_Offer_Price_Color}};width: auto;" class=" mt-2">{{$ProPrice->Price}} {{$coin->Symbol}}</del>
                       <span style="width: auto;" class="price mt-2">{{$pro->OfferPrice}} {{$coin->Symbol}}</span>    
                                   <input type="hidden" id="Price{{$pro->id}}" value="{{$pro->OfferPrice}}">  
                        @else
                        <span style="width: auto;" class="price mt-2">{{$ProPrice->Price}} {{$coin->Symbol}}</span>
                             <input type="hidden" id="Price{{$pro->id}}" value="{{$ProPrice->Price}}">   
                        @endif    
                        
                      </div>
                      <div class="description">
                                                                            <div class="action_bar">
                                           
         <button type="button" class="btn btn_primary "  style="margin-top: 0px;padding: 6px;"  data-toggle="collapse" href="#MODALPRO{{$pro->id}}" role="button" aria-expanded="false" aria-controls="collapseExample"   >
{{trans('admin.Details')}} <i class="icofont-book"></i>
</button>  
                                                                         
   </div>
                          
                                 <div class="ASMODALL text-center collapse " id="MODALPRO{{$pro->id}}">
            <div class="row">
            <div class="col-md-12">
        <h6>{{app()->getLocale() == 'ar' ?$pro->P_Ar_Name :$pro->P_En_Name}}</h6>        
                </div>
                        <div class="col-md-12">
         {!!app()->getLocale() == 'ar' ?$pro->Ar_Desc :$pro->En_Desc!!}
                </div>

                </div>                        
            </div>                           
                                                
                      </div>
                    </li>
                  </ul>
                      @endif
                    
                    
   
                    
                </div>
  
                  
                  
         @endforeach
     
                
              <!-- Menu Right Side -->
             
            </div>
          </div>
                @endforeach
    
            
        </div>
        <!-- Tab Content End -->

      </div>
    </section>
    <!-- Menu Section End -->

@elseif($style->Menu == 3)


     <style>
       .bredcrumb_section.menu_list {

           background: linear-gradient(to left, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url({{URL::to($styleX->Menu_3_Image)}});
         }
         .section_title .sub_text{
             color: {{$styleX->Menu_3_Title}} !important;
         }
         
         .our_menu_section .nav-tabs .nav-link{
              color: {{$styleX->Menu_3_Category_Color}} !important;
         }
         
            .our_menu_section .nav-tabs .nav-link:hover{
              color: {{$styleX->Menu_3_Category_Hover_Color}} !important;
         }
         
         .our_menu_section .nav-tabs .nav-link:hover, .our_menu_section .nav-tabs .nav-link.active{
              color: {{$styleX->Menu_3_Category_Active_Color}} !important;
             
         }
         
         .our_menu_section .nav-tabs .nav-link:before{
               background: {{$styleX->Menu_3_Category_Active_Color}} !important;
         }
         
         
         .our_menu_section .dish_box{
             background-color:  {{$styleX->Menu_3_Box_BG}} !important; 
              color:  {{$styleX->Menu_3_Box_Color}} !important; 
         }
         
         .btn_primary {

    background-color: {{$styleX->Menu_3_Btn_BG}} !important; 
             color: {{$styleX->Menu_3_Btn_Color}} !important; 
         }
         
           .pricee{
                color: {{$styleX->Menu_3_Icon_Color}} !important;    
            }
            
                   .pricee:hover{
                color: {{$styleX->Menu_3_Icon_Hover_Color}} !important;    
            }
            
            
                .priceee{
                color: {{$styleX->Menu_3_Icon_Active_Color}} !important;    
            }
            
            .menulist_wraper ul li .mainCource .price{
               color: {{$styleX->Menu_3_Price_Color}} !important;       
            }
     </style> 
    <!-- Bread Crumb Start -->
    <section class="bredcrumb_section menu_list">
      <div class="container">
        <div class="section_title text-center" data-aos="fade-up" data-aos-duration="1500">
          <span class="icon"><img src="{{URL::to($styleX->Menu_3_Icon_Image)}}" alt="img"></span>
          <span class="sub_text">{{trans('admin.Menu')}}</span>
        </div>
      </div>
    </section>
    <!-- Bread Crumb End -->

          
       @if($styleX->Menu_3_BG_Type == 1)  
         <section class="our_menu_section row_inner_am light_texchur" style="background-image: url({{URL::to($styleX->Menu_3_BG_Image)}});">
 @elseif($styleX->Menu_3_BG_Type == 2)
         <section class="our_menu_section row_inner_am light_texchur" style="background: {{$styleX->Menu_3_BG_Color}};">
@elseif($style->Menu_3_BG_Type == 0)
         <section class="our_menu_section row_inner_am light_texchur">
 @endif
    <!-- Our Menu Section Start -->


      <div class="container">

        <!-- Navigation tab Start -->
        <ul class="nav nav-tabs" id="myTab" role="tablist" data-aos="fade-up" data-aos-duration="1500">
            
      @foreach($Groups as $grop)    
      
          <li class="nav-item">
            <a class="nav-link @if($grop->id == $Last->id) active @endif" id="starters-tab{{$grop->id}}" data-toggle="tab" href="#starters{{$grop->id}}" role="tab" aria-controls="starters{{$grop->id}}"
              aria-selected="true">{{app()->getLocale() == 'ar' ?$grop->Name :$grop->NameEn}}  </a>
          </li>
    @endforeach     
        </ul>
        <!-- Navigation tab End -->

        <!-- Tab Content Start -->
        <div class="tab-content" id="myTabContent" data-aos="fade-up" data-aos-duration="1500">
            
            
                     @foreach($Groups as $grop)    
                   @php  
            
                     $Products=Products::whereIn('Store_Show',[1,3])
      ->whereIn('P_Type',['Completed','Variable_Aggregate'])
            ->where('Group',$grop->id)
    ->orderBy('id','desc')->get();
            
            @endphp
            
          <!-- Tab Block -->
          <div class="tab-pane fade @if($grop->id == $Last->id) show active @endif" id="starters{{$grop->id}}" role="tabpanel" aria-labelledby="starters-tab{{$grop->id}}">
            <div class="container">
              <div class="row">
                  
                     
                       @foreach($Products as $pro)  
                  
                         @php
                  
                  $ProPrice=ProductUnits::where('Product',$pro->id)->where('Def',1)->first();
                  
                  @endphp    
                <div class="col-lg-6 col-12 text-center">
                  <div class="dish_box">
                    <div class="dish_info">
                      <div class="dish_img">
                          @if(!empty($pro->Image))
                    <img src="{{URL::to($pro->Image)}}" alt="img">
                      @else
                  <img src="{{asset('RFront/images/title_icon.png')}}" alt="img">      
                      @endif
                      </div>
                      <div class="dish_text">
                        <h3>{{app()->getLocale() == 'ar' ?$pro->P_Ar_Name :$pro->P_En_Name}}</h3>
                                       <div class="action_bar mb-2">
         <button type="button" class="btn btn_primary "  style="margin-top: 0px;padding: 6px;"  data-toggle="collapse" href="#MODALPRO{{$pro->id}}" role="button" aria-expanded="false" aria-controls="collapseExample"   >
{{trans('admin.Details')}} <i class="icofont-book"></i>
</button>                                                    
   </div>
                                <div class="ASMODALL text-center collapse mb-2" id="MODALPRO{{$pro->id}}">
            <div class="row">
            <div class="col-md-12">
        <h6>{{app()->getLocale() == 'ar' ?$pro->P_Ar_Name :$pro->P_En_Name}}</h6>    
               <h6>{{$pro->Calories}}</h6>    
                </div>
                        <div class="col-md-12">
         {!!app()->getLocale() == 'ar' ?$pro->Ar_Desc :$pro->En_Desc!!}
                </div>

                </div>                        
            </div>              
                                                       
                                  
                          
   
                                   @if($pro->P_Type == 'Variable_Aggregate')    
                        
                                    @php
                  $ProVira=VAPrice::where('Product',$pro->id)->get();
                  @endphp
                <div class="row mt-2">          
       @foreach($ProVira as $vv)    
                            <div class="col-md-4 col-4 text-center"> 
                          <div class="dishName">
                          <h4>{{app()->getLocale() == 'ar' ?$vv->SubV()->first()->Name :$vv->SubV()->first()->NameEn}}</h4>
                        </div>
                   @if($style->Cart == 1)                 
                                
                    @if($vv->Added == 1)
                   <a onclick="AddToCartV({{$vv->id}})"><i id="CartV{{$vv->id}}" class="icofont-ui-cart icofont-2x priceee"></i> </a> 
                       <input type="hidden" id="AddedV{{$vv->id}}" value="1">                     
                                
                    @else            
              <a onclick="AddToCartV({{$vv->id}})"><i id="CartV{{$vv->id}}" class="icofont-ui-cart icofont-2x pricee"></i> </a> 
                       <input type="hidden" id="AddedV{{$vv->id}}" value="0">                   
                @endif                 
                @endif                 
                                
                                
                       
                    <input type="hidden" id="Product{{$vv->id}}" value="{{$pro->id}}">             
                    <input type="hidden" id="SUbV{{$vv->id}}" value="{{$vv->SubV}}">             
                    <input type="hidden" id="VPriceID{{$vv->id}}" value="{{$vv->id}}">             
                                
                                <br>                      
                                 @if(!empty($vv->Offer_Price) and $vv->Offer_Price != 0)
                        <del style="color:  {{$styleX->Menu_3_Offer_Price_Color}}" class="">{{$vv->Price}} {{$coin->Symbol}}</del>
                       <span class="price">{{$vv->Offer_Price}} {{$coin->Symbol}}</span> 
                          <input type="hidden" id="Price{{$vv->id}}" value="{{$vv->Offer_Price}}">               
                        @else
                        <span class="price">{{$vv->Price}} {{$coin->Symbol}}</span>
                        <input type="hidden" id="Price{{$vv->id}}" value="{{$vv->Price}}">               
                        @endif
                    </div>        
       @endforeach  
                </div>    
                    
              @else  
                          
                       @if($style->Cart == 1)       
                @if($pro->Added == 1)
      <a    onclick="AddToCart({{$pro->id}})"><i id="Cart{{$pro->id}}" class="icofont-ui-cart icofont-2x priceee"></i> </a>   <br>  
   <input type="hidden" id="Added{{$pro->id}}" value="1">   
                  @else
       <a    onclick="AddToCart({{$pro->id}})"><i id="Cart{{$pro->id}}" class="icofont-ui-cart icofont-2x pricee"></i> </a>   <br>  
   <input type="hidden" id="Added{{$pro->id}}" value="0">                           
                @endif          
                @endif          
                          
                    <input type="hidden" id="Product{{$pro->id}}" value="{{$pro->id}}">             
                    <input type="hidden" id="SUbV{{$pro->id}}" value="0">             
                    <input type="hidden" id="VPriceID{{$pro->id}}" value="0">                     
                          
                             @if($pro->Offer == 1)
                        <del style="color:  {{$styleX->Menu_3_Offer_Price_Color}};width: auto;" class=" mt-2">{{$ProPrice->Price}} {{$coin->Symbol}}</del>
                       <span style="width: auto;" class="price mt-2">{{$pro->OfferPrice}} {{$coin->Symbol}}</span>  
                   <input type="hidden" id="Price{{$pro->id}}" value="{{$pro->OfferPrice}}">             
                        @else
                        <span style="width: auto;" class="price mt-2">{{$ProPrice->Price}} {{$coin->Symbol}}</span>
                   <input type="hidden" id="Price{{$pro->id}}" value="{{$ProPrice->Price}}">             
                        @endif 
                @endif          
                      </div>
                    </div>
                  </div>
                </div>

                  @endforeach
              </div>
            </div>
          </div>

      @endforeach
        </div>
        <!-- Tab Content End -->
      </div>
    </section>
    <!-- Our Menu Section End -->


@endif
<style>
    

      .ASMODALL{
        border: 1px solid {{$styleXX->Collapse_Border}} !important;
    padding: 13px;
    width: 100%;
                background: {{$styleXX->Collapse_BG}} !important;
        margin-top: 10px;
        color:{{$styleXX->Collapse_Color}} !important;
    }
    .pricee{

    border-radius: 34%;
        padding: 6px;
        
    }
    
    .pricee:hover{
        color: #c83f46;
        cursor: pointer;
    }
    
    
        .priceee{

    border-radius: 34%;
        padding: 6px;
    color: darkgreen;
        
    }
    
     .priceee:hover{

 cursor: pointer;
        
    }
    
 

</style>
<script>
    
 function AddToCartV(r){
     
     var Inp=$('#AddedV'+r).val();
     var Product=$('#Product'+r).val();
     var SUbV=$('#SUbV'+r).val();
     var VPriceID=$('#VPriceID'+r).val();
     var Price=$('#Price'+r).val();
     
     if(parseFloat(Inp) == 0){
      
$('#CartV'+r). removeClass("pricee");
$('#CartV'+r). addClass("priceee");
  $('#AddedV'+r).val(1);     
 
         
     $.ajax({
            url:'1/AddCartResturant',
            method:'GET',
            data:{Product:Product,SUbV:SUbV,VPriceID:VPriceID,Price:Price},
            dataType:'json',
            success:function(data)
            {
         $('#CountCart').text(data.Count);     
                
            }
           })     
        
        }else{
        
$('#CartV'+r). removeClass("priceee");
$('#CartV'+r). addClass("pricee");  
$('#AddedV'+r).val(0); 
 $.ajax({
            url:'1/RemoveCartResturant',
            method:'GET',
            data:{Product:Product,SUbV:SUbV,VPriceID:VPriceID},
            dataType:'json',
            success:function(data)
            {
         $('#CountCart').text(data.Count);     
                
            }
           })              
        }
     
     
 }
    


 function AddToCart(r){
     
     var Inp=$('#Added'+r).val();
     var Product=$('#Product'+r).val();
     var SUbV=$('#SUbV'+r).val();
     var VPriceID=$('#VPriceID'+r).val();
     var Price=$('#Price'+r).val();
     
     if(parseFloat(Inp) == 0){
      
$('#Cart'+r). removeClass("pricee");
$('#Cart'+r). addClass("priceee");
  $('#Added'+r).val(1);     
 
         
     $.ajax({
            url:'1/AddCartResturant',
            method:'GET',
            data:{Product:Product,SUbV:SUbV,VPriceID:VPriceID,Price:Price},
            dataType:'json',
            success:function(data)
            {
         $('#CountCart').text(data.Count);     
                
            }
           })     
        
        }else{
        
$('#Cart'+r). removeClass("priceee");
$('#Cart'+r). addClass("pricee");  
$('#Added'+r).val(0); 
 $.ajax({
            url:'1/RemoveCartResturant',
            method:'GET',
            data:{Product:Product,SUbV:SUbV,VPriceID:VPriceID},
            dataType:'json',
            success:function(data)
            {
         $('#CountCart').text(data.Count);     
                
            }
           })              
        }
     
     
 }
   


</script>

@endsection  