import Button from "@/components/Button/Button";
import {useState} from "react";

export default function Car({ initialData }: any) {
    const [formData, setFormData] = useState({
        id: initialData?.id || null,
    });

    const handleChange = (e: any) => {
        const { name, value } = e.target;
        setFormData({
            ...formData,
            [name]: value
        });
    };

    const handleSubmit = () => {
        console.log("Collected Data:", formData);
    };

    return (
        <>
            <Button onClickAction={handleSubmit}>Сохранить</Button>
        </>
    );
}
