@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">
                        <div class="item-nav lang">
                            <div class="dropdown">
                                <span class="dropdown-trigger" data-bs-toggle="dropdown">
                                    @if(app()->getLocale() == 'ru')
                                        RU <img src="{{asset('img/ru.png')}}" alt="ru">
                                    @elseif(app()->getLocale() == 'kz')
                                        KZ <img src="{{asset('img/kz.png')}}" alt="kz">
                                    @elseif(app()->getLocale() == 'en')
                                        EN <img src="{{asset('img/en.png')}}" alt="en">
                                    @endif
                                </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) }}">RU
                                                <img src="{{asset('img/ru.png')}}" alt="ru"></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) }}">KZ
                                                <img src="{{asset('img/kz.png')}}" alt="kz"></a>
                                        </li>
                                    @endif
                                    @if(app()->getLocale() != \A7kz\Platform\Enums\Languages::En)
                                        <li><a class="dropdown-item"
                                               href="{{ \A7kz\Platform\Modules\Platform\Translate\Helpers\TranslateHelper::changeUrlLanguage(\A7kz\Platform\Enums\Languages::En) }}">EN
                                                <img src="{{asset('img/en.png')}}" alt="en"></a>
                                        </li>
                                    @endif
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <img src="{{asset('img/logo.png')}}" 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="reset-container">
                    @if (Route::has('password.request'))
                        <a class="btn btn-link" href="{{ lurl('/password/reset') }}">
                            {{ __('Забыли пароль?') }}
                        </a>
                    @endif
                </div>
                <div class="d-flex align-items-center justify-content-between">
                    <button type="submit" class="btn btn-success">
                        {{ __('Войти') }}
                    </button>
                </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">
                    <a class="header-phone" href="tel:87763504141"><i class="bi bi-telephone-fill"></i> +7 776 350 41 41</a>
                </div>
                <div class="line"></div>
            </div>
        </div>
    </div>
@endsection
