import type { LauncherServiceView, MediaKind } from "./types";

export const DEFAULT_AMBIENT_MEDIA = "/storage/default.gif";
export const DEFAULT_AMBIENT_MEDIA_KIND: MediaKind = "gif";

export function resolveAmbientMedia(service?: LauncherServiceView): { src: string; kind: MediaKind } {
  return {
    src: service?.media.ambientVideo ?? DEFAULT_AMBIENT_MEDIA,
    kind: service?.media.ambientKind ?? DEFAULT_AMBIENT_MEDIA_KIND,
  };
}
