'use client'; import { Avatar, Select, SelectItem } from '@nextui-org/react'; import clsx from 'clsx'; import { getCountries } from 'lib/utils'; import { Shipping } from 'lib/woocomerce/models/shipping'; import { useState } from 'react'; export default function ShippingForm({ className, title, handleChangeAction }: { className?: string; title?: string; handleChangeAction?: (data: Shipping) => void; }) { const countries = getCountries(); const initialState: Shipping = { first_name: '', last_name: '', address_1: '', address_2: '', city: '', state: '', postcode: '', country: '', company: '' }; const [formData, setFormData] = useState(initialState); const onChange = (e: React.ChangeEvent) => { const newData = { ...formData, [e.target.name]: e.target.value }; setFormData(newData); if (handleChangeAction) { handleChangeAction(newData); } }; return (
{title &&

{title}

}
); }