import React, { useState } from 'react'; import { Box, Button, TextField, Typography, Grid } from '@mui/material'; export default function AddProductForm({ onAdd }) { const [product, setProduct] = useState({ name: '', price: '', supplier: '', stock: '', category: '', }); const handleChange = (e) => { const { name, value } = e.target; setProduct((prev) => ({ ...prev, [name]: value })); }; const handleSave = () => { if (onAdd) { onAdd(product); setProduct({ name: '', price: '', provider: '', stock: '', category: '' }); } }; const handleDelete = () => { console.log('Deleting product'); }; const handleUpdate = () => { console.log('Updating product:', product); }; return ( Add Products ); }