@extends('layouts.index')
@section('contenido')
<div class="content">
	<div class="card">
		<div class="card-header header-elements-inline">
			<h5 class="card-title">NUEVO PRODUCTO</h5>
			<div class="header-elements">
				<div class="list-icons">
				    <a class="list-icons-item" data-action="collapse"></a>
				</div>
			</div>
		</div>

		<div class="card-body">
			<form action="{{ route('productos.guardar') }}" method="POST">
                @csrf
                <fieldset>
                    <div class="collapse show">
                        <div class="form-group">
                            <label>Nombre del producto</label>
                            <input type="text" class="form-control" name="nombre" placeholder="">
                        </div>
                        <div class="form-group">
                            <label>Seleccione Laboratorio</label>
                            <select class="form-control" name="id_laboratorio">
                                @foreach ($laboratorios as $laboratorio)
                                    <option value="{{$laboratorio['id']}}">{{$laboratorio['nombre']}}</option>
                                @endforeach
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Seleccione Línea</label>
                            <select class="form-control" name="id_linea">
                                @foreach ($lineas as $linea)
                                    <option value="{{$linea['id']}}">{{$linea['nombre']}}</option>
                                @endforeach
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Seleccione Marca</label>
                            <select class="form-control" name="id_marca">
                                @foreach ($marcas as $marca)
                                    <option value="{{$marca['id']}}">{{$marca['nombre']}}</option>
                                @endforeach
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Seleccione Tipo</label>
                            <select class="form-control" name="id_tipo">
                                <option value="1">Venta</option>
                                <option value="2">Muestra Médica</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Seleccione Grupo Terapeutico</label>
                            <select class="form-control" name="id_grupo_terapeutico">
                                @foreach ($grupoTerapeuticos as $grupoTerapeutico)
                                    <option value="{{$grupoTerapeutico['id']}}">{{$grupoTerapeutico['nombre']}}</option>
                                @endforeach
                            </select>
                        </div>

                    </div>
                </fieldset>

				<div class="text-right">
					<button type="submit" class="btn btn-primary">Guardar producto<i class="icon-floppy-disk ml-2"></i></button>
				</div>
            </form>

		</div>
	</div>
</div>

@endsection

@section('javascript')
<script>
    jQuery( document ).ready(function() {

    });
</script>
@endsection
