@model iyixiGames.Domain.DTOs.Games.GameResponse

@{
    ViewData["Title"] = "删除游戏 - " + Model.Name;
}

<div class="container mt-4">
    <h1>删除游戏</h1>
    <h3 class="text-danger mb-4">您确定要删除此游戏吗？此操作不可撤销。</h3>
    <hr />

    <div class="card shadow-sm mb-4">
        <div class="card-body">
            <h4 class="card-title">游戏信息</h4>
            <dl class="row mt-3">
                <dt class="col-sm-3">@Html.DisplayNameFor(model => model.Name)</dt>
                <dd class="col-sm-9">@Html.DisplayFor(model => model.Name)</dd>

                <dt class="col-sm-3">@Html.DisplayNameFor(model => model.Path)</dt>
                <dd class="col-sm-9">@Html.DisplayFor(model => model.Path)</dd>
                
                <dt class="col-sm-3">@Html.DisplayNameFor(model => model.Category)</dt>
                <dd class="col-sm-9">@(string.Join(", ", Model.Category))</dd>

                <dt class="col-sm-3">@Html.DisplayNameFor(model => model.Popularity)</dt>
                <dd class="col-sm-9">@Html.DisplayFor(model => model.Popularity)</dd>

                <dt class="col-sm-3">@Html.DisplayNameFor(model => model.AvgRating)</dt>
                <dd class="col-sm-9">@Html.DisplayFor(model => model.AvgRating)</dd>

                <dt class="col-sm-3">@Html.DisplayNameFor(model => model.ReleaseDate)</dt>
                <dd class="col-sm-9">@Html.DisplayFor(model => model.ReleaseDate)</dd>
            </dl>
        </div>
    </div>

    <form asp-action="Delete">
        <input type="hidden" asp-for="Id" /> @* 传递要删除的游戏ID *@
        <button type="submit" class="btn btn-danger">确认删除</button>
        <a asp-action="Index" class="btn btn-secondary ms-2">取消并返回列表</a>
    </form>
</div>