import * as _$i18next from "i18next"; import { Module, Newable, NewableModule, Resource, i18n as i18n$1 } from "i18next"; //#region src/util/rmg-types.d.ts declare enum RmgEnv { DEV = "DEV", UAT = "UAT", PRD = "PRD" } type RmgInstance = 'Org' | 'GitHub' | 'GitLab' | 'Tauri' | 'localhost' | 'unknown'; type RMNotificationType = 'info' | 'success' | 'warning' | 'error'; type RMNotification = { id: string; title: string; message: string; type: RMNotificationType; duration: number; source: string; }; //#endregion //#region src/util/types.d.ts type ChannelEventHandler = (data: T, frameId?: string) => void; //#endregion //#region src/service/settings.d.ts interface AllowAnalyticsResponse { refreshRequired: boolean; } //#endregion //#region src/service/i18n.d.ts type ResourceNode = string | { [key: string]: ResourceNode; }; declare class I18nBuilder { _appName: string; _lng: string | undefined; readonly _defaultResources: Resource; readonly _resources: Resource; constructor(); use(module: T | NewableModule | Newable): I18nBuilder; withAppName(appName: string): I18nBuilder; withLng(lng: string): I18nBuilder; withDefaultResource(resource: Record>): I18nBuilder; withResource(lang: string, additionalResource: Record): I18nBuilder; combineResource(): Resource; build(): i18n$1; } //#endregion //#region src/index.d.ts declare const rmgRuntime: { ready: () => Promise; getAppName: () => string; getAppVersion: () => string; getEnv: () => RmgEnv; getInstance: () => RmgInstance; event: (type: string, data?: Record) => void; isStandaloneWindow: () => boolean; injectUITools: () => void; openApp: (payload: { appId: string; search?: string; hash?: string; }) => void; onAppOpen: (callback: ChannelEventHandler<{ appId: string; search?: string; hash?: string; }>) => void; closeApp: (appId: string) => void; onAppClose: (callback: ChannelEventHandler) => void; updateAppMetadata: (payload: { title?: string; search?: string; hash?: string; }) => void; onAppMetadataUpdate: (callback: ChannelEventHandler<{ title?: string; search?: string; hash?: string; }>) => void; toggleNavMenu: (isOpen: boolean) => void; postEvent: (event: string, data: unknown) => void; onMessage: (event: string, callback: ChannelEventHandler) => void; setLanguage: (value: string) => void; getLanguage: () => string; onLanguageChange: (callback: ChannelEventHandler) => void; setColourMode: (value: "light" | "dark" | "system") => void; getColourMode: () => "light" | "dark" | "system"; onColourModeChange: (callback: ChannelEventHandler<"light" | "dark" | "system">) => void; isAnalyticsQADone: () => boolean; isAllowAnalytics: () => boolean; allowAnalytics: (flag: boolean) => AllowAnalyticsResponse; storage: { on: (key: string, callback: (value: string | null) => void) => void; get: (key: string) => string | null; getAll: () => Record; set: (key: string, value: string) => void; remove: (key: string) => void; clear: () => void; }; getMsSinceStartUp: () => number; I18nBuilder: typeof I18nBuilder; getI18nInstance: () => _$i18next.i18n; getAllFonts: (reload?: boolean) => Promise>; getLoadedFonts: () => Record & { configs: ({ source: string; descriptors?: FontFaceDescriptors; } & { font: FontFace; })[]; }>; loadFont: (family: string, definition?: { displayName?: string; url?: string; configs: ({ source: string; descriptors?: FontFaceDescriptors; } | { source: string; descriptors?: FontFaceDescriptors; }[])[]; }) => Promise & { configs: ({ source: string; descriptors?: FontFaceDescriptors; } & { font: FontFace; })[]; })>; getFontCSS: (family: string) => Promise; onRemoteFontLoaded: (callback: ChannelEventHandler<{ family: string; definition: { displayName?: string; url?: string; configs: ({ source: string; descriptors?: FontFaceDescriptors; } | { source: string; descriptors?: FontFaceDescriptors; }[])[]; }; }>) => void; sendNotification: (payload: Omit) => void; onNewNotification: (callback: ChannelEventHandler) => void; }; declare global { interface Window { rmgRuntime: typeof rmgRuntime; } } declare const logger: { debug: (...data: unknown[]) => void; info: (...data: unknown[]) => void; warn: (...data: unknown[]) => void; error: (...data: unknown[]) => void; }; //#endregion export { RMNotification, RmgEnv, RmgInstance, rmgRuntime as default, logger };