import { TemplateResult } from "./template"; /** * Searches for a Bloc in the DOM tree. Starts from the staring element and searches all the way up in the DOM tree. * @param blocName * @param startingElement * @returns */ export declare function findBloc>(blocName: string, startingElement: Element | undefined): B | undefined; /** * Business logic component which manages a particular state */ export declare class Bloc { protected initState: S; protected listenToBlocs: string[]; private listeners; private listenerCount; private foundBlocs; hostElement: HTMLElement | undefined; private _state; /** * The name its given in hosted machine */ private _blocName?; get blocName(): string | undefined; constructor(initState: S, listenToBlocs?: string[]); get state(): S; protected reactToStateChangeFrom(blocName: string, newState: any): void; _subscribe(newStateHandler: Function): number; _unsubscribe(subscription_id: number): void; onConnection(hostElement: HTMLElement, blocName: string): void; onDisconnection(): void; /** * Emit function to publish new states of this Bloc * @param newState */ emit(newState: S): void; } export declare abstract class ListenerWidget extends HTMLElement { blocname?: string; _hostedblocs: Record>; root: Node; _bloc?: Bloc; subscription_id: number; set hostedblocs(v: Record>); bloc>(): B; constructor({ blocName, hostedBlocs, isShadow }?: { blocName?: string; hostedBlocs?: Record>; isShadow?: boolean; }); connectedCallback(): void; disconnectedCallback(): void; hasBloc(blocName: string): boolean; getHostedBloc(blocName: string): Bloc; rebuild(newState?: S): void; abstract build(state?: S): TemplateResult | undefined; }