@extends('admin.layouts.layout')
@section('content')
    <section>
        <div class="row match-height">
            <div class="col-md-12 col-12">
                <div class="card">
                    <div class="card-header">
                        <h4 class="card-title text-primary">Cadstrado Usuário</h4>
                        <small class="text-muted">Cadastrando Usuários no Sistema</small>
                    </div>
                    <div class="card-body">

                        <a class="btn btn-outline-primary btn-sm w-100" type="button" href="{{ route('usuarios.index') }}"
                            role="button">Ver todos</a>
                    </div>
                    <div class="card-content">
                        <div class="card-body">
                            <form action="{{ route('usuarios.store') }}" method="POST" class="form-horizontal">
                                @csrf
                                <div class="box box-info">
                                    <div class="form-group">
                                        <label class="col-form-label">Nome completo</label>
                                        <input type="text" name="name" value="{{ old('name') }}"
                                            class="form-control @error('name') is-invalid @enderror">
                                    </div>
                                    <div class="form-group row">
                                        <div class="form-group col-md-3">
                                            <label class="col-form-label">E-mail</label>
                                            <input type="email" name="email" value="{{ old('email') }}"
                                                class="form-control @error('email') is-invalid @enderror">
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label class="col-form-label">Senha</label>
                                            <input type="password" name="password"
                                                class="form-control @error('password') is-invalid @enderror">
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label class="col-form-label">Confirme a senha</label>
                                            <input type="password" name="password_confirmation"
                                                class="form-control @error('password_confirmation') is-invalid @enderror">
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label class="col-form-label">Tipo</label>
                                            <select name="admin"
                                                class="form-control @error('admin') is-invalid @enderror">
                                                <option value="" selected>Selecione</option>
                                                <option value="0">0 - Administrador</option>
                                                <option value="1">1 - Publicador</option>
                                                <option value="2">2 - Licitacao</option>
                                            </select>
                                        </div>
                                    </div>
                                    <br>
                                    <div class="form-group">
                                        <input type="submit" value="Gravar" class="btn btn-outline-success w-100">
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    @endsection
