import { default as React, ReactNode } from 'react';
import { MantineColor, MantineSize } from '@mantine/core';
import { UseFieldArrayReturn, Control, FieldValues, ArrayPath, FieldArrayWithId } from 'react-hook-form';
export interface ArchbaseFieldArrayItemProps<T extends FieldValues> {
    /** Índice do item */
    index: number;
    /** Dados do item */
    item: FieldArrayWithId<T>;
    /** Função para remover o item */
    remove: () => void;
    /** Se pode remover (baseado em minItems) */
    canRemove: boolean;
    /** Se pode arrastar */
    canDrag: boolean;
    /** Props de drag handle */
    dragHandleProps?: Record<string, any>;
}
export interface ArchbaseFieldArrayProps<T extends FieldValues> {
    /** Nome do campo no form */
    name: ArrayPath<T>;
    /** Control do react-hook-form */
    control: Control<T>;
    /** Renderizador do item */
    renderItem: (props: ArchbaseFieldArrayItemProps<T>) => ReactNode;
    /** Valor padrão para novos itens */
    defaultValue?: Record<string, any>;
    /** Mínimo de itens */
    minItems?: number;
    /** Máximo de itens */
    maxItems?: number;
    /** Label do botão adicionar */
    addLabel?: string;
    /** Componente de empty state */
    emptyState?: ReactNode;
    /** Se permite reordenar */
    sortable?: boolean;
    /** Se deve mostrar o header */
    showHeader?: boolean;
    /** Título do campo */
    title?: string;
    /** Descrição do campo */
    description?: string;
    /** Cor do botão adicionar */
    addButtonColor?: MantineColor;
    /** Variante do botão adicionar */
    addButtonVariant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default';
    /** Tamanho */
    size?: MantineSize;
    /** Se deve usar Paper em volta de cada item */
    withPaper?: boolean;
    /** Se deve mostrar índice */
    showIndex?: boolean;
    /** Espaçamento entre itens */
    gap?: MantineSize | number;
    /** Se está desabilitado */
    disabled?: boolean;
    /** Callback quando array muda */
    onArrayChange?: (items: any[]) => void;
    /** Classe CSS */
    className?: string;
    /** Estilo */
    style?: React.CSSProperties;
}
export declare const ArchbaseFieldArray: <T extends FieldValues>(props: ArchbaseFieldArrayProps<T> & {
    ref?: React.Ref<HTMLDivElement>;
}) => React.ReactElement;
export interface UseArchbaseFieldArrayOptions<T extends FieldValues> {
    name: ArrayPath<T>;
    control: Control<T>;
    minItems?: number;
    maxItems?: number;
    defaultValue?: Record<string, any>;
}
export interface UseArchbaseFieldArrayReturn<T extends FieldValues> extends UseFieldArrayReturn<T> {
    canAdd: boolean;
    canRemove: boolean;
    addItem: () => void;
    removeItem: (index: number) => void;
}
export declare function useArchbaseFieldArray<T extends FieldValues>(options: UseArchbaseFieldArrayOptions<T>): UseArchbaseFieldArrayReturn<T>;
