@page "/admin/inquiries/{id:int}"
@model TaxBaik.Web.Pages.Admin.Inquiries.DetailModel
@{ ViewData["Title"] = "문의 상세"; }

<section class="admin-page-shell">
    @await Html.PartialAsync("_AdminPageHeader", new TaxBaik.Web.Models.AdminPageHeaderModel("Customer Requests", "문의 상세", "문의 요청과 처리 내역을 확인합니다.", null, null))

    @if (Model.Inquiry is null)
    {
        @await Html.PartialAsync("_EmptyState", "문의 정보를 찾을 수 없습니다.")
    }
    else
    {
        <div class="row g-4">
            <div class="col-lg-8">
                <div class="card">
                    <div class="card-body">
                        <dl class="row details-grid mb-0">
                            <dt class="col-sm-3">이름</dt>
                            <dd class="col-sm-9">@Model.Inquiry.Name</dd>
                            <dt class="col-sm-3">전화</dt>
                            <dd class="col-sm-9">@Model.Inquiry.Phone</dd>
                            <dt class="col-sm-3">이메일</dt>
                            <dd class="col-sm-9">@Model.Inquiry.Email</dd>
                            <dt class="col-sm-3">서비스</dt>
                            <dd class="col-sm-9">@Model.Inquiry.ServiceType</dd>
                            <dt class="col-sm-3">상태</dt>
                            <dd class="col-sm-9">@await Html.PartialAsync("_StatusBadge", Model.Inquiry.Status)</dd>
                            <dt class="col-sm-3">메시지</dt>
                            <dd class="col-sm-9"><div class="pre-wrap">@Model.Inquiry.Message</div></dd>
                            <dt class="col-sm-3">관리 메모</dt>
                            <dd class="col-sm-9">@Model.Inquiry.AdminMemo</dd>
                            <dt class="col-sm-3">등록일</dt>
                            <dd class="col-sm-9">@Model.Inquiry.CreatedAt.ToString("yyyy-MM-dd HH:mm")</dd>
                            <dt class="col-sm-3">수정일</dt>
                            <dd class="col-sm-9">@Model.Inquiry.UpdatedAt?.ToString("yyyy-MM-dd HH:mm")</dd>
                        </dl>
                    </div>
                </div>
            </div>
            <div class="col-lg-4">
                <div class="card">
                    <div class="card-body d-grid gap-2">
                        <a class="btn btn-primary" href="/admin/inquiries/@Model.Inquiry.Id/edit">수정</a>
                        <form method="post" asp-page-handler="Delete" onsubmit="return confirm('정말 삭제하시겠습니까?');">
                            <button class="btn btn-outline-danger w-100" type="submit">삭제</button>
                        </form>
                        <a class="btn btn-outline-secondary" href="/admin/inquiries">목록</a>
                    </div>
                </div>
            </div>
        </div>
    }
</section>









