@model ProjectEditViewModel
@{
    ViewData["Title"] = Model.ProjectID == 0 ? "New Project" : "Edit Project";
}

<div class="page-heading compact">
    <div>
        <p class="eyebrow">Project / Series</p>
        <h1>@ViewData["Title"] <help-icon key="projectSettings.overview" /></h1>
    </div>
    <a class="btn btn-outline-secondary" asp-action="Index">Back to projects</a>
</div>

<form asp-action="Save" method="post" class="edit-panel">
    <input asp-for="ProjectID" type="hidden" />
    <div asp-validation-summary="ModelOnly" class="text-danger"></div>
    <div class="mb-3">
        <label asp-for="ProjectName" class="form-label"></label>
        <input asp-for="ProjectName" class="form-control" />
        <span asp-validation-for="ProjectName" 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="5"></textarea>
    </div>
    @if (Model.ProjectID == 0)
    {
        <div class="mb-3">
            <label asp-for="GenreMetricPresetKey" class="form-label">Genre / Metric Preset <help-icon key="projects.fields.genreMetricPreset" mode="inline" /></label>
            <select asp-for="GenreMetricPresetKey" asp-items="Model.GenreMetricPresetOptions" class="form-select"></select>
            <div class="form-text">Choose a starting set of scene metrics for this project. You can adjust timeline metrics later in Timeline Settings.</div>
        </div>
    }
    <button class="btn btn-primary" type="submit">Save project</button>
</form>

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