@page "/admin/clients/{id:int}"
@model TaxBaik.Web.Pages.Admin.Clients.DetailModel
@{
    ViewData["Title"] = "고객 상세";
}

<section class="admin-page-shell">
    @await Html.PartialAsync("_AdminPageHeader", new TaxBaik.Web.Models.AdminPageHeaderModel("고객 관리", "고객 상세", "고객의 기본 정보와 수정 경로를 확인합니다.", null, null))

    @if (Model.Client 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.Client.Name</dd>
                            <dt class="col-sm-3">회사명</dt>
                            <dd class="col-sm-9">@Model.Client.CompanyName</dd>
                            <dt class="col-sm-3">전화</dt>
                            <dd class="col-sm-9">@Model.Client.Phone</dd>
                            <dt class="col-sm-3">이메일</dt>
                            <dd class="col-sm-9">@Model.Client.Email</dd>
                            <dt class="col-sm-3">상태</dt>
                            <dd class="col-sm-9">@await Html.PartialAsync("_StatusBadge", Model.Client.Status)</dd>
                            <dt class="col-sm-3">서비스 유형</dt>
                            <dd class="col-sm-9">@Model.Client.ServiceType</dd>
                            <dt class="col-sm-3">세금 유형</dt>
                            <dd class="col-sm-9">@Model.Client.TaxType</dd>
                            <dt class="col-sm-3">유입 경로</dt>
                            <dd class="col-sm-9">@Model.Client.Source</dd>
                            <dt class="col-sm-3">등록일</dt>
                            <dd class="col-sm-9">@Model.Client.CreatedAt.ToString("yyyy-MM-dd HH:mm")</dd>
                            <dt class="col-sm-3">수정일</dt>
                            <dd class="col-sm-9">@Model.Client.UpdatedAt.ToString("yyyy-MM-dd HH:mm")</dd>
                            <dt class="col-sm-3">메모</dt>
                            <dd class="col-sm-9">@Model.Client.Memo</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/clients/@Model.Client.Id/edit">수정</a>
                        <a class="btn btn-outline-secondary" href="/admin/clients">목록</a>
                    </div>
                </div>
            </div>
        </div>
    }
</section>









