import { TAny } from '@flatbiz/utils';
import { FormInstance } from 'antd';

declare function attachPropertiesToComponent<C, P extends Record<string, unknown>>(component: C, properties: P): C & P;
export declare const fbaUtils: {
	hasPermission: (name?: string) => boolean;
	getPermissionList: () => string[];
	attachPropertiesToComponent: typeof attachPropertiesToComponent;
	getModelKey: () => string;
	/**
	 * 手动触发Antd Form 的 onValuesChange
	 * ```
	 * 1. 正常在通过 form.setFieldsValue 不会触发onValuesChange
	 * 2. 需要触发可调用此方法
	 * ```
	 */
	triggerFormValuesChange: (form: FormInstance, changeList: {
		name: string | number | Array<string | number>;
		value: TAny;
	}[]) => void;
	/**
	 * 操作Antd Form
	 * ```
	 * 1. 通过 form.setFields 修改属性值
	 * 2. 触发 Form 的 onValuesChange
	 * ```
	 */
	setFormFieldsAndTriggerValuesChange: (form: FormInstance, changeList: {
		name: string | number | Array<string | number>;
		value: TAny;
	}[]) => void;
	/**
	 * 获取自定义antd主题
	 * ```
	 * 1. 获取自定义antd主题
	 * ```
	 */
	getCustomAntdTheme: () => {
		token: any;
		components: any;
	} | undefined;
};

export {};
