@model SceneMetricTypeEditViewModel
@{
    ViewData["Title"] = "Edit Scene Metric";
}

<div class="page-heading compact">
    <div>
        <p class="eyebrow">Project Settings</p>
        <h1>Edit scene metric</h1>
    </div>
    <a class="btn btn-outline-secondary" asp-action="Index" asp-route-projectId="@Model.ProjectID">Back to metrics</a>
</div>

<form asp-action="Save" method="post" class="edit-panel">
    <input asp-for="MetricTypeID" type="hidden" />
    <input asp-for="ProjectID" type="hidden" />
    <div asp-validation-summary="ModelOnly" class="text-danger"></div>

    <div class="mb-3">
        <label asp-for="MetricName" class="form-label"></label>
        <input asp-for="MetricName" class="form-control" />
        <span asp-validation-for="MetricName" class="text-danger"></span>
    </div>
    <div class="mb-3">
        <label asp-for="Description" class="form-label"></label>
        <textarea asp-for="Description" class="form-control" rows="3"></textarea>
    </div>
    <div class="row g-3">
        <div class="col-md-3">
            <label asp-for="MinValue" class="form-label"></label>
            <input asp-for="MinValue" class="form-control" />
            <span asp-validation-for="MinValue" class="text-danger"></span>
        </div>
        <div class="col-md-3">
            <label asp-for="MaxValue" class="form-label"></label>
            <input asp-for="MaxValue" class="form-control" />
            <span asp-validation-for="MaxValue" class="text-danger"></span>
        </div>
        <div class="col-md-3">
            <label asp-for="DefaultValue" class="form-label"></label>
            <input asp-for="DefaultValue" class="form-control" />
            <span asp-validation-for="DefaultValue" class="text-danger"></span>
        </div>
        <div class="col-md-3">
            <label asp-for="SortOrder" class="form-label"></label>
            <input asp-for="SortOrder" class="form-control" />
        </div>
    </div>
    <div class="form-check mt-3">
        <input asp-for="IsActive" class="form-check-input" />
        <label asp-for="IsActive" class="form-check-label"></label>
    </div>
    <div class="button-row mt-3">
        <button class="btn btn-primary" type="submit">Save Metric</button>
        <a class="btn btn-outline-secondary" asp-action="Index" asp-route-projectId="@Model.ProjectID">Cancel</a>
    </div>
</form>

@section Scripts {
    <partial name="_ValidationScriptsPartial" />
}
