const w = window as any

export const go = {
  loadAllSettings: (): Promise<string> => w.loadAllSettings(),
  saveToggles: (data: Record<string, boolean>) => w.saveToggles(JSON.stringify(data)),
  saveLayout: (layout: string) => w.saveLayout(layout),
  saveZodiac: (zodiac: string) => w.saveZodiac(zodiac),
  saveCity: (cityId: string) => w.saveCity(cityId),
  saveWallpaperType: (type: string, theme: string) => w.saveWallpaperType(type, theme),
  pickLocalImage: (): Promise<string> => w.pickLocalImage(),
  enableBing: () => w.enableBing(),
  bingPrev: (): Promise<string> => w.bingPrev(),
  bingNext: (): Promise<string> => w.bingNext(),
  bingToggleFavorite: (): Promise<string> => w.bingToggleFavorite(),
  getBingInfo: (): Promise<string> => w.getBingInfo(),
  saveBingAutoRefresh: (val: boolean) => w.saveBingAutoRefresh(val),
  getBingFavorites: (): Promise<string> => w.getBingFavorites(),
  bingSetByIdx: (idx: number): Promise<string> => w.bingSetByIdx(idx),
  bingThumbDataURI: (filename: string): Promise<string> => w.bingThumbDataURI(filename),
  pickSolidColor: (): Promise<string> => w.pickSolidColor(),
  pickGradientColor: (): Promise<string> => w.pickGradientColor(),
  addSavedColor: (c1: string, c2: string, gradient: boolean) => w.addSavedColor(c1, c2, gradient),
  removeSavedColor: (idx: number): Promise<string> => w.removeSavedColor(idx),
  applySavedColor: (idx: number) => w.applySavedColor(idx),
  saveWallpaperText: (text: string) => w.saveWallpaperText(text),
  saveKnowledgeKeyword: (keyword: string) => w.saveKnowledgeKeyword(keyword),
  saveKnowledgePrompt: (prompt: string) => w.saveKnowledgePrompt(prompt),
  pickPhotoDir: (): Promise<string> => w.pickPhotoDir(),
  clearPhotoDir: () => w.clearPhotoDir(),
  savePhotoInterval: (val: number) => w.savePhotoInterval(val),
  resizeToFit: (w: number, h: number) => w.resizeToFit(w, h),
  saveAudioVizStyle: (style: string) => w.saveAudioVizStyle(style),
  saveAudioSensitivity: (val: number) => w.saveAudioSensitivity(val),
  saveAudioSmoothing: (val: number) => w.saveAudioSmoothing(val),
  saveAudioColorScheme: (scheme: string) => w.saveAudioColorScheme(scheme),
}
