import { VNode } from 'vue';
import { Fn, Recordable, RenderOpts } from '@maxax/types';
import { MessageBoxOptions } from '../../basic-message-box';
import { ButtonGroupComponentProps, ButtonGroupComponentType } from './component';
export interface ButtonGroupRenderCallbackParams {
    schema: BasicButtonGroupSchema;
    values: Recordable;
    field: string;
}
export interface BasicButtonGroupProps {
    showReturnButton?: boolean;
    size?: 'small' | 'medium' | 'large';
    disabled?: boolean;
    readonly?: boolean;
    schemas?: ButtonGroupSchema[];
    mergeDynamicData?: Recordable;
    compact?: boolean;
}
export interface BaseButtonGroupSchema<T extends ButtonGroupComponentType = any> {
    field: string;
    fields?: string[];
    label?: string | VNode | ((renderCallbackParams: ButtonGroupRenderCallbackParams) => string | VNode);
    componentProps?: ((opt: {
        schema: ButtonGroupSchema;
        buttonGroupActionType: ButtonGroupActionType;
    }) => ButtonGroupComponentProps[T]) | ButtonGroupComponentProps[T];
    suffix?: string | number | VNode | ((renderCallbackParams: ButtonGroupRenderCallbackParams) => string | VNode | number);
    prefix?: string | number | VNode | ((renderCallbackParams: ButtonGroupRenderCallbackParams) => string | VNode | number);
    ifShow?: boolean | ((renderCallbackParams: ButtonGroupRenderCallbackParams) => boolean);
    show?: boolean | ((renderCallbackParams: ButtonGroupRenderCallbackParams) => boolean);
    render?: (renderCallbackParams: ButtonGroupRenderCallbackParams, opts: RenderOpts) => VNode | VNode[] | string;
    renderColContent?: (renderCallbackParams: ButtonGroupRenderCallbackParams, opts: RenderOpts) => VNode | VNode[] | string;
    renderComponentContent?: ((renderCallbackParams: ButtonGroupRenderCallbackParams, opts: RenderOpts) => any) | VNode | VNode[] | string;
    slot?: string;
    colSlot?: string;
    dynamicDisabled?: boolean | ((renderCallbackParams: ButtonGroupRenderCallbackParams) => boolean);
    validate?: (opt: {
        field: string;
        schema: BasicButtonGroupSchema;
    }) => Promise<any> | boolean;
    confirm?: Fn;
    cancel?: Fn;
    message?: string | ((renderCallbackParams: ButtonGroupRenderCallbackParams) => string | VNode) | VNode | (() => VNode);
    dynamicLoading?: boolean | ((renderCallbackParams: ButtonGroupRenderCallbackParams) => boolean);
    messageBoxProps?: MessageBoxOptions;
}
export interface ComponentButtonGroupSchema<T extends ButtonGroupComponentType = any> extends BaseButtonGroupSchema<T> {
    component: T;
}
export interface SlotButtonGroupSchema extends BaseButtonGroupSchema {
    slot: string;
}
type ComponentButtonGroupSchemaType<T extends ButtonGroupComponentType = ButtonGroupComponentType> = T extends any ? ComponentButtonGroupSchema<T> : never;
export type ButtonGroupSchema = ComponentButtonGroupSchemaType | SlotButtonGroupSchema;
export type BasicButtonGroupSchema = Partial<ComponentButtonGroupSchema> & Partial<SlotButtonGroupSchema> & BaseButtonGroupSchema;
export interface BasicButtonGroupContext {
    name: string;
}
export interface ButtonGroupActionType {
    setSchema: (data: BasicButtonGroupSchema[]) => Promise<void>;
    updateSchema: (data: Partial<BasicButtonGroupSchema> | Array<Partial<BasicButtonGroupSchema>>) => Promise<void>;
    resetSchema: (data: Partial<BasicButtonGroupSchema> | Array<Partial<BasicButtonGroupSchema>>) => Promise<void>;
    removeSchemaByField: (field: string | string[]) => Promise<void>;
    appendSchemaByField: (schema: BasicButtonGroupSchema | BasicButtonGroupSchema[], prefixField?: string, first?: boolean | undefined) => Promise<void>;
}
export interface BasicButtonGroupEmitType {
    (_e: 'click', key: string, value: any): void;
}
export {};
//# sourceMappingURL=button-group.d.ts.map