@extends('layouts.app')

@section('content')
    <div class="log-reg-container">
        <div class="log-reg-content">
            <div class="d-flex justify-content-between">
                <div class="item-nav-lang">
                    <div class="dropdown">
                                <span class="dropdown-trigger" data-bs-toggle="dropdown">
                                    <i class="bi bi-translate"></i>
                                    {{__(app()->getLocale())}}
                                </span>
                        <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
                            @if(app()->getLocale() != \A7kz\Platform\Enums\Languages::Ru)
                                <li><a class="dropdown-item"
                                       href="{{ \A7kz\Platform\Modules\Platform\Translate\Helpers\TranslateHelper::changeUrlLanguage(\A7kz\Platform\Enums\Languages::Ru) }}"><span>@lang('ru')</span></a>
                                </li>
                            @endif
                            @if(app()->getLocale() != \A7kz\Platform\Enums\Languages::Kz)
                                <li><a class="dropdown-item"
                                       href="{{ \A7kz\Platform\Modules\Platform\Translate\Helpers\TranslateHelper::changeUrlLanguage(\A7kz\Platform\Enums\Languages::Kz) }}"><span>@lang('kz')</span></a>
                                </li>
                            @endif
                        </ul>
                    </div>
                </div>
                <img src="{{asset('img/logo.svg')}}" alt="logo" class="logo-log">
            </div>
            <form method="POST" action="{{ lurl('login') }}">
                @csrf
                <div class="form-group">
                    <label for="email" class="form-label">{{ __('Логин') }}</label>
                    <input id="email" type="text" name="email" value="{{ old('email') }}"
                           class="form-control @if(isset($error['email']) || isset($error['username'])) is-invalid @endif"
                           required autocomplete="email" autofocus>
                    @if(isset($error['email']))
                        <div class="invalid-feedback form-text text-danger"
                             role="alert">{{ $error['email'] }}</div>
                    @endif
                    @if(isset($error['username']))
                        <div class="invalid-feedback form-text text-danger"
                             role="alert">{{ $error['username'] }}</div>
                    @endif
                </div>

                <div class="form-group">
                    <label for="password" class="form-label">{{ __('Password') }}</label>
                    <input id="password" type="password" class="form-control @if(isset($error['password'])) is-invalid @endif"
                           name="password" required autocomplete="current-password">
                    @if(isset($error['password']))
                    <div class="invalid-feedback form-text text-danger" role="alert">{{ $error['password'] }}</div>
                    @endif
                </div>
                <div class="mb-3 form-check">
                    <input class="form-check-input" type="checkbox" name="remember"
                           id="remember" {{ old('remember') ? 'checked' : '' }}>
                    <label class="form-check-label" for="remember"> {{ __('Remember Me') }}</label>
                </div>

                <div class="d-flex align-items-center justify-content-center">
                    <button type="submit" class="btn btn-success">
                        {{ __('Войти') }}
                    </button>
                    @if (Route::has('password.request'))
                        <a class="btn btn-link" href="{{ lurl('/password/reset') }}">
                            {{ __('Forgot Your Password?') }}
                        </a>
                    @endif
                </div>
            </form>
            <div class="contact-us-wrapper d-flex flex-column justify-content-center align-items-center">
                <div class="phone-cont d-flex flex-column align-items-center mb-1">
                        <p>7 776 350 41 41<span>({{ __('звонок бесплатный') }})</span></p>
                </div>
                <div class="line"></div>
                <div class="d-flex flex-row justify-content-between" style="column-gap: 10px">
                    <div class="d-flex flex-column align-items-start justify-content-start">
                        <p><i class="bi bi-envelope-fill"></i> support@esep.kz</p>
                    </div>
                    <div class="d-flex flex-column align-items-end justify-content-center">
                        <p><i class="bi bi-clock-fill"></i> {{ __('Часы работы') }}</p>
                        <p>{{ __('ПН—ПТ') }} 9:00—18:00</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
