import { HAttrOnData, HElement, HElements, HHandlerCtx } from "./hsml"; export type HState = () => State; export type HView = (state: State) => HElements; export type HView1 = (state: State) => HElement; export type HAppAction = "happ-init" | "happ-mount" | "happ-umount" | "happ-attribute"; export declare enum HAppActions { init = "happ-init", mount = "happ-mount", umount = "happ-umount", attribute = "happ-attribute" } export interface HAction { type: HActionType; data?: any; event?: Event; } export type HDispatch = { (type: HAction["type"], data?: HAction["data"]): Promise; event(type: HAction["type"], data?: HAction["data"], element?: HTMLElement | Window | Document): void; }; type SkipUpdate = true; export type HDispatcher = (action: HAction, state: State, dispatch: HDispatch, app: HApp) => Promise; export interface HAppI { state: HState; view: HView; dispatcher: HDispatcher; element?: Element | string | null; debug?: boolean; id?: string; attributes?: string[]; } export declare function happ(hAppI: { state: HState; view: HView; dispatcher: HDispatcher; element: Element | string | null; debug?: boolean; id?: string; }): HApp; export declare function happel(name: string, hAppI: { state: HState; view: HView; dispatcher: HDispatcher; id?: string; attributes?: string[]; debug?: boolean; }): void; export declare class HApp implements HHandlerCtx { static log: (...data: any[]) => void; static error: (...data: any[]) => void; static warn: (...data: any[]) => void; readonly state: State; readonly view: HView; readonly dispatcher: HDispatcher; debug: boolean; readonly id: string; readonly element?: HTMLElement; readonly refs: { [key: string]: HTMLElement; }; readonly customElement?: HTMLElement; private _updateSched?; private _abortController?; constructor(state: HState, view: HView, dispatcher?: HDispatcher, element?: Element | string | null, debug?: boolean, id?: string); dispatch: HDispatch; private _dispatchAction; private _dispatch; eventListener(type: string, listener: (data: any, event: Event) => void, element?: Window | Document | HTMLElement): void; render: () => HElements; actionCb: (actionType: HActionType, data: HAttrOnData, event: Event) => Promise; private _updateDom; mount: (e: Element | string | null) => this; umount: () => Promise; update: () => this; toHsml: () => HElement; toHtml: () => string; } type FormDataInputValue = string | number | boolean | null | Array; export type HFormInputData = { name?: string; value: Value; valueString?: string | null; valueNumber?: number | null; valueDate?: Date | null; valueFile?: File | FileList | null; validation: string; valid: boolean; }; export type HFormData = { data: Data; validation: { [name in keyof Data]?: string; }; valid?: boolean; }; export {};