<?php $__env->startSection('titulo'); ?>
     Cadastro Tipo Veículo
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    <script src="<?php echo e(URL::asset('js/views/cadastro/tipo_veiculo.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('pagina'); ?>

<div class="content-wrapper">
    <div class="container-fluid mt-2">
        <div class="card rounded text-left" style="background-color:#fff; color:#056367; border-radius: 10px 10px 10px 10px;">
            <div class="card-body">
                <div class="row" >
                    <div class="col text-right">
                        <a href="<?php echo e(route('cadastro.tipoveiculo')); ?>" class="btn btn-outline-secondary"><i class="fas fa-arrow-left"></i><b> Voltar</b></a>
                    </div>
                </div>
            </div>
        </div>
        
        <form method="POST" action="<?php echo e(route('cadastro.tipoveiculo.salvar')); ?>">
        <?php echo csrf_field(); ?>
            <input type="hidden" name="id" <?php if(isset($tipoVeiculo)): ?> value="<?php echo e($id); ?>" <?php else: ?> value="" <?php endif; ?>/>
            <div class="card mt-2" style="background-color:#fff; color:#056367; border-radius: 10px 10px 10px 10px;">
                <div class="card-body">
                    <div class="row" >
                        <div class="col-md-6">
                            <label id="txtDescricao_label" for="txtDescricao"  class="col-form-label text-md-left">Descrição</label>
                            <input id="txtDescricao" class="form-control" name="descricao" type="text" maxlength="50" <?php if(isset($tipoVeiculo)): ?> value="<?php echo e($tipoVeiculo->getDescricao()); ?>" <?php endif; ?> required/>
                        </div>
                    </div>
                    <div class="row">
                        <div class="row mt-4 col-md-12">
                            <div class="col text-right">
                                <button id="btnSalvar" type="submit" class="btn btn-outline-success" aria-label="Left Align" >
                                <i class="far fa-save"></i><b> Salvar</b>
                                </button>
                                <?php if(isset($tipoVeiculo)): ?>
                                <button id="btnExcluir" type="button" data="<?php echo e($tipoVeiculo->getId()); ?>" class="btn btn-outline-danger" aria-label="Left Align" >
                                    <i class="fas fa-trash-alt"></i><b> Excluir</b>
                                </button>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

    <?php echo $__env->make('partials._modal_delete',
    [
        'rota'=>'cadastro.tipoveiculo.delete',
        'titulo'=>'Confirma Exclusão',
        'mensagem_delete'=>'Tem certeza que deseja excluir o Tipo de Veículo'
    ], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>