import { ValueOrFunction } from '@moxb/util'; import { BindImpl, BindOptions } from '../bind/BindImpl'; import { Form } from './Form'; import { Value } from '../value/Value'; export interface FormOptions extends BindOptions { /** * The 'values' contain all the children components bindings */ readonly values: ValueOrFunction[]>; /** * Is called when Form.onSubmit is called * `done` must be called else the binding stays in saving state. * * @param {value} value * @param {(error: any) => void} done */ onSubmit?(value: any, done: (error?: any) => void): void; /** * If true, the form refreshes the page onSubmit */ doSubmitRefresh?: boolean; } export declare class FormImpl extends BindImpl implements Form { protected getValues(): Value[]; get values(): Value[]; constructor(impl: FormOptions); get canSubmitForm(): boolean; get allErrors(): string[]; get hasErrors(): boolean; get hasChanges(): boolean; get hasMissingRequired(): boolean; onSubmitForm(): void; submitDone(error: any): void; resetValues(): void; clearAllErrors(): void; }