import { MapPin } from 'lucide-react'; import React from 'react'; import type { Category, TranslationFn } from '../../types'; import { focusRevealedEditor } from '../shared/dialogFocus'; import { NumericInput } from '../shared/NumericInput'; import CategoryTileMenu from './CategoryTileMenu'; import type { PlaceEditState } from './usePlaceEdit'; /** * The edit form of a place of All places in the desktop dialog: the name with * its category, the address, the position and the description. The change is * made on every copy of the place in the reader's lists and trips they may edit. */ export default function PlaceEditForm({ edit, categories, t, }: { edit: PlaceEditState; categories: Category[]; t: TranslationFn; }): React.ReactElement | null { const { draft, target } = edit; if (!draft || !target) return null; return (