import type { FieldDefinition, GroupFieldDefinition } from '../manifest/schema';
type ButtonSelectOption = {
    readonly value: string;
    readonly label: string;
};
export type ButtonOptions = {
    variants?: readonly ButtonSelectOption[];
    defaultVariant?: string;
    includeSize?: boolean;
    defaultSize?: 'sm' | 'md' | 'lg' | 'xl';
    showGroupLabel?: boolean;
    groupId?: string;
    groupLabel?: string;
    flattenInRepeater?: boolean;
};
type DefaultButtonVariant = 'primary' | 'secondary' | 'outline';
type ButtonSize = 'sm' | 'md' | 'lg' | 'xl';
type ButtonOptionVariants<O> = O extends {
    variants: readonly (infer Option extends ButtonSelectOption)[];
} ? Option['value'] : DefaultButtonVariant;
type ButtonOptionGroupId<O> = O extends {
    groupId: infer GroupId extends string;
} ? GroupId : 'button';
type ButtonOptionFlattenInRepeater<O> = O extends {
    flattenInRepeater: infer Flatten extends boolean;
} ? Flatten : true;
type ButtonOptionIncludeSize<O> = O extends {
    includeSize: false;
} ? false : true;
type ButtonBaseFields<Variant extends string> = readonly [
    {
        readonly id: 'label';
        readonly type: 'text';
        readonly required: true;
    },
    {
        readonly id: 'link';
        readonly type: 'link';
        readonly required: true;
    },
    {
        readonly id: 'variant';
        readonly type: 'select';
        readonly options: ReadonlyArray<{
            readonly value: Variant;
        }>;
    }
];
type ButtonIconFields = readonly [
    {
        readonly id: 'iconLeft';
        readonly type: 'text';
    },
    {
        readonly id: 'iconRight';
        readonly type: 'text';
    }
];
type ButtonGroupFields<Variant extends string, IncludeSize extends boolean> = IncludeSize extends true ? readonly [
    ...ButtonBaseFields<Variant>,
    {
        readonly id: 'size';
        readonly type: 'select';
        readonly options: ReadonlyArray<{
            readonly value: ButtonSize;
        }>;
    },
    ...ButtonIconFields
] : readonly [...ButtonBaseFields<Variant>, ...ButtonIconFields];
export type ButtonGroupField<O extends ButtonOptions = {}> = GroupFieldDefinition & {
    readonly id: ButtonOptionGroupId<O>;
    readonly type: 'group';
    readonly ui: NonNullable<GroupFieldDefinition['ui']> & {
        readonly flattenInRepeater: ButtonOptionFlattenInRepeater<O>;
    };
    readonly schema: GroupFieldDefinition['schema'] & {
        readonly fields: ButtonGroupFields<ButtonOptionVariants<O>, ButtonOptionIncludeSize<O>>;
    };
};
export declare const DEFAULT_THEME_BUTTON_VARIANTS: readonly [{
    readonly value: "primary";
    readonly label: "Primary";
}, {
    readonly value: "secondary";
    readonly label: "Secondary";
}, {
    readonly value: "outline";
    readonly label: "Outline";
}, {
    readonly value: "link";
    readonly label: "Link";
}];
export type ButtonVariantFieldOptions = {
    id?: string;
    label?: string;
    description?: string;
    defaultValue?: string;
    variants?: ReadonlyArray<{
        value: string;
        label: string;
    }>;
};
export declare function createButtonVariantField(options?: ButtonVariantFieldOptions): FieldDefinition;
export declare function createButtonGroup<const O extends ButtonOptions = {}>(options?: O): ButtonGroupField<O>;
export {};
