@extends('layouts.idara.panel')


@section('content')
<link rel="stylesheet" href="{{ asset('backend/css/idara.css') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css" integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />

@include('backend.partials.import')

@include('backend.partials.features')


        <section class="mt-4">
            <div class="card">
                <div class="card-header actionTitle">

                    <div class="row">
                        <div class="col">
                            <strong><i class="fa fa-ellipsis-v" aria-hidden="true"></i> {{$article->titre}}</strong>

                        </div>
                        <div class="col flexBtn">
                            <div class="dropdown">
                                <button class="btn  dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
                                    <i class="fa fa-gears"></i> Actions
                                </button>
                                <ul class="dropdown-menu">
                                    <a href="{{url('/test')}}">
                                        <li><button class="dropdown-item" type="button"><i class="fas fa-eye" aria-hidden="true"></i> Visualiser</button></li>

                                    </a>
                                    @if($article->produit_id == null)
                                    <a href="{{ route('promotion.editPack',['id'=>$article]) }}">
                                        <li><button class="dropdown-item" type="button"> <i class="fa-solid fa-pen-to-square"></i> Modifier</button></li>
                                    </a>
                                    @else
                                    <a href="{{ route('promotion.edit',['id'=>$article]) }}">
                                        <li><button class="dropdown-item" type="button"> <i class="fa-solid fa-pen-to-square"></i> Modifier</button></li>
                                    </a>
                                    @endif
                                </ul>
                            </div>
                           
                        </div>
                      
                    </div>


                </div>

                <div class="card-body">
                    <div  class="mt-4"><i class="fa-solid fa-calendar-days"></i> <strong>Date de mise à jour : </strong> {{$article->created_at}}</div>

                    <div  class="mt-4"><i class="fa-solid fa-calendar-days"></i> <strong>Date début de la promotion : </strong> {{$article->debut}}</div>
                    <div  class="mt-4"><i class="fa-solid fa-calendar-days"></i> <strong>Date fin de la promotion : </strong> {{$article->fin}}</div>
                   
                    <div class="mt-4"><i class="fa-solid fa-circle-info"></i> <strong>Descritpion : </strong> {!! html_entity_decode ($article->description)!!}</div>



                    @if($article->produit_id !=null)

                    <div  class="mt-4"><i class="fa-solid fa-objects-column"></i><strong>Produit : </strong>
                        {{ $article->produits->nom }}
                    
                    </div>
                             <div class=" mt-3 showImage">

                                <img src="{{ asset('storage/image/'.$article->produits->image) }}" alt="description of myimage">
                                
                            </div>

                    @endif
                    
                    
                                            
                    @if($article->photo != null)
                    <div class=" mt-3 showImage">

                        <img src="{{ asset('storage/image/'.$article->photo) }}" alt="description of myimage">
                        
                    </div>
                    @endif
                </div>
            </div>


        </section>
        <section>

            
            
          

        </section>


    </div>

    @endsection
