/**
 * Generic strings that could be used throughout the app.
 *
 * See also ../libs/veramo/setup.ts
 */
export enum AppString {
  PROD_ENDORSER_API_SERVER = "https://api.endorser.ch",
  TEST_ENDORSER_API_SERVER = "https://test-api.endorser.ch",
  LOCAL_ENDORSER_API_SERVER = "http://localhost:3000",

  PROD_PUSH_SERVER = "https://timesafari.app",
  TEST1_PUSH_SERVER = "https://test.timesafari.app",
  TEST2_PUSH_SERVER = "https://timesafari-pwa.anomalistlabs.com",

  PROD_IMAGE_API_SERVER = "https://image-api.timesafari.app",
  TEST_IMAGE_API_SERVER = "https://test-image-api.timesafari.app",
  LOCAL_IMAGE_API_SERVER = "http://localhost:3001",

  NO_CONTACT_NAME = "(no name)",
}

export const DEFAULT_ENDORSER_API_SERVER =
  import.meta.env.VITE_DEFAULT_ENDORSER_API_SERVER ||
  AppString.TEST_ENDORSER_API_SERVER;

export const DEFAULT_IMAGE_API_SERVER =
  import.meta.env.VITE_DEFAULT_IMAGE_API_SERVER ||
  AppString.TEST_IMAGE_API_SERVER;

export const DEFAULT_PUSH_SERVER =
  window.location.protocol + "//" + window.location.host;

export const IMAGE_TYPE_PROFILE = "profile";

/**
 * The possible values for "group" and "type" are in App.vue.
 * From the notiwind package
 */
export interface NotificationIface {
  group: string; // "alert" | "modal"
  type: string; // "toast" | "info" | "success" | "warning" | "danger"
  title: string;
  text?: string;
  onCancel?: (stopAsking: boolean) => Promise<void>;
  onNo?: (stopAsking: boolean) => Promise<void>;
  onYes?: () => Promise<void>;
  promptToStopAsking?: boolean;
}
