<?= $this->extend('admin/template/template') ?>

<?= $this->section('content') ?>
<section>
<div class="container-fluid">
<div class="row justify-content-center">
	<div class="col-md-10 shadow rounded-bottom p-5">
        <!-- > Breadcrumb -->
		<nav style="--bs-breadcrumb-divider: url(&#34;data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='%236c757d'/%3E%3C/svg%3E&#34;);" aria-label="breadcrumb">
			<ol class="breadcrumb">
				<li class="breadcrumb-item"><?=anchor('/','Painel')?></li>
				<li class="breadcrumb-item"><?=anchor('/produto','Produtos')?></li>
				<li class="breadcrumb-item active" aria-current="page">Cadastrar</li>
			</ol>
		</nav>
		<!-- # end breadcrumb -->
		<!-- > Conteudo -->
		<h2>Cadastre um novo produto do sistema</h2>
		<?php
		$validation = \Config\Services::validation();
		echo form_open('produto/cadastra', 'class="row"');
			echo '<div class="col-md-6">';
			// input name
			echo form_label(' ','input_name');
			echo form_input('input_name', set_value('input_name'),'class="form-control" placeholder="Nome do Produto"');
			// <!-- name Error -->
			if($validation->getError('input_name')) { ?>
				<div class='alert alert-danger mt-2'>
				  <?= $validation->getError('input_name'); ?>
				</div><?php 
			}
			echo '</div>';
			echo '<div class="col-md-3">';
			// input valor
			echo form_label(' ','input_valor');
			echo form_input('input_valor',set_value('input_valor'),'class="form-control" placeholder="Valor setup"');
			// <!-- valor Error -->
			if($validation->getError('input_valor')) { ?>
				<div class='alert alert-danger mt-2'>
				  <?= $validation->getError('input_valor'); ?>
				</div><?php 
			}
			echo '</div>';
			echo '<div class="col-md-3">';
			// input valor mensal
			echo form_label(' ','input_valor_mensal');
			echo form_input('input_valor_mensal',set_value('input_valor_mensal'),'class="form-control" placeholder="Valor mensal"');
			// <!-- valor mensal Error -->
			if($validation->getError('input_valor_mensal')) { ?>
				<div class='alert alert-danger mt-2'>
				  <?= $validation->getError('input_valor_mensal'); ?>
				</div><?php 
			}
			echo '</div>';
			echo '<div class="mt-3">';
			echo form_submit('enviar','Cadastrar','class="btn btn-primary w-100');
			echo '</div>';
		echo form_close();
		?>
	</div>
</div>
</div>
</section>
<?= $this->endSection() ?>