import { ControllerOptions, ViewController, ViewControllerFactory, ViewControllerId, ViewControllerMap } from '@sprucelabs/heartwood-view-controllers'; import { MercuryClient } from '@sprucelabs/mercury-client'; import { SkillTheme } from '../types/heartwood.types'; export default class RemoteViewControllerFactoryImpl implements RemoteViewControllerFactory { static Class?: new (options: RemoteFactoryOptions) => RemoteViewControllerFactory; static Request: any; private connectToApi; private vcFactory; private themesByNamespace; static Factory(options: RemoteFactoryOptions): RemoteViewControllerFactory; static reset(): void; protected constructor(options: RemoteFactoryOptions); hasController(name: string): boolean; getTheme(namespace?: string): SkillTheme; Controller>(name: N, options: O): ViewControllerMap[N]; private getNamespace; getController(name: string): any; fetchRemoteController(name: string): Promise<(new () => ViewController) & { id: string; }>; RemoteController(name: string, options: Record): Promise; protected optionallyLoadController(name: string): Promise; loadViewsForNamespace(namespace: string): Promise; private fetchFromUrl; } type ConnectToApi = () => Promise; export type VcFactoryForRemoteFactory = Pick; export interface RemoteFactoryOptions { connectToApi: ConnectToApi; vcFactory: VcFactoryForRemoteFactory; } type Factory = Pick; export interface RemoteViewControllerFactory extends Factory { RemoteController: (name: string, options: Record) => Promise>>; getTheme: (namespace?: string) => SkillTheme | undefined; fetchRemoteController: (name: string) => Promise<(new () => ViewController) & { id: string; }>; loadViewsForNamespace(namespace: string): Promise; } export {};