@model Slide
@{
    ViewData["Title"] = $"Delete: {Model.Name}";
}

<div class="row justify-content-center">
    <div class="col-md-6">
        <div class="card border-danger">
            <div class="card-header bg-danger text-white">
                <h5 class="mb-0"><i class="bi bi-exclamation-triangle me-2"></i>Confirm Deletion</h5>
            </div>
            <div class="card-body">
                <p>Are you sure you want to delete the meow <strong>"@Model.Name"</strong>?</p>
                @if (Model.DeviceSlides.Any())
                {
                    <div class="alert alert-warning">
                        <i class="bi bi-exclamation-circle me-1"></i>
                        This slide is currently assigned to:
                        @foreach (var ds in Model.DeviceSlides) { <span class="badge bg-secondary">@ds.Device.Name</span> }
                        <br />It will be removed from all device playlists.
                    </div>
                }
                <p class="text-muted">This action cannot be undone.</p>
                <form asp-action="Delete" method="post">
                    @Html.AntiForgeryToken()
                    <div class="d-flex gap-2">
                        <button type="submit" class="btn btn-danger"><i class="bi bi-trash me-1"></i>Delete</button>
                        <a href="/admin/slides" class="btn btn-outline-secondary">Cancel</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
