import { z } from 'zod'; /** * A background picture the window may show. `key` is what the settings store for a fixed choice: * `official:` for a website wallpaper, `game:` for a picture of the game copy. */ export const BackgroundPictureSchema = z.object({ key: z.string(), source: z.enum(['official', 'game']), /** The nation for game pictures (translated by the window), the picture name for wallpapers. */ label: z.string(), url: z.string(), thumbnailUrl: z.string(), }); export type BackgroundPicture = z.output; export const BACKGROUND_RANDOM = 'random'; export const BackgroundChoiceSchema = z.string().regex(/^(random|game:[a-z]+|official:[0-9a-f]{24})$/);