import { AriaAttributes, InputHTMLAttributes, ReactNode, default as React } from 'react';
type InputProps = Omit, 'onSubmit'>;
type ButtonProps = {
onClick?: () => void;
testId?: string;
'aria-label'?: string;
};
export interface SearchInputFieldProps extends InputProps {
/**
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
*/
testId?: string;
/**
* Props for the submit button inside the input.
*/
buttonProps?: ButtonProps;
/**
* A React component that will be rendered as an icon (submit button).
* @default
*/
buttonIcon?: ReactNode;
/**
* Whether to show the attachment button.
* @default false
*/
showAttachmentButton?: boolean;
/**
* Props for the paperclip button inside the input.
*/
attachmentButtonProps?: ButtonProps;
/**
* Aria-label for the attachment button (e.g. from CMS).
*/
attachmentButtonAriaLabel?: string;
/**
* Aria-label for the submit button (e.g. from CMS).
*/
submitButtonAriaLabel?: string;
/**
* A React component that will be rendered as an icon (attachment button).
* @default
*/
attachmentButtonIcon?: ReactNode;
/**
* Aria-label for the search input (e.g. from CMS).
*/
'aria-label'?: AriaAttributes['aria-label'];
/**
* Callback function when submitted.
*/
onSubmit: (value: string) => void;
}
export interface SearchInputFieldRef {
inputRef?: HTMLInputElement | null;
formRef?: HTMLFormElement | null;
}
declare const SearchInputField: React.ForwardRefExoticComponent>;
export default SearchInputField;
//# sourceMappingURL=SearchInputField.d.ts.map