import { Atom } from '@cn-ui/use';
export declare namespace FormFieldOptions {
    interface ExtraSystemMessage {
        onChange?: <T>(key: string, value: T) => void;
    }
    interface AllowParams<D> {
        /** 组件的参数 */
        params?: Partial<D>;
    }
    interface commonProp<T> {
        prop: string;
        /** 默认为 prop */
        label?: string;
        valid?: (value: T, total: {
            [key: string]: Atom<unknown>;
        }) => string | void | Promise<string> | Promise<void>;
    }
    type baseProp<T> = ExtraSystemMessage & commonProp<T>;
    type WithDefault<T> = {
        default?: T;
    };
    interface Select<T = {
        value: string;
        label?: string;
    }> extends baseProp<T>, WithDefault<string>, AllowParams<import('@cn-ui/core').SelectProps> {
        type: 'select';
        options: T[];
    }
    type Radio = Omit<Select, 'type'> & {
        type: 'radio';
    } & AllowParams<import('@cn-ui/core').CheckGroupProps>;
    interface Switch<T = boolean> extends baseProp<T>, WithDefault<T>, AllowParams<import('@cn-ui/core').SwitchProps> {
        type: 'switch';
    }
    interface Range<T = number> extends baseProp<T>, WithDefault<T>, AllowParams<import('@cn-ui/core').InputNumberProps> {
        type: 'range';
        unit?: string;
    }
    type Slider = Omit<Range, 'type'> & {
        type: 'slider';
    };
    interface Color<T = string> extends baseProp<T>, WithDefault<T>, AllowParams<import('@cn-ui/core').InputColorProps> {
        type: 'color';
    }
    interface Rate<T = number> extends baseProp<T>, WithDefault<T>, AllowParams<import('@cn-ui/core').RateProps> {
        type: 'rate';
    }
    interface Text<T = string> extends baseProp<T>, WithDefault<T>, AllowParams<import('@cn-ui/core').InputTextProps> {
        type: 'text';
    }
}
