@page "/admin/inquiries/{id:int}/edit"
@model TaxBaik.Web.Pages.Admin.Inquiries.EditModel
@{ ViewData["Title"] = "문의 수정"; }

<section class="admin-page-shell">
    @await Html.PartialAsync("_AdminPageHeader", new TaxBaik.Web.Models.AdminPageHeaderModel("Customer Requests", "문의 수정", "문의 내용을 수정하고 상태를 갱신합니다.", null, null))

    <form method="post" class="card">
        <div class="card-header d-flex flex-wrap align-items-center justify-content-between gap-2">
            <div>
                <div class="text-muted small text-uppercase mb-1">불러온 원본</div>
                <div class="fw-semibold">@Model.Input.Name</div>
                <div class="text-muted small">@Model.Input.Phone / @Model.Input.ServiceType</div>
            </div>
            <span class="badge bg-secondary-lt text-secondary">원본 확인 후 수정</span>
        </div>
        <div class="card-body">
            @await Html.PartialAsync("_ValidationSummary")
            <input type="hidden" asp-for="Id" />
            <div class="row g-3">
                <div class="col-md-6">
                    <label asp-for="Input.Name" class="form-label"></label>
                    <input asp-for="Input.Name" class="form-control" />
                </div>
                <div class="col-md-6">
                    <label asp-for="Input.Phone" class="form-label"></label>
                    <input asp-for="Input.Phone" class="form-control" />
                </div>
                <div class="col-md-6">
                    <label asp-for="Input.Email" class="form-label"></label>
                    <input asp-for="Input.Email" class="form-control" />
                </div>
                <div class="col-md-6">
                    <label asp-for="Input.ServiceType" class="form-label"></label>
                    <input asp-for="Input.ServiceType" class="form-control" />
                </div>
                <div class="col-md-6">
                    <label asp-for="Input.Status" class="form-label"></label>
                    <input asp-for="Input.Status" class="form-control" />
                </div>
                <div class="col-12">
                    <label asp-for="Input.Message" class="form-label"></label>
                    <textarea asp-for="Input.Message" class="form-control" rows="8"></textarea>
                </div>
                <div class="col-12">
                    <label asp-for="Input.AdminMemo" class="form-label"></label>
                    <textarea asp-for="Input.AdminMemo" class="form-control" rows="4"></textarea>
                </div>
            </div>
        </div>
        <div class="card-footer d-flex justify-content-between gap-2">
            <button class="btn btn-outline-danger" type="submit" formaction="?handler=Delete" formmethod="post" onclick="return confirm('정말 삭제하시겠습니까?');">삭제</button>
            <div class="d-flex gap-2">
                <a class="btn btn-outline-secondary" href="/admin/inquiries/@Model.Id">취소</a>
                <button class="btn btn-primary" type="submit">저장</button>
            </div>
        </div>
    </form>
</section>









