<!DOCTYPE html>
<html dir="{{getCurrentLocale() == 'ar' ? 'rtl' : 'ltr' }} ">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="keyword" content="">
    <meta name="csrf-token" content="{{ csrf_token() }}" />
    <!--Page Name-->
    <title> {{ __('web.project') .' | '.($title??'') }} </title>
    <!--Page Icon-->
    <link rel="shortcut icon" href="{{url('')}}/assets/web/images/icon.png" type="image/x-icon" title="Favicon" sizes="16x16" />

    <!--Bootstrap with RTL-->
    @if(getCurrentLocale() == 'ar')
    <link rel="stylesheet" href="{{url('')}}/assets/web/css/lib/bootstrap.rtl.css">
    @endif
    <!--Bootstrap with LTR-->
     @if(getCurrentLocale() == 'en')
    <link rel="stylesheet" href="{{url('')}}/assets/web/css/lib/bootstrap.min.css">
    @endif
    <!-- Fontawosome 6 pro icons  -->
    <link rel="stylesheet" href="{{url('')}}/assets/web/css/lib/all.min.css">
    <!-- Libraries  -->
    <link rel="stylesheet" href="{{url('')}}/assets/web/css//lib/animate.css">
    <link rel="stylesheet" href="{{url('')}}/assets/web/css/lib/jquery.fancybox.css">
    <link rel="stylesheet" href="{{url('')}}/assets/web/css/lib/swiper.min.css">
    <link rel="stylesheet" href="{{url('')}}/assets/web/css/style.css">
    @if(getCurrentLocale() == 'en')
        <link rel="stylesheet" href="{{url('')}}/assets/web/css/style_en.css">
    @endif
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
    <link  rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css">
</head>

<body>


        @if(!in_array(\Request::route()?->getName() ,[ 'web.coming','web.bill']))
            @include('web.layouts.menu')
        @endif
        <!-- Modal -->
        @yield('content')

        @if(!in_array(\Request::route()?->getName() ,[ 'web.coming','web.bill']))
            @include('web.layouts.footer')
        @endif
        <!--Js Files & Libraries-->
        <script src="{{url('')}}/assets/web/js/lib/jquery4.js"></script>
        <script src="{{url('')}}/assets/web/js/lib/popper.js"></script>
        <script src="{{url('')}}/assets/web/js/lib/bootstrap.bundle.min.js"></script>
        <script src="{{url('')}}/assets/web/js/lib/jquery.fancybox.js"></script>
        <script src="{{url('')}}/assets/web/js/lib/swiper.js"></script>
        <script src="{{url('')}}/assets/web/js/lib/wow.min.js"></script>
        <script src="{{url('')}}/assets/web/js/lib/back-to-top.js"></script>
        <script src="{{url('')}}/assets/web/js/main.js"></script>

        @yield('inject_js')
        @if ($errors->any())
            <script>

                setTimeout(
                    function()
                    {
                        toasterError({!! json_encode($errors->first()) !!});
                    }, 500);
            </script>
        @endif
        <script>
                if("{{Session::has('error')}}")
                {
                    setTimeout(
                        function()
                        {
                            toasterError({!! json_encode(Session::get('error')) !!});
                        }, 500);
                }
            </script>

            <script>
                if("{{session('success')}}")
                {
                    setTimeout(
                        function()
                        {
                            toasterSuccess("{{session('success')}}");
                        }, 500);
                }
            </script>
            <script>
                let url_favorite = "{{route('web.favorite.store')}}"
                let user = "{{auth()->user()}}"
                let login_first = "{{__('web.login_first')}}"
                let url_add_to_cart = "{{route('cart.store')}}"
            </script>
            <script src="{{url('')}}/assets/web/js/custom/formAction.js"></script>
            <script src="{{url('')}}/assets/web/js/custom/response.js"></script>
            <script src="{{url('')}}/assets/web/js/custom/relation.js"></script>
            <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
    </body>
</html>
