@extends('EcomAuthViews::layouts.authentication.layout')

@section('content')
@php
    $country_code = country()->code();

@endphp

                    <form class="twa-form" action="{{route('account-reset-password-post')}}" method="POST">
                        @component('EcomGeneralViews::components.form.input', [ "parentClass" => "", "size" => "full", "type" => "text", "label" =>"" ])
                            <a class="back-button" href="javascript:;" onclick="history.back()"><b><i class="fa-solid fa-arrow-left"></i> &nbsp; Back</b></a>
                        @endcomponent
                        @csrf
                        <input type="hidden" name="type" value="{{$type}}">
                        @switch($type)
                            @case('phone')
                                @component('EcomGeneralViews::components.form.input', [ "parentClass" => "", "size" => "full", "type" => "text", "label" => ___('authentication.phone_number') ])
                                    <input class="phone-field" required
                                           data-custom-container="" data-allow-dropdown="true"
                                           data-autohide-dialcode="true" data-format="true" data-national-mode="true" placeholder=" "
                                           name="phone" data-initial-country="{{$country_code}}"

                                           @if(isset($phone_value) && $phone_value != '') value="{{$phone_value}}" @else  value="" @endif
                                    />
                                    <input type="hidden" name="phone_country_code" class="phone_country_code" value="" />
                                @endcomponent

                                @break

                            @case('email')
                                @component('EcomGeneralViews::components.form.input', [ "parentClass" => "", "size" => "full", "type" => "text", "label" => ___('authentication.email') ])
                                    <input name="email" required placeholder="{{ ___('authentication.email') }}"></input>
                                @endcomponent
                                @break

                        @endswitch
                        @component('EcomGeneralViews::components.form.input', [ "parentClass" => "", "size" => "full", "type" => "submit", "label" => "" ])
                            <input type="submit" value="{{ ___('authentication.continue') }}" />
                        @endcomponent
                    </form>


@endsection
@section('scripts')

   <script>
       $( document ).ready(function() {

           AUTHENTICATION_InitCodeGroup('code-input-group');
       });




   </script>

@endsection
