@extends('layouts.app')

@section('title', __('app.two_factor_auth'))

@section('content')
<div class="login-box">
    <div class="login-logo">
        <a href="#"><b>{{ __('app.clinic_management_system') }}</b></a>
    </div>
    <!-- /.login-logo -->
    <div class="card">
        <div class="card-body login-card-body">
            <p class="login-box-msg">{{ __('app.two_factor_auth') }}</p>

            <form action="{{ route('2fa.challenge') }}" method="POST">
                @csrf
                <div class="input-group mb-3">
                    <input type="text" name="code" class="form-control @error('code') is-invalid @enderror" placeholder="{{ __('app.verify_code') }}" required autofocus autocomplete="one-time-code">
                    <div class="input-group-append">
                        <div class="input-group-text">
                            <span class="fas fa-shield-alt"></span>
                        </div>
                    </div>
                    @error('code')
                        <span class="invalid-feedback" role="alert">
                            <strong>{{ $message }}</strong>
                        </span>
                    @enderror
                </div>
                <div class="row">
                    <div class="col-12">
                        <button type="submit" class="btn btn-primary btn-block">{{ __('app.verify_and_enable') }}</button>
                    </div>
                    <!-- /.col -->
                </div>
            </form>

            <p class="mt-3 mb-0 text-center">
                <small>{{ __('app.enter_code_from_app') }}</small>
            </p>
        </div>
        <!-- /.login-card-body -->
    </div>
</div>
<!-- /.login-box -->
@endsection
