<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <link rel="icon" href="{{ asset('favicon.ico') }}">

    <title>Inactivity Screen | Harsi Hoteleria</title>

    <!-- {{-- Barlow Font --}} -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link
        href="https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
        rel="stylesheet">

    {{-- Styles --}}
    <link rel="stylesheet" href="{{ asset('css/pages/particular/inactivityPage.css') }}">

    {{-- Bootstrap --}}
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
        integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous">
    </script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js"
        integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous">
    </script>

    {{-- JQuery --}}
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

    {{-- Tokens Management --}}
    <script type="text/javascript" src="{{ asset('js/environment/tokensManagement.js') }}"></script>

</head>

<body class="d-flex h-100 align-items-center">
    {{-- Content --}}
    <div class="py-3 col-4 bg-wall d-flex flex-column align-items-center justify-content-center">

        {{-- Harsi Hotelería --}}
        <p class="text-center mb-special harsi-name">Harsi Hotelería</p>

        {{-- Logo --}}
        @if (Auth::user()->profile_photo === null)
            <img src="{{ asset('images/only_harsi_bigger.png') }}" class="logo" alt="Harsi Logo" />
        @else
            <img src="{{ Auth::user()->profile_photo }}" class="logo" alt="Harsi Logo" />
        @endif

        {{-- Establecimiento --}}
        <div class="mb-special col">
            @php
                use App\Models\Environment\Business;
                $establecimiento = Business::first();
            @endphp

            <p class="mb-0 text-center harsi-system">{{ $establecimiento->business_name }}</p>
        </div>

        {{-- Buttons --}}
        <div class="text-center col-10">
            <ul class="list-group list-group-flush">
                {{-- Go Home --}}
                <li class="list-group-item">
                    <span class="pointer-cursor" onclick="window.location.href = `{{ route('home.index') }}`">
                        {{ __('redirection_actions')['go_home'] }}
                    </span>
                </li>

                {{-- Turn Back --}}
                <li class="list-group-item text-secondary">
                    <span class="pointer-cursor" onclick="window.history.back()">
                        {{ __('redirection_actions')['continue_activity'] }}
                    </span>
                </li>

                {{-- Log Out --}}
                <li class="list-group-item text-danger">
                    <span class="text-center pointer-cursor"
                        onclick="logoutUser(event)">
                        {{ __('session')['logout'] }}
                    </span>
                </li>

            </ul>
        </div>
    </div>

    {{-- Gif --}}
    <div class="col-8 bg-gif"> </div>

    {{-- Audits and Shift Control --}}
    @if (\App\Helpers\Environment\SystemModulesHelper::getModuleStatus('audits') && Auth::user()->role === "recepcionista")
        {{-- Import External Dependencies --}}
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>

        {{-- Import Hotel Settings Control --}}
        <script type="text/javascript" src="{{ asset('js/environment/hotelSettings.js') }}"></script>

        {{-- Import Audits and Shift Control --}}
        <script src="{{ asset('js/modules/receptionistAuditControl.js') }}"></script>
    @endif

</body>

</html>
