import { n as Transport, o as App, t as Client } from "./sdk-eksYUmch.js";

//#region ../app/browser.d.ts
type GUIState<A> = A extends App<infer State, infer _C, infer _P, infer _E> ? State : never;
declare function injectStyle(css: string, key?: string): void;
interface GUISpec<A> {
  mount: (el: HTMLElement, state: GUIState<A> | null, ctx: {
    readonly client: Client<A>;
  }) => GUIInstance<GUIState<A> | null>;
}
interface GUIInstance<State> {
  update: (state: State) => Promise<void> | void;
  unmount: () => Promise<void> | void;
}
declare function defineGUI<A>(spec: GUISpec<A>): {
  mount(el: HTMLElement, state: GUIState<A> | null, ctx: {
    transport: Transport;
  }): {
    update: (state: GUIState<A> | null) => Promise<void> | void;
    unmount(): Promise<void>;
  };
};
//#endregion
export { defineGUI, injectStyle };
//# sourceMappingURL=browser.d.ts.map