import { type Readable, type Updater, type Writable } from 'svelte/store'; import type { InputConstraint } from '../jsonSchema/constraints.js'; import { type FormPath, type FormPathLeaves, type FormPathType } from '../stringPath.js'; import type { FormPathArrays } from '../stringPath.js'; import type { SuperForm, TaintOption } from './superForm.js'; import type { IsAny, Prettify } from '../utils.js'; export type ProxyOptions = { taint?: TaintOption; }; type FormPaths, Type = any> = FormPath | FormPathLeaves; type CorrectProxyType, Path extends FormPaths> = NonNullable> extends In ? Writable : never; type PathType = IsAny extends true ? FormPathType : Type; type Nullable, Path extends FormPaths | FormPathArrays | FormPathLeaves> = null extends FormPathType ? null : never; type Optional, Path extends FormPaths | FormPathArrays | FormPathLeaves> = [undefined] extends [FormPathType] ? undefined : never; type DefaultOptions = { trueStringValue: string; dateFormat: 'date' | 'datetime' | 'time' | 'date-utc' | 'datetime-utc' | 'time-utc' | 'date-local' | 'datetime-local' | 'time-local' | 'iso'; delimiter?: '.' | ','; empty?: 'null' | 'undefined' | 'zero'; initiallyEmptyIfZero?: boolean; taint?: TaintOption; step: number; }; export declare function booleanProxy, Path extends FormPaths>(form: Writable | SuperForm, path: Path, options?: Prettify>): CorrectProxyType; export declare function intProxy, Path extends FormPaths>(form: Writable | SuperForm, path: Path, options?: Prettify>): CorrectProxyType; export declare function numberProxy, Path extends FormPaths>(form: Writable | SuperForm, path: Path, options?: Prettify>): CorrectProxyType; export declare function dateProxy, Path extends FormPaths>(form: Writable | SuperForm, path: Path, options?: { format?: DefaultOptions['dateFormat']; empty?: Exclude; taint?: TaintOption; step?: number; }): CorrectProxyType; export declare function stringProxy, Path extends FormPaths>(form: Writable | SuperForm, path: Path, options: { empty: NonNullable>; taint?: TaintOption; }): Writable; export declare function fileFieldProxy, Path extends FormPathLeaves>(form: SuperForm, path: Path, options?: ProxyOptions & { empty?: 'null' | 'undefined'; }): FormFieldProxy | Optional, Path>; export declare function fileProxy, Path extends FormPathLeaves>(form: Writable | SuperForm, path: Path, options?: ProxyOptions & { empty?: 'null' | 'undefined'; }): { subscribe(this: void, run: (value: FileList) => void): import("svelte/store").Unsubscriber; set(this: void, file: FileList | File | Nullable | Optional): void; update(this: void): never; }; export declare function filesFieldProxy, Path extends FormPathArrays>(form: SuperForm, path: Path, options?: ProxyOptions): { values: { subscribe(run: (value: FileList) => void): import("svelte/store").Unsubscriber; set(files: FileList | File[] | Nullable | Optional): void; update(updater: Updater | Optional>): void; }; path: Path; errors: Writable; valueErrors: Writable; }; export declare function filesProxy, Path extends FormPathArrays>(form: Writable | SuperForm, path: Path, options?: ProxyOptions & { empty?: 'null' | 'undefined'; }): { subscribe(run: (value: FileList) => void): import("svelte/store").Unsubscriber; set(files: FileList | File[] | Nullable | Optional): void; update(updater: Updater | Optional>): void; }; type ValueErrors = any[]; export type ArrayProxy = { path: Path; values: Writable<(T[] & unknown[]) | ExtraValues>; errors: Writable; valueErrors: Writable; }; export declare function arrayProxy, Path extends FormPathArrays, ArrType = any>(superForm: SuperForm, path: Path, options?: { taint?: TaintOption; }): ArrayProxy extends (infer U)[] ? U : never, Path>; export type FormFieldProxy = { path: Path; value: SuperFieldProxy; errors: Writable; constraints: Writable; tainted: Writable; }; export declare function formFieldProxy, Path extends FormPathLeaves, Type = any>(superForm: SuperForm, path: Path, options?: ProxyOptions): FormFieldProxy, Path>; type SuperFieldProxy = { subscribe: Readable['subscribe']; set(this: void, value: T, options?: { taint?: TaintOption; }): void; update(this: void, updater: Updater, options?: { taint?: TaintOption; }): void; }; export type FieldProxy = Writable; export declare function fieldProxy, Path extends FormPaths, Type = any>(form: Writable | SuperForm, path: Path, options?: ProxyOptions): FieldProxy>; export {};