// The playback-cost classes and their dot tints, shared by the Plex cards (plexCards) and the info // page's playback chip (PlexInfo). Its own module so plexCards exports only components (Fast Refresh). // Playback cost, escalating good→heavy: Direct Play (green) → Direct Stream / remux, a light // repackage (blue) → Transcode · HW, a hardware re-encode (amber) → Transcode · SW, a software // re-encode (red). transcode splits HW vs SW by card.transcode_hw. Reuses the semantic tokens as a // gradient; all four stay visually distinct in light + dark. export const PLAYABLE_TINT: Record = { direct: "bg-success", remux: "bg-info", transcode_hw: "bg-warn", transcode_sw: "bg-danger", }; // Collapse the wire `playable` (direct|remux|transcode) + transcode_hw flag into one of the 4 display // classes, so the corner dot's colour + tooltip can't drift from the sidebar filter's option keys. // Shared with the info-page playback chip (PlexInfo) so both surfaces derive the class identically. export function playableClass(playable: string, transcodeHw?: boolean | null): string { if (playable === "transcode") return transcodeHw ? "transcode_hw" : "transcode_sw"; return playable; // direct | remux }