@extends('shop::layouts.master')

@section('page_title')
    {{ __('shop::app.customer.login-form.page-title') }}
@endsection
@push('css')
<link rel="stylesheet" href="{{bagisto_asset('styles/service.css')}}" />
<link rel="stylesheet" href="{{bagisto_asset('styles/categories-tv.css')}}" />
<link rel="stylesheet" href="{{bagisto_asset('styles/cart.css')}}" />
<link rel="stylesheet" href="{{bagisto_asset('styles/delivery-desc.css')}}" />
@endpush
@section('content-wrapper')
    <div class="container">

        {!! view_render_event('bagisto.shop.customers.login.before') !!}

        <form method="POST" action="{{ route('customer.session.create') }}" @submit.prevent="onSubmit" class="description-form">

            {{ csrf_field() }}

            <div class="part-1" style="display: contents;">
                 <div class="login-text">{{ __('shop::app.customer.login-form.title') }}</div>

                {{-- {!! view_render_event('bagisto.shop.customers.login_form_controls.before') !!} --}}

                <div class="control-group" :class="[errors.has('email') ? 'has-error' : '']" style="margin-bottom: 25px;">
                    <h4 for="email" class="input-name">{{ __('shop::app.customer.login-form.email') }}</h4>
                    <input type="text" class="input-input" name="email" v-validate="'required|email'" value="{{ old('email') }}" data-vv-as="&quot;{{ __('shop::app.customer.login-form.email') }}&quot;">
                     <span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
                </div>

                <div class="control-group" :class="[errors.has('password') ? 'has-error' : '']" style="margin-bottom: 25px;">
                    <h4 for="password" class="input-name">{{ __('shop::app.customer.login-form.password') }}</h4>
                    <input type="password" v-validate="'required|min:6'" class="input-input" id="password" name="password" data-vv-as="&quot;{{ __('admin::app.users.sessions.password') }}&quot;" value=""/>
                     <span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
                </div>

                <div class="forgot-password-link">
                    <a href="{{ route('customer.forgot-password.create') }}">{{ __('shop::app.customer.login-form.forgot_pass') }}</a>

                    <div class="mt-10">
                        @if (Cookie::has('enable-resend'))
                            @if (Cookie::get('enable-resend') == true)
                                <a href="{{ route('customer.resend.verification-email', Cookie::get('email-for-resend')) }}">{{ __('shop::app.customer.login-form.resend-verification') }}</a>
                            @endif
                        @endif
                    </div>
                </div>

                <div class="control-group">

                    {!! Captcha::render() !!}

                </div>

                {!! view_render_event('bagisto.shop.customers.login_form_controls.after') !!}

                <input class="submit-button" type="submit" value="{{ __('shop::app.customer.login-form.button_title') }}">
            </div>

        </form>
        <div class="sign-up-text">
            {{ __('shop::app.customer.login-text.no_account') }} - <a href="{{ route('customer.register.index') }}">{{ __('shop::app.customer.login-text.title') }}</a>
        </div>
        {!! view_render_event('bagisto.shop.customers.login.after') !!}
    </div>
@stop

@push('scripts')
<script src="{{ bagisto_asset ('scripts/service.js') }}"></script>
{!! Captcha::renderJS() !!}

@endpush