// Frontend type layer.
//
// Wire types are the single source of truth, generated from Rust by tauri-specta
// in ./bindings.ts. This module re-exports them under the names the frontend uses
// and adds frontend-only unions/helpers that have no backend equivalent.

export type {
  ArtistItem,
  AuthResult,
  Genre,
  GetItemsOptions,
  ImageOptions,
  ImageType,
  Library,
  LiveStreamInfo,
  MediaItem,
  MediaSource,
  MediaStream,
  Person,
  PlaybackInfo,
  PlaylistCreatedResult,
  PlaylistEntry,
  PlayState,
  SearchOptions,
  SearchResult,
  ServerInfo,
  User,
  UserData,
} from "./bindings";

import type { SessionInfo } from "./bindings";

// The frontend's "Session" is the backend remote-control session (SessionInfo).
// (Note: bindings also has a `Session` type — that's the auth/login session, a
// different concept — so we alias explicitly here rather than re-export it.)
export type Session = SessionInfo;

// ---------------------------------------------------------------------------
// Frontend-only types (not part of the Rust command surface)
// ---------------------------------------------------------------------------

export type ItemType =
  | "Movie"
  | "Series"
  | "Season"
  | "Episode"
  | "MusicAlbum"
  | "MusicArtist"
  | "Audio"
  | "Playlist"
  | "Folder"
  | "CollectionFolder"
  | "Channel"
  | "ChannelFolderItem"
  | "TvChannel"
  | "Person";

export type LibraryType =
  | "movies"
  | "tvshows"
  | "music"
  | "books"
  | "photos"
  | "homevideos"
  | "boxsets"
  | "playlists"
  | "channels"
  | "livetv"
  | "unknown";

export type PersonType =
  | "Actor"
  | "Director"
  | "Writer"
  | "Producer"
  | "Composer"
  | "GuestStar"
  | "Creator"
  | "Conductor"
  | "Lyricist";

export type SessionCommand =
  | "PlayPause"
  | "Stop"
  | "Pause"
  | "Unpause"
  | "NextTrack"
  | "PreviousTrack"
  | "Mute"
  | "Unmute";
