import type { TRefObject } from "../utils/use-ref.js"; interface HTMLFormElementExt extends HTMLElement { acceptCharset: string; action: string; autocomplete: AutoFillBase; readonly elements: HTMLFormControlsCollection; encoding: string; enctype: string; readonly length: number; method: string; name: string; noValidate: boolean; rel: string; readonly relList: DOMTokenList; target: string; checkValidity(): boolean; reportValidity(): boolean; requestSubmit(submitter?: HTMLElement | null): void; reset(): void; submit(): void; addEventListener(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } type ListenerKeys = keyof GlobalEventHandlersEventMap; export type Listener = { [K in ListenerKeys]?: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any; }; export type TBaseTagNameMap = Omit & { form: HTMLFormElementExt; }; export type TBaseTagMap = keyof TBaseTagNameMap; export type TStyle = Partial>; export type TChildren = (string | Node | boolean | null | undefined) | (string | Node | boolean | null | undefined)[] | Promise | Promise[] | (string | Node | Promise | boolean | null | undefined)[]; export type TLifecycleElement = { onmount?: (element: HTMLElement) => void; onunmount?: (element: HTMLElement) => void; } & HTMLElement; export type TBaseElement = { tag?: T; className?: string; listeners?: Listener; ref?: TRefObject; dataset?: Partial; style?: TStyle; children?: TChildren; onmount?: (element: HTMLElement) => void; onunmount?: (element: HTMLElement) => void; } & Omit, "children" | "style" | "size">; export type TBaseDiv = TBaseElement & { tag: TBaseTagMap; }; export type TBase = TBaseElement | TBaseDiv; export { };