{{-- PHP --}}
@php
    $cache = \App\Models\Setting::getByCache();
    $customThemeCache = Modules\Admin\app\Models\CustomTheme::getByCache();
@endphp
{{-- HTML --}}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="title" content="{{ $cache->value('page_title') }}">
    <meta name="description" content="{{ $cache->value('meta_description') }}">
    <meta name="keywords" content="{{ $cache->value('meta_keyword') }}">
    <link rel="icon" type="image/x-icon" href="{{ $cache->value('favicon') }}">
    <title>
        @yield('title') - {{ $cache->value('page_title') ?? config('app.name') }}
    </title>

    {{-- style --}}
    <link rel="stylesheet" type="text/css" href="{{ asset('css/style.css') }}" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.4/toastr.min.css" />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/remixicon@4.0.1/fonts/remixicon.min.css" />
    <style>
        {!! $customThemeCache->value('css') !!}
    </style>
    @stack('style')
    @yield('style')
    {{-- !style --}}

    {{-- script --}}
    <script defer src="{{ asset('js/scripts.js') }}"></script>
    <script defer src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.4/toastr.min.js"></script>
    @yield('script')
    @stack('script')
    {{-- !script --}}

    {{-- Vite --}}
    @Vite(['resources/scss/app.scss'])
    <script defer src="{{ Vite::asset('resources/js/app.js') }}"></script>


</head>

<body>

    @include('client.partials.scrolltop')
    {{-- @include('client.partials.loader') --}}
    @include('client.partials.header')

    @yield('content')

    @include('client.partials.footer')
    {!! $customThemeCache->value('js') !!}

</body>

</html>
