@page
@model TaxBaik.Web.Pages.Admin.Faqs.CreateModel
@{ ViewData["Title"] = "FAQ 작성"; }

<section class="admin-page-shell">
    @await Html.PartialAsync("_AdminPageHeader", new TaxBaik.Web.Models.AdminPageHeaderModel("Support", "FAQ 작성", "Tabler 표준 폼으로 FAQ를 등록합니다.", null, null))

    <form method="post" class="card">
        <div class="card-body">
            @await Html.PartialAsync("_ValidationSummary")
            <div class="row g-3">
                <div class="col-lg-8">
                    <label asp-for="Input.Question" class="form-label"></label>
                    <input asp-for="Input.Question" class="form-control" />
                </div>
                <div class="col-lg-4">
                    <label asp-for="Input.Category" class="form-label"></label>
                    <input asp-for="Input.Category" class="form-control" list="faq-categories" />
                    <datalist id="faq-categories">
                        @foreach (var category in Model.Categories)
                        {
                            <option value="@category"></option>
                        }
                    </datalist>
                </div>
                <div class="col-12">
                    <label asp-for="Input.Answer" class="form-label"></label>
                    <textarea asp-for="Input.Answer" class="form-control" rows="10"></textarea>
                </div>
                <div class="col-md-4">
                    <label asp-for="Input.SortOrder" class="form-label"></label>
                    <input asp-for="Input.SortOrder" class="form-control" type="number" />
                </div>
                <div class="col-12">
                    <label class="form-check">
                        <input asp-for="Input.IsActive" class="form-check-input" type="checkbox" />
                        <span class="form-check-label">활성</span>
                    </label>
                </div>
            </div>
        </div>
        <div class="card-footer d-flex justify-content-end gap-2">
            <a class="btn btn-outline-secondary" href="/admin/faqs">취소</a>
            <button class="btn btn-primary" type="submit">저장</button>
        </div>
    </form>
</section>









