import * as React from "react"; import { IFieldSingleState } from "@zecos/field/types"; export interface ReactFieldSingleActions { setValue: (newVal: any) => any; reset: () => any; setTouched: () => any; refreshErrors: () => any; getState: () => any; } export interface IInputHelpers { title: string; camel: string; kebab: string; "aria-label": string; handleChange: (e: React.ChangeEvent) => void; handleBlur: (e: any) => void; label: string; name: string; snake: string; id: string; htmlFor: string; upperCamel: string; } export declare const getHelpers: ({ actions, name, opts }: { actions: any; name: any; opts: any; }) => IInputHelpers; export interface IInputOpts { name: string; init?: any; validate?: (inputs?: any) => Error[]; props?: { [key: string]: any; }; useState?: boolean; updater?: () => void; label?: string; id?: string; handleChange?: () => any; handleBlur?: () => any; } export interface IInput { Cmpt: React.FC; state: IFieldSingleState; actions: ReactFieldSingleActions; meta: IMeta; helpers: IInputHelpers; name: string; [key: string]: any; } interface IMeta { $$__input_type: string; } export declare type InputCreator = (opts: IInputOpts) => IInput; export declare const createInput: (InputCmpt: any) => any; export interface ILayoutHelpers { kebab: string; snake: string; title: string; upperCamel: string; name: string; id: string; label: string; } export interface ILayoutOpts { name: string; items?: any[]; validate?: (inputs?: any[]) => Error[]; props?: { [key: string]: any; }; } interface ILayoutProps { helpers: ILayoutHelpers; items: any[]; props: { [key: string]: any; }; errors: Error[]; } export interface ILayout { Cmpt: React.FC; meta: IMeta; helpers: ILayoutHelpers; name: string; errors: Error[]; [key: string]: any; } export declare type LayoutCreator = (opts: ILayoutOpts) => ILayout; declare type LayoutCreatorCreator = (LayoutCmpt: React.FC) => LayoutCreator; export declare const createLayout: LayoutCreatorCreator; interface ICreateMultiOpts { name: string; validate?: (inputs: any[]) => Error[]; init?: (ILayout | IInput)[]; props?: { [key: string]: any; }; id?: string; label?: string; } export declare const createMulti: (MultiCmpt: any) => (opts: ICreateMultiOpts) => { [x: string]: string | { [key: string]: any; }; Cmpt: React.FunctionComponent<{}>; items: any[]; errors: Error[]; meta: { $$__input_type: string; }; helpers: ILayoutHelpers; name: string; actions: { [key: string]: any; }; }; export declare const displayFormData: any; export declare const getFormData: any; export {};