@extends('shop.layout')
@section('title', __('portal.shop.register'))
@section('content')

<div style="max-width:420px;margin:0 auto;">
    <h1 style="font-size:22px;margin-bottom:16px;">{{ __('portal.shop.register_title') }}</h1>

    @if ($errors->any())
        <div class="card" style="border-color:#fca5a5;background:#fef2f2;margin-bottom:14px;">
            <ul style="margin:0;padding-left:18px;color:#991b1b;font-size:14px;">
                @foreach ($errors->all() as $e)<li>{{ $e }}</li>@endforeach
            </ul>
        </div>
    @endif

    <form method="POST" action="/shop/register" class="card">
        @csrf
        <div class="field"><label>{{ __('portal.common.name') }} *</label>
            <input type="text" name="name" value="{{ old('name') }}" required>
        </div>
        <div class="field"><label>{{ __('portal.shop.phone_req') }}</label>
            <input type="text" name="phone" value="{{ old('phone') }}" required placeholder="+373…">
        </div>
        <div class="field"><label>{{ __('portal.common.email') }}</label>
            <input type="email" name="email" value="{{ old('email') }}">
        </div>
        <div class="field"><label>{{ __('portal.common.password') }} *</label>
            <input type="password" name="password" required minlength="6">
        </div>
        <div class="field"><label>{{ __('portal.invitation.confirm_password') }} *</label>
            <input type="password" name="password_confirmation" required minlength="6">
        </div>
        <button type="submit" class="btn block">{{ __('portal.shop.register_button') }}</button>
    </form>

    <p class="muted" style="text-align:center;margin-top:12px;">
        {{ __('portal.shop.have_account') }} <a href="/shop/login" style="color:inherit;text-decoration:underline;">{{ __('portal.shop.login') }}</a>
    </p>
</div>
@endsection
