
import { FormBaseProps } from "../../../shared/form.js";
import "../../../shared/index.js";
import { FieldTypes } from "./types.js";
import { CubeFormData, CubeFormInstance } from "./use-form.js";
import { BaseProps, ContainerStyleProps, Styles } from "@tenphi/tasty";
import * as react from "react";
import { FormHTMLAttributes, ReactElement, Ref } from "react";

//#region src/components/form/Form/Form.d.ts
declare const FormContext: react.Context<{}>;
declare function useFormProps(props: any): any;
interface CubeFormProps<T extends FieldTypes = FieldTypes> extends FormBaseProps, BaseProps, ContainerStyleProps, Pick<FormHTMLAttributes<HTMLFormElement>, 'action' | 'autoComplete' | 'encType' | 'method' | 'target'> {
  /** Form name */
  name?: string;
  /** Default field values */
  defaultValues?: Partial<T>;
  /** Trigger when any value of the Field is changed */
  onValuesChange?: CubeFormInstance<T>['onValuesChange'];
  /** Trigger on form submit and success */
  onSubmit?: CubeFormInstance<T>['onSubmit'];
  /** Trigger on form submit and failed */
  onSubmitFailed?: (any?: any) => void | Promise<any>;
  /** Set form instance created by useForm */
  form?: CubeFormInstance<T, CubeFormData<T>>;
  /** The size of the side area with labels. Only for `labelPosition="side"` */
  labelWidth?: Styles['width'];
  orientation?: 'vertical' | 'horizontal';
}
//#endregion
export { CubeFormProps, FormContext, useFormProps };
//# sourceMappingURL=Form.d.ts.map