@model foundation_system.Models.CargoColaborador

@{
    ViewData["Title"] = "Editar Cargo";
}

<div class="container-fluid">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card shadow mb-4">
                <div class="card-header py-3 d-flex justify-content-between align-items-center">
                    <h6 class="m-0 font-weight-bold text-primary">@ViewData["Title"]: @Model.Nombre</h6>
                    <a asp-action="Index" class="btn btn-sm btn-secondary">
                        <i class="bi bi-arrow-left"></i> Volver
                    </a>
                </div>
                <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 del Cargo</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="Descripcion" class="form-label">Descripción</label>
                            <textarea asp-for="Descripcion" class="form-control" rows="3"></textarea>
                            <span asp-validation-for="Descripcion" class="text-danger"></span>
                        </div>

                        <div class="mb-3">
                            <div class="form-check form-switch">
                                <input class="form-check-input" type="checkbox" asp-for="Activo">
                                <label class="form-check-label" asp-for="Activo">Activo</label>
                            </div>
                        </div>

                        <div class="mt-4 text-end">
                            <button type="submit" class="btn btn-primary px-4">
                                <i class="bi bi-save me-2"></i>Guardar Cambios
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

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