import { ChangeEvent } from 'react'; import { Size } from '../../types'; /** * Base props shared by both SearchBar variants */ interface BaseProps extends Omit, 'size'> { /** * String or template literal key for i18next translation */ placeholder?: string; /** * Control SearchBar size (excluding 'sm') */ size?: Exclude; /** * Disable the input */ disabled?: boolean; /** * Disabled status for button */ buttonDisabled?: boolean; /** * Optional class for styling purpose * Optional class for custom styling */ className?: string; /** * onChange handler for input changes */ onChange?: (e: ChangeEvent) => void; /** * Current value of the input */ value?: string; /** * Show a clear (reset) button when value is present */ clearable?: boolean; } /** * Default SearchBar with a submit button */ type DefaultSearchBar = { /** * Use false to render the default SearchBar (with a button) */ isVariant: false; /** * Callback when clicking the search button */ onClick: () => void; }; /** * Dynamic SearchBar with icon and no submit button */ type DynamicSearchBar = { /** * Use true to render the dynamic SearchBar (with an icon inside input) */ isVariant: true; /** * onClick must be undefined for dynamic variant */ onClick?: undefined; }; /** * Props for the SearchBar component */ type Props = DefaultSearchBar | DynamicSearchBar; export type SearchBarProps = BaseProps & Props; /** * SearchBar component to handle dynamic or static search input */ declare const SearchBar: { ({ isVariant, size, placeholder, className, disabled, buttonDisabled, onChange, onClick, value, clearable, ...restProps }: SearchBarProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export default SearchBar;