@extends('admin.layouts.layout')

@section('title', 'Novo Menu')

@section('content')
    <div class="container-fluid">
        <div class="card shadow mb-4">
            <div class="card-header py-3">
                <h4 class="m-0 font-weight-bold text-primary">Alterando Menu</h4>
                <span>Alterando Menu</span>
                <a class="btn btn-outline-primary btn-block d-grid gap-2" type="button" href="{{ route('menus.index') }}"
                    role="button">Ver todos</a>
            </div>
            <div class="card">
                <div class="card-body">
                    <form action="" method="POST" class="form-horizontal">
                        @method('PUT')
                        @csrf
                        <div class="box box-info">

                            <div class="row">
                                <div class="form-group col-md-2">
                                    <label class="col-form-label">Tipo</label>
                                    <select name="menu_tipo" class="form-control @error('menu_tipo') is-invalid @enderror"
                                        value="">
                                        <option value="">Selecione</option>
                                        <option value="0">Menu</option>
                                        <option value="1">SubMenu</option>
                                    </select>
                                </div>
                                <div class="form-group col-md-10">
                                    <label class="col-form-label">Nome<span>*</span></label>
                                    <input type="text" name="menu_nome" value=""
                                        class="form-control">
                                </div>

                                <div class="form-group col-md-2">
                                    <label class="col-form-label">Ordem<span>*</span></label>
                                    <input type="text" name="menu_ordem" value="{{ old('menu_ordem') }}"
                                        class="form-control @error('menu_ordem') is-invalid @enderror">
                                </div>
                                <div class="form-group col-md-8">
                                    <label class="col-form-label">Url<span>*</span></label>
                                    <input type="text" name="menu_url" value="{{ old('menu_url') }}"
                                        class="form-control @error('menu_url') is-invalid @enderror">
                                </div>
                            </div>

                            <div class="form-group">
                                <button type="submit" class="btn btn-outline-success btn-sm btn-block"
                                    name="form1">Gravar</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
    </div>
    </div>

@endsection
