// Presentation helpers for the neutral MediaKind.
//
// MediaKind is the app's provider-neutral item classification (defined in Rust,
// generated into bindings). This module holds *display* concerns over it —
// human-readable labels — which are presentation, not domain, and so live in
// the frontend.

import type { MediaKind } from "$lib/api/types";

const KIND_LABELS: Record<MediaKind, string> = {
  track: "Song",
  album: "Album",
  artist: "Artist",
  playlist: "Playlist",
  movie: "Movie",
  series: "Series",
  season: "Season",
  episode: "Episode",
  person: "Person",
  channel: "Channel",
  liveChannel: "Live TV",
  channelItem: "Channel",
  folder: "Folder",
  other: "",
};

/** Human-readable label for a media kind (e.g. "Album"), or "" if unknown. */
export function kindLabel(kind: MediaKind | null | undefined): string {
  if (!kind) return "";
  return KIND_LABELS[kind] ?? "";
}
