{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "queue-solid",
  "title": "Queue (Solid)",
  "description": "The agent's to-do list, queued and completed, that people can reorder, send now, edit and clear, or the messages queued in a Composer.",
  "dependencies": [
    "@kind-ui/agent-ui@0.9.0",
    "@ui-sdk/core@0.1.0-beta.17",
    "@ui-sdk/solid@0.1.0-beta.17"
  ],
  "registryDependencies": [
    "@kind-ui/agent-ui-setup"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/solid/queue.tsx",
      "content": "import { type QueueSection as QueueSectionValue, queuePrimitive } from \"@kind-ui/agent-ui/core\";\nimport type { ComponentProps } from \"@solidjs/web\";\nimport { createParts } from \"@ui-sdk/solid/primitive\";\nimport { For, omit } from \"solid-js\";\n\nconst parts = createParts(queuePrimitive, {\n  root: \"div\",\n  section: \"div\",\n  \"section-trigger\": \"button\",\n  \"section-content\": \"div\",\n  list: \"ul\",\n  item: \"li\",\n  \"item-icon\": \"span\",\n  \"item-title\": \"span\",\n  \"item-description\": \"span\",\n  \"item-send\": \"button\",\n  \"item-edit\": \"button\",\n  \"item-remove\": \"button\",\n  instructions: \"span\",\n});\n\nexport type QueueProps = ComponentProps<typeof parts.Root>;\n\n/**\n * The agent's queue: pending items under Queued, complete ones under Completed, each with a count. Any `children`\n * replace the default sections.\n */\nexport function Queue(props: QueueProps) {\n  return <parts.Root {...omit(props, \"children\")}>{props.children ?? <DefaultParts />}</parts.Root>;\n}\n\nexport const QueueSection = parts.Section;\nexport const QueueSectionContent = parts.SectionContent;\nexport const QueueItemIcon = parts.ItemIcon;\n/** Sends a queued item now, shown while `onSend` is set. Named \"Send now\"; an arrow unless you pass children. */\nexport const QueueItemSend = parts.ItemSend;\n/** Gives a queued item back to the Composer it's docked in, shown while `onEdit` is set. A pencil unless you pass children. */\nexport const QueueItemEdit = parts.ItemEdit;\n/** Removes an item, shown while `onRemove` is set. An ✕ unless you pass children. */\nexport const QueueItemRemove = parts.ItemRemove;\n\nexport type QueueSectionTriggerProps = ComponentProps<typeof parts.SectionTrigger>;\n\n/** The section's title and count, unless you pass children. */\nexport function QueueSectionTrigger(props: QueueSectionTriggerProps) {\n  return (\n    <parts.SectionTrigger {...omit(props, \"children\")}>\n      {props.children ??\n        ((state: { title: string; count: number }) => (\n          <>\n            <span data-title=\"\">{state.title}</span>\n            <span data-count=\"\">{state.count}</span>\n          </>\n        ))}\n    </parts.SectionTrigger>\n  );\n}\n\nexport type QueueListProps = ComponentProps<typeof parts.List>;\n\n/** An item for each of the section's rows, unless you pass children. */\nexport function QueueList(props: QueueListProps) {\n  return (\n    <parts.List {...omit(props, \"children\")}>\n      {props.children ??\n        ((state) => (\n          <For each={state.rows} keyed={(row) => row.item.id}>\n            {(row) => <QueueItem value={row().item.id} />}\n          </For>\n        ))}\n    </parts.List>\n  );\n}\n\nexport type QueueItemProps = ComponentProps<typeof parts.Item>;\n\n/**\n * The item whose `id` is `value`. Without children, it shows the item's mark, title and description, then Send now,\n * Edit and Remove.\n */\nexport function QueueItem(props: QueueItemProps) {\n  return <parts.Item {...omit(props, \"children\")}>{props.children ?? <DefaultItemParts />}</parts.Item>;\n}\n\nexport type QueueItemTitleProps = ComponentProps<typeof parts.ItemTitle>;\n\n/** The item's `title`, unless you pass children. */\nexport function QueueItemTitle(props: QueueItemTitleProps) {\n  return (\n    <parts.ItemTitle {...omit(props, \"children\")}>\n      {props.children ?? ((state: { title: string }) => state.title)}\n    </parts.ItemTitle>\n  );\n}\n\nexport type QueueItemDescriptionProps = ComponentProps<typeof parts.ItemDescription>;\n\n/** The item's `description`, unless you pass children. Hidden while empty. */\nexport function QueueItemDescription(props: QueueItemDescriptionProps) {\n  return (\n    <parts.ItemDescription {...omit(props, \"children\")}>\n      {props.children ?? ((state: { description: string }) => state.description)}\n    </parts.ItemDescription>\n  );\n}\n\nexport type QueueInstructionsProps = ComponentProps<typeof parts.Instructions>;\n\n/** The keys that move and remove items, read with each item and hidden from sight, unless you pass children. */\nexport function QueueInstructions(props: QueueInstructionsProps) {\n  return (\n    <parts.Instructions {...omit(props, \"children\")}>\n      {props.children ?? ((state: { text: string }) => state.text)}\n    </parts.Instructions>\n  );\n}\n\nfunction DefaultItemParts() {\n  return (\n    <>\n      <QueueItemIcon />\n      <span data-text=\"\">\n        <QueueItemTitle />\n        <QueueItemDescription />\n      </span>\n      <span data-queue-actions=\"\">\n        <QueueItemSend />\n        <QueueItemEdit />\n        <QueueItemRemove />\n      </span>\n    </>\n  );\n}\n\nfunction DefaultSection(props: { value: QueueSectionValue }) {\n  return (\n    <QueueSection value={props.value}>\n      <QueueSectionTrigger />\n      <QueueSectionContent>\n        <QueueList />\n      </QueueSectionContent>\n    </QueueSection>\n  );\n}\n\nfunction DefaultParts() {\n  return (\n    <>\n      <DefaultSection value=\"pending\" />\n      <DefaultSection value=\"complete\" />\n      <QueueInstructions />\n    </>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@ui/solid/queue.tsx"
    }
  ],
  "meta": {
    "layer": "solid"
  },
  "type": "registry:ui"
}
