@page "{runId}"
@model QuantEngine.Web.Pages.Admin.Collection.SnapshotsModel
@{
    ViewData["Title"] = "수집 스냅샷 - " + Model.RunId;
}

<div class="page-header d-print-none">
    <div class="row align-items-center">
        <div class="col">
            <h2 class="page-title">수집 스냅샷: @Model.RunId</h2>
        </div>
        <div class="col-auto">
            <a href="/Admin/Collection" class="btn btn-secondary">목록으로</a>
        </div>
    </div>
</div>

<div class="page-body">
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">스냅샷 목록 (@Model.Snapshots?.Count ?? 0)</h3>
        </div>
        <div class="table-responsive">
            <table class="table table-vcenter card-table table-sm">
                <thead>
                    <tr>
                        <th>티커</th>
                        <th>데이터셋</th>
                        <th>소스</th>
                        <th>수집 시간</th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model.Snapshots?.Any() == true)
                    {
                        @foreach (var snapshot in Model.Snapshots.Take(50))
                        {
                            <tr>
                                <td><strong>@snapshot.Ticker</strong></td>
                                <td>@snapshot.DatasetName</td>
                                <td><span class="badge bg-blue">@snapshot.SourceName</span></td>
                                <td>@snapshot.CapturedAt</td>
                            </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="4" class="text-center text-muted">스냅샷이 없습니다</td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
        @if (Model.Snapshots?.Count > 50)
        {
            <div class="card-footer text-muted">
                처음 50개만 표시됩니다 (전체: @Model.Snapshots.Count)
            </div>
        }
    </div>
</div>
