import { useState } from 'react' import { BACKLOG_STATUSES, BACKLOG_STATUS_LABELS, } from '../constants/status.js' import { StatusBadge } from './StatusBadge.jsx' import { PriorityBadge } from './PriorityBadge.jsx' import { EmptyState } from './EmptyState.jsx' import { GateSelect, gateTitleById } from './GateSelect.jsx' export function BacklogSection({ items, roadmapItems = [], canManage, onCreate, onUpdateGate, onUpdateStatus, onConvert, onDelete, busy, }) { const [title, setTitle] = useState('') const [gateId, setGateId] = useState('') const [showForm, setShowForm] = useState(false) async function handleSubmit(e) { e.preventDefault() if (!title.trim()) return await onCreate({ title: title.trim(), roadmap_item_id: gateId || undefined, }) setTitle('') setGateId('') setShowForm(false) } return (

Backlog

{canManage && ( )}
{showForm && canManage && (
{roadmapItems.length > 0 && ( )}
)} {items.length === 0 && }
) }