import type { ActionResult } from '@sveltejs/kit'; import { type Readable, type Writable } from 'svelte/store'; import { type TaintedFields, type SuperValidated } from '../index.js'; import type { z, AnyZodObject } from 'zod'; import type { Entity } from '../schemaEntity.js'; import type { FormOptions } from './index.js'; export type FormUpdate = (result: Exclude, untaint?: boolean) => Promise; export type SuperFormEvents = Pick, 'onError' | 'onResult' | 'onSubmit' | 'onUpdate' | 'onUpdated'>; export type SuperFormEventList = { [Property in keyof SuperFormEvents]-?: NonNullable[Property]>[]; }; export declare function cancelFlash(options: FormOptions): void; export declare function shouldSyncFlash(options: FormOptions): boolean | undefined; /** * Custom use:enhance version. Flash message support, friendly error messages, for usage with initializeForm. * @param formEl Form element from the use:formEnhance default parameter. */ export declare function formEnhance(formEl: HTMLFormElement, submitting: Writable, delayed: Writable, timeout: Writable, errs: Writable, Form_updateFromActionResult: FormUpdate, options: FormOptions, data: Writable>, message: Writable, enableTaintedForm: () => void, formEvents: SuperFormEventList, formId: Readable, constraints: Readable['constraints']>, tainted: Writable | undefined>, lastChanges: Writable, Context_findValidationForms: (data: Record) => SuperValidated[], posted: Readable): { destroy(): void; };