/** * External dependencies */ import { __ } from '@wordpress/i18n'; import { Button } from '@wordpress/components'; import { useRef, useState } from '@wordpress/element'; import type { UniqueIdentifier } from '@dnd-kit/core'; /** * Internal dependencies */ import { SettingsModal } from '../../shared-components'; import Form from './form'; import type { PickupLocation } from '../types'; const EditLocation = ( { locationData, editingLocation, onClose, onSave, onDelete, }: { locationData: PickupLocation | null; editingLocation: UniqueIdentifier | 'new'; onClose: () => void; onSave: ( location: PickupLocation ) => void; onDelete: () => void; } ): JSX.Element | null => { const formRef = useRef( null ); const [ values, setValues ] = useState< PickupLocation >( locationData as PickupLocation ); if ( ! locationData ) { return null; } return ( { editingLocation !== 'new' && ( ) } } >
); }; export default EditLocation;