import type { FormBaseControlSchema, FuncGroup, SchemaExpression, SchemaIcon, VariableItem } from '../types';
export * from './components/types';
/**
 * InputFormula 公式编辑器
 */
export interface InputFormulaControlSchema extends FormBaseControlSchema {
    type: 'input-formula';
    /**
     * evalMode 即直接就是表达式，否则
     * 需要 ${这里面才是表达式}
     * 默认为 true
     */
    evalMode?: boolean;
    /**
     * 用于提示的变量集合，默认为空
     */
    variables: Array<VariableItem>;
    /**
     * 变量展现模式，可选值：'tabs' ｜ 'tree'
     */
    variableMode?: 'tabs' | 'tree';
    /**
     * 函数集合，默认不需要传，即  jamis-formula 里面那个函数
     * 如果有扩充，则需要传。
     */
    functions?: Array<FuncGroup>;
    /**
     * 编辑器标题
     */
    title?: string;
    /**
     * 顶部标题，默认为表达式
     */
    header?: SchemaExpression;
    /**
     * 控件模式
     */
    inputMode?: 'button' | 'input-button' | 'input-group';
    /**
     * 外层input是否允许输入，否需要点击fx在弹窗中输入
     */
    allowInput?: boolean;
    /**
     * 按钮图标
     */
    icon?: SchemaIcon;
    /**
     * 按钮Label，inputMode为button时生效
     */
    btnLabel?: string;
    /**
     * 按钮样式
     */
    level?: 'info' | 'success' | 'warning' | 'danger' | 'link' | 'primary' | 'dark' | 'light';
    /**
     * 按钮大小
     */
    btnSize?: 'xs' | 'sm' | 'md' | 'lg';
    /**
     * 边框模式，全边框，还是半边框，或者没边框。
     */
    borderMode?: 'full' | 'half' | 'none';
    /**
     * 输入框占位符
     */
    placeholder?: string;
    /**
     * 变量面板CSS样式类名
     */
    variableClassName?: string;
    /**
     * 函数面板CSS样式类名
     */
    functionClassName?: string;
    /**
     * 当前输入项字段 name: 用于避免循环绑定自身导致无限渲染
     */
    selfVariableName?: string;
}
/**
 * 公式功能控件。
 *
 */
export interface FormulaControlSchema extends FormBaseControlSchema {
    /**
     * 指定为公式功能控件。
     */
    type: 'formula';
    /**
     * 当某个按钮的目标指定为此值后，会触发一次公式应用。这个机制可以在 autoSet 为 false 时用来手动触发
     */
    id?: string;
    /**
     * 触发公式的作用条件，如 data.xxx == \"a\" 或者 ${xx}
     */
    condition?: string;
    /**
     * 是否自动应用
     */
    autoSet?: boolean;
    /**
     * 公式
     */
    formula?: string;
    /**
     * 是否初始应用
     */
    initSet?: boolean;
    /**
     * 字段名，公式结果将作用到此处指定的变量中去
     */
    name?: string;
}
