export declare const defaultMessageStrings: { contentHasChanged: string; inputGroupRequired: string; inputMaxLength: string; inputMinLength: string; inputRequired: string; notAuthenticated: string; notAuthorized: string; pleaseFixTheFollowingIssues: string; thereAreNoEditsToSubmit: string; tooManyRequests: string; weEncounteredAnUnexpectedError: string; }; export declare class FormBehaviorElement extends HTMLElement { submitting: boolean; initialData: FormData; toDispose: (() => void)[]; isDirty: boolean; commitTimeout: number; locStrings: { contentHasChanged: string; inputGroupRequired: string; inputMaxLength: string; inputMinLength: string; inputRequired: string; notAuthenticated: string; notAuthorized: string; pleaseFixTheFollowingIssues: string; thereAreNoEditsToSubmit: string; tooManyRequests: string; weEncounteredAnUnexpectedError: string; }; validators: Validator[]; constructor(); get canSave(): boolean; get form(): HTMLFormElement | null; get hideUnloadMessage(): boolean; get isNew(): boolean; get noSubmit(): boolean; connectedCallback(): void; disconnectedCallback(): void; getLocaleStrings(): { contentHasChanged: string; inputGroupRequired: string; inputMaxLength: string; inputMinLength: string; inputRequired: string; notAuthenticated: string; notAuthorized: string; pleaseFixTheFollowingIssues: string; thereAreNoEditsToSubmit: string; tooManyRequests: string; weEncounteredAnUnexpectedError: string; } & { [key: string]: string; }; subscribe(target: EventTarget, type: string, listener: EventListenerObject): void; setDirty(): void; handleEvent(event: Event): void; navigate(href: string | null): boolean; scheduleCommit(event: Event): void; commit: (event: Event) => void; handleUnloadEvent(event: BeforeUnloadEvent): Promise; handleSubmitEvent(event: Event): Promise; createErrorAlert(form: HTMLFormElement): { errorAlert: HTMLDivElement; errorList: HTMLUListElement; }; getErrorAlert(form: HTMLFormElement): { errorAlert: HTMLDivElement; errorList: HTMLUListElement; }; validateRequired(input: HTMLValueElement, label: string): string | null; validateMinLength(input: HTMLValueElement | HTMLInputElement, label: string): string | null; validateMaxLength(input: HTMLValueElement, label: string): string | null; validateForm(form: HTMLFormElement, displayValidity?: boolean, scope?: Element): Promise; clearValidationErrors(target: EventTarget | null): void; showNoChangesMessage(form: HTMLFormElement): void; runBasicValidation(input: Element, displayValidity: boolean | undefined, errors: FormValidationError[], errorList: HTMLElement, isCustomElement: boolean): void; } declare global { interface Window { FormBehaviorElement: typeof FormBehaviorElement; } interface HTMLElementTagNameMap { 'form-behavior': FormBehaviorElement; } } export interface HTMLValueElement extends HTMLElement { form: HTMLFormElement; labels: NodeListOf | null; name: string; type: string; value: string; validity: ValidityState; } export type NavigationSteps = 'follow' | 'hash-reload' | 'replace' | 'reload' | null; export interface FormValidationError { message: string; input: HTMLValueElement; } export type FormValidationResult = { valid: true; } | { valid: false; errors: FormValidationError[]; }; type Validator = (input: HTMLValueElement, label: string) => string | null; export declare function getLabel(input: HTMLValueElement): string; export declare function getField(input: HTMLValueElement): HTMLElement; export declare function getFieldBody(input: HTMLValueElement): Element; export declare function setValidationMessage(element: HTMLValueElement, message: string): void; export declare function navigateAfterSubmit(href: string | null, navigationStep: NavigationSteps): boolean; export declare function collectCustomElementsByName(form: HTMLFormElement): Element[]; export {}; //# sourceMappingURL=form-behavior.d.ts.map