import { ReactNode, ChangeEvent } from 'react';
import { TextareaAutosizeProps } from 'react-textarea-autosize';

interface TextareaProps extends Omit<TextareaAutosizeProps, 'onChange' | 'onHeightChange'> {
    autoFocus?: boolean;
    defaultValue?: number | string;
    description?: string;
    disabled?: boolean;
    error?: boolean | string;
    fullWidth?: boolean;
    icon?: ReactNode;
    iconButtonLabel?: string;
    iconDisabled?: boolean;
    id?: string;
    label?: string;
    maxRows?: number;
    minRows?: number;
    name?: string;
    placeholder?: string;
    readOnly?: boolean;
    required?: boolean;
    selectOnFocus?: boolean;
    success?: boolean | string;
    value?: number | string;
    onChange?: (event: ChangeEvent<HTMLTextAreaElement>, newValue: string) => void;
    onHeightChange?: TextareaAutosizeProps['onHeightChange'];
    onIconClick?: () => void;
}

export type { TextareaProps };
