<!DOCTYPE html>
<!--[if lt IE 7 ]><html lang="{{ config('app.locale') }}" class="no-js ie6"><![endif]-->
<!--[if IE 7 ]><html lang="{{ config('app.locale') }}" class="no-js ie7"><![endif]-->
<!--[if IE 8 ]><html lang="{{ config('app.locale') }}" class="no-js ie8"><![endif]-->
<!--[if IE 9 ]><html lang="{{ config('app.locale') }}" class="no-js ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="{{ config('app.locale') }}" class="no-js"><!--<![endif]-->
<head>
    <title>{{ config('site_title', env('app.name')) }}</title>

    <!-- Metas -->
    <meta charset="UTF-8"/>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"/>
    <meta name="csrf-token" content="{{ csrf_token() }}"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>

    <!-- 구글 검색 차단 -->
    <meta name="google" content="nositelinkssearchbox"/>
    <meta name="googlebot" content="noindex,nofollow,nosnippet,noodp,noarchive,noimageindex"/>

    <!-- Styles -->
    @if($siteFavicon = config('site_favicon'))
        <link rel="icon" type="image/x-icon" href="{{ asset($siteFavicon) }}"/>
        <link rel="shortcut icon" type="image/x-icon" href="{{ asset($siteFavicon) }}"/>
    @endif
    @vite(['resources/sass/admin.scss', 'resources/js/app.js'])

    <script>
        // 자바스크립트에서 사용하는 전역변수 선언
        var BASE_URL = "{{ BASE_URL }}";
        var FULL_URL = "{{ FULL_URL }}";
        var ADMIN_URL = "{{ ADMIN_URL }}";
        var CHARSET = "{{ CHARSET }}";
        var DATE = "{{ DATE }}";
        var DATETIME = "{{ DATETIME }}";
        var IP_ADDRESS = "{{ IP_ADDRESS }}";
        var REFERER = "{{ REFERER }}";
        var USER_AGENT = "{{ USER_AGENT }}";
        var DEVICE = "{{ DEVICE }}";
        var PLATFORM = "{{ PLATFORM }}";
        var BROWSER = "{{ BROWSER }}";
        var IS_USER = {{ IS_USER }};
        var IS_ADMIN = {{ IS_ADMIN }};
        var IS_FRONT = 1;
        var CSRF = "{{ csrf_token() }}";
    </script>

    <!--[if lt IE 9]>
    <script src="{{ asset('js/common/html5shiv.min.js') }}" defer></script>
    <script src="{{ asset('js/common/respond.min.js') }}" defer></script>
    <script src="{{ asset('js/common/ie8-responsive-file-warning.js') }}" defer></script>
    <![endif]-->

    <script src="/js/common/common.js"></script>
    <script src="/js/admin.js"></script>
    <script src="/js/common/jquery.validate.extension.js" defer></script>
</head>
<body>
    @yield('content')

    {{-- 처리중 1 --}}
    <div id="loading">
        <figure class="figure">
            <img src="/images/default/loading.gif" class="figure-img img-fluid"/>
            <figcaption class="figure-caption">처리 중...</figcaption>
        </figure>
    </div>

    @stack('scripts')

    @if(Session::has('message'))
        <script>alert(("{!! addslashes(Session::get('message')) !!}"));</script>
    @endif
    @if ($errors->any())
        <script>alert(("{{ addslashes($errors->first()) }}"));</script>
    @endif
</body>
</html>
