import { ConfirmDialog } from '@/components/ui/ConfirmDialog' import { useClearObject } from '@/lib/objects' /** Confirm clearing every active plop from a bed — a soft remove (the rows are * kept with removed_at, so history and past seasons survive), as one step. */ export function ClearBedDialog({ objectId, objectName, plopCount, gardenId, onClose, }: { objectId: number objectName: string plopCount: number gardenId: number onClose: () => void }) { const clear = useClearObject(gardenId) return ( clear.mutateAsync(objectId)} onClose={onClose} > Pull all {plopCount} {plopCount === 1 ? 'planting' : 'plantings'} out of {objectName}. They stay in the journal and past seasons, and this is one undoable step. ) }