@model foundation_system.Models.CategoriaGasto

@{
    ViewData["Title"] = "Editar Categoría de Gasto";
}

<div class="container-fluid">
    <div class="d-flex justify-content-between align-items-center mb-4">
        <h1 class="h3 mb-0 text-gray-800">@ViewData["Title"]</h1>
        <a asp-action="Index" class="btn btn-secondary">
            <i class="bi bi-arrow-left me-1"></i> Volver
        </a>
    </div>

    <div class="row">
        <div class="col-md-6">
            <div class="card shadow mb-4">
                <div class="card-body">
                    <form asp-action="Edit">
                        <div asp-validation-summary="ModelOnly" class="text-danger"></div>
                        <input type="hidden" asp-for="Id" />
                        <input type="hidden" asp-for="CreadoEn" />
                        
                        <div class="mb-3">
                            <label asp-for="Nombre" class="form-label">Nombre</label>
                            <input asp-for="Nombre" class="form-control" />
                            <span asp-validation-for="Nombre" class="text-danger"></span>
                        </div>
                        
                        <div class="mb-3">
                            <label asp-for="CodigoCuentaContable" class="form-label">Código Contable</label>
                            <input asp-for="CodigoCuentaContable" class="form-control" />
                            <span asp-validation-for="CodigoCuentaContable" class="text-danger"></span>
                        </div>
                        
                        <div class="mb-3 form-check">
                            <input class="form-check-input" asp-for="Activo" />
                            <label class="form-check-label" asp-for="Activo">
                                Activo
                            </label>
                        </div>
                        
                        <div class="d-grid">
                            <button type="submit" class="btn btn-primary">Guardar Cambios</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
