// components/molecules/ProductSearch.tsx "use client"; import { Box } from '@mui/material'; import Grid from '@mui/material/Grid2'; import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import Button from '@atoms/Button'; import Input from '@atoms/Input'; interface ProductSearchProps { onSearch: (plu: string) => void; } const ProductSearch: React.FC = ({ onSearch }) => { const [plu, setPlu] = useState(''); const { t } = useTranslation() const handleInputChange = (e: React.ChangeEvent) => { setPlu(e.target.value); }; const handleKeyDown = (e: React.KeyboardEvent) => { if (e.key === 'Enter') { onSearch(plu); } }; return (