import { Box } from '@mui/material' import { type RefObject, useCallback } from 'react' import { useTranslation } from 'react-i18next' import { SearchInput, StickySearchInput } from '../Search/SearchInput.js' interface ChainSearchInputProps { inputRef: RefObject inExpansion: boolean onChange: () => void onClear: () => void searchHeaderHeight: string | number } export const ChainSearchInput = ({ inputRef, inExpansion, onChange, onClear, searchHeaderHeight, }: ChainSearchInputProps) => { const { t } = useTranslation() const handleClear = useCallback(() => { if (inputRef.current) { inputRef.current.value = '' } onClear() }, [onClear, inputRef.current]) if (inExpansion) { return ( ) } return ( ) }