import React from 'react'; import { BCValidationTypes } from './validationConstant'; import { BCDropListOptionsType } from '../../constants'; import { SerializedStyles } from '@emotion/react'; export declare const FormGroup: import("@emotion/styled").StyledComponent<{ theme?: import("@emotion/react").Theme | undefined; as?: React.ElementType | undefined; }, React.DetailedHTMLProps, HTMLDivElement>, {}>; interface FormData { value: string; isValid: boolean; message: string; validations?: FormValidation[]; } export interface FormField { value: string; validations?: FormValidation[]; } export interface FormValidation { validationType: BCValidationTypes; additionalParam?: string; } type FieldType = 'password' | 'text' | 'number' | 'boolean' | 'droplist' | 'file' | 'email' | 'time' | 'date' | 'textArea'; interface useBCFormReturnFunctions { setFieldValue: (name: string, value: string, validations?: FormValidation[]) => void; setFieldError: (name: string, error: string) => void; validateField: (key: string, validationType: BCValidationTypes, additionalParam?: string) => boolean; validateForm: () => boolean; onChange: (targetVal: string, e: React.ChangeEvent) => void; resetValidationStates: () => void; renderField: (name: string, label: string, type: FieldType, readonly?: boolean, placeholder?: string, tooltip?: string, dynamicStyle?: SerializedStyles, autoComplete?: string) => JSX.Element; _renderFieldInput: (name: string, type: FieldType, readonly: boolean, placeholder: string) => JSX.Element; onDroplistSelectionChange: (name: string, selectedKey?: string) => void; renderDroplistField: (name: string, label: string, options: BCDropListOptionsType[], placeholder?: string, tooltip?: string, lang?: boolean, searchable?: boolean, labelStyle?: SerializedStyles, containerStyle?: SerializedStyles, loading?: boolean, noEmpty?: boolean, usePortal?: boolean) => JSX.Element; } type useMBFormReturnType = [{ [key: string]: FormData; }, useBCFormReturnFunctions]; export declare const useBCForm: (formInitialValue?: { [key: string]: FormField; }, t?: any) => useMBFormReturnType; export default useBCForm;