export interface IConfiguration {
  site: string;
  sentry_dsn_js?: string;
  development_mode: boolean;
  automatic_migrations: boolean;
  webserver: IServerConfig;
  archive_server?: IArchiveServerConfig;
}

interface IServerConfig {
  ui: IUIConfig;
  port?: number;
  base_url?: string;
}

interface IUIConfig {
  home: IHomeConfig;
  config: { paysite_list: string[]; artists_or_creators: string };
  matomo?: IMatomoConfig;
  sidebar?: ISidebarConfig;
  sidebar_items: unknown[];
  footer_items?: unknown[];
  banner?: IBannerConfig;
  ads?: IAdsConfig;
  files_url_prepend?: {
    icons_base_url?: string;
    banners_base_url?: string;
    thumbnails_base_url?: string;
  };
}

interface IMatomoConfig {
  enabled: boolean;
  /**
   * b64-encoded string
   */
  plain_code: string;
  tracking_domain: string;
  tracking_code: string;
  site_id: string;
}

interface ISidebarConfig {
  disable_dms?: boolean;
  disable_faq?: boolean;
  disable_filehaus?: boolean;
}

interface IBannerConfig {
  /**
   * b64-encoded string
   */
  global?: string;
  /**
   * b64-encoded string
   */
  welcome?: string;
}

interface IHomeConfig {
  site_name?: string;
  mascot_path?: string;
  logo_path?: string;
  /**
   * b64-encoded string
   */
  welcome_credits?: string;
  home_background_image?: string;
  announcements?: { title: string; date: string; content: string }[];
}

interface IAdsConfig {
  /**
   * b64-encoded string
   */
  header: string;
  /**
   * b64-encoded string
   */
  middle: string;
  /**
   * b64-encoded string
   */
  footer: string;
  /**
   * b64-encoded string
   */
  slider: string;
  /**
   * Base64-encoded JSON list of objects.
   */
  video: string;
}

interface IArchiveServerConfig {
  enabled?: boolean;
  file_serving_enabled?: boolean
}
