{
  "component": {
    "id": "incident-console",
    "name": "Incident console",
    "tier": "pro",
    "exampleId": "incident-console",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/incident-console-demo.tsx",
    "exportName": "IncidentConsoleDemo",
    "sha256": "5d5e14edc184b4ad1523caefb60645f9efa54d3cb649b901c879f2c23e41f02c",
    "helperImports": [],
    "directComponentImports": [
      "incident-console"
    ],
    "sampleBoundary": "Existing local demo fixture with fictional data and callbacks. No live service, customer data, access key, or Pro source is included."
  },
  "install": {
    "command": "npx shadcn@latest add @tidal-pro/incident-console",
    "registryUrl": "https://tidalui.com/r/pro/incident-console.json",
    "namespace": "@tidal-pro",
    "access": "pro",
    "sourceDelivery": "server-gated",
    "requiresAuthorization": true,
    "tokenSource": "local-env",
    "tokenEnvName": "TIDALUI_TOKEN",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "@tidal-pro/incident-console",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/incident-console",
      "registryUrl": "https://tidalui.com/r/pro/incident-console.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/incident-console.tsx",
    "exports": [
      "TidalIncidentConsole",
      "TidalIncidentPhase",
      "TidalIncidentUpdate"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/incident-console.css",
      "components/ui/status-badge.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [
      "https://tidalui.com/r/tidal-button.json",
      "https://tidalui.com/r/status-badge.json"
    ],
    "additionalRegistry": [],
    "installClosure": [
      "incident-console",
      "status-badge",
      "tidal-button"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/incident-console.css",
      "components/ui/status-badge.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/incident-console.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/incident-console-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useId, useRef, useState, type MouseEvent } from \"react\";\n\nimport { TidalIncidentConsole, type TidalIncidentPhase, type TidalIncidentUpdate } from \"./components/ui/incident-console\";\n\nimport \"./components/ui/incident-console.css\";\n\nimport \"./components/ui/status-badge.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .incident-console-demo {\\n  display: grid;\\n  gap: 14px;\\n  width: 100%;\\n  min-width: 0;\\n  max-width: 940px;\\n  margin-inline: auto;\\n}\\n\\n.tidal-scope .incident-console-demo-note {\\n  display: grid;\\n  gap: 4px;\\n  min-width: 0;\\n  padding: 14px 16px;\\n  border: 1px solid var(--t-border);\\n  border-radius: var(--t-radius-control);\\n  background: var(--t-subtle);\\n  scroll-margin: 12px;\\n}\\n\\n.tidal-scope .incident-console-demo-note strong,\\n.tidal-scope .incident-console-demo-note span,\\n.tidal-scope .incident-console-demo-status {\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .incident-console-demo-note strong {\\n  font-size: 12px;\\n  line-height: 1.5;\\n}\\n\\n.tidal-scope .incident-console-demo-note span,\\n.tidal-scope .incident-console-demo-status {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.55;\\n}\\n\\n.tidal-scope .incident-console-demo-status {\\n  margin: 0;\\n  padding-inline: 2px;\\n}\";\n\nconst initialUpdates: TidalIncidentUpdate[] = [\n  {\n    id: \"update-identified\",\n    phase: \"identified\",\n    phaseLabel: \"Identified\",\n    title: \"Queue pressure isolated\",\n    detail:\n      \"The sample response team isolated delayed workspace notifications to one delivery queue.\",\n    time: { label: \"12 minutes ago\", dateTime: \"2026-10-14T22:48:00-05:00\" },\n    author: \"Mira Chen · Incident lead\",\n  },\n  {\n    id: \"update-investigating\",\n    phase: \"investigating\",\n    phaseLabel: \"Investigating\",\n    title: \"Response started\",\n    detail:\n      \"Workspace data remains available while some notification deliveries arrive late.\",\n    time: { label: \"24 minutes ago\", dateTime: \"2026-10-14T22:36:00-05:00\" },\n    author: \"Sample operations\",\n  },\n];\n\nfunction isUnmodifiedPrimary(event: MouseEvent<HTMLAnchorElement>) {\n  return (\n    event.button === 0 &&\n    !event.metaKey &&\n    !event.ctrlKey &&\n    !event.shiftKey &&\n    !event.altKey\n  );\n}\n\nexport function IncidentConsoleDemo({ theme }: { theme?: \"light\" | \"dark\" }) {\n  const generatedId = useId().replace(/:/g, \"\");\n  const runbookId = `incident-runbook-${generatedId}`;\n  const [phase, setPhase] = useState<TidalIncidentPhase>(\"identified\");\n  const [draft, setDraft] = useState(\"\");\n  const [updates, setUpdates] =\n    useState<readonly TidalIncidentUpdate[]>(initialUpdates);\n  const [message, setMessage] = useState(\n    \"Local sample incident. No service or paging system is connected.\",\n  );\n  const updateSequence = useRef(0);\n  const updateInput = useRef<HTMLTextAreaElement>(null);\n\n  const resolved = phase === \"resolved\";\n  const phaseLabel = resolved ? \"Resolved\" : \"Identified\";\n\n  return (\n    <div className=\"incident-console-demo\" data-theme={theme}>\n      <TidalIncidentConsole\n        incidentId=\"sample-delivery-delay\"\n        title=\"Workspace notification delays\"\n        description=\"Delayed workspace notifications. Investigation began at 10:36 PM.\"\n        phase={phase}\n        phaseLabel={phaseLabel}\n        severity=\"major\"\n        severityLabel=\"Major impact\"\n        impact={\n          resolved\n            ? \"Delivery has recovered in the local sample.\"\n            : \"Some workspace notifications are delayed.\"\n        }\n        started=\"10:36 PM\"\n        elapsed={resolved ? \"Resolved locally\" : \"24 minutes\"}\n        affectedServices={[\n          {\n            id: \"notification-delivery\",\n            name: \"Notification delivery\",\n            state: resolved ? \"operational\" : \"degraded\",\n            stateLabel: resolved ? \"Operational\" : \"Degraded\",\n            detail: resolved\n              ? \"Sample recovery recorded\"\n              : \"Messages may arrive late\",\n          },\n          {\n            id: \"workspace-api\",\n            name: \"Workspace API\",\n            state: \"operational\",\n            stateLabel: \"Operational\",\n            detail: \"Available in the sample\",\n          },\n        ]}\n        responders={[\n          {\n            id: \"mira\",\n            name: \"Mira Chen\",\n            role: \"Incident lead\",\n            marker: \"MC\",\n          },\n          {\n            id: \"jon\",\n            name: \"Jon Bell\",\n            role: \"Delivery systems\",\n            marker: \"JB\",\n          },\n        ]}\n        updates={updates}\n        links={[\n          {\n            id: \"runbook\",\n            label: \"Open response checklist\",\n            href: `#${runbookId}`,\n            linkProps: {\n              onClick: (event: import(\"react\").MouseEvent<HTMLAnchorElement>) => {\n                if (!isUnmodifiedPrimary(event)) return;\n                event.preventDefault();\n                document\n                  .getElementById(runbookId)\n                  ?.focus({ preventScroll: true });\n                setMessage(\"The local response checklist is open below.\");\n              },\n            },\n          },\n        ]}\n        draft={draft}\n        onDraftChange={setDraft}\n        onUpdateRequest={(_incidentId, value, event) => {\n          event.preventDefault();\n          updateSequence.current += 1;\n          setUpdates((current) => [\n            {\n              id: `local-update-${updateSequence.current}`,\n              phase,\n              phaseLabel,\n              title: value,\n              time: { label: \"Just now\" },\n              author: \"Local sample responder\",\n            },\n            ...current,\n          ]);\n          setDraft(\"\");\n          setMessage(\"A fictional update was added to this local sample.\");\n          queueMicrotask(() =>\n            updateInput.current?.focus({ preventScroll: true }),\n          );\n        }}\n        onResolveRequest={() => {\n          setPhase(\"resolved\");\n          setMessage(\n            \"The sample incident is resolved locally. Reopen is available.\",\n          );\n        }}\n        onReopenRequest={() => {\n          setPhase(\"identified\");\n          setMessage(\n            \"The sample incident is reopened locally. Resolve is available.\",\n          );\n        }}\n        updateInputRef={updateInput}\n        updateInputProps={{ maxLength: 180 }}\n      />\n\n      <section\n        id={runbookId}\n        className=\"incident-console-demo-note\"\n        aria-label=\"Response checklist\"\n        tabIndex={-1}\n      >\n        <strong>Response checklist</strong>\n        <span>\n          Confirm impact, publish an update, then record the supplied outcome.\n        </span>\n      </section>\n      <p className=\"incident-console-demo-status\" role=\"status\">\n        {message}\n      </p>\n    </div>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <IncidentConsoleDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/incident-console.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "phase",
      "type": "inferred-from-existing-demo",
      "initial": "\"identified\"",
      "setter": "setPhase",
      "proposalCanBeRejected": false
    },
    {
      "prop": "updates",
      "type": "inferred-from-existing-demo",
      "initial": "initialUpdates",
      "setter": "setUpdates",
      "proposalCanBeRejected": false
    },
    {
      "prop": "draft",
      "type": "inferred-from-existing-demo",
      "initial": "\"\"",
      "setter": "setDraft",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onDraftChange",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onReopenRequest",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onResolveRequest",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onUpdateRequest",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "The existing demo's native form callback receives the submit event.",
    "resetBehavior": "Native reset behavior remains available where the demo renders a resettable control.",
    "disabledBehavior": "Disabled controls remain excluded from successful native form submission.",
    "readOnlyBehavior": "Read-only controls retain their value and remain inspectable by the consumer."
  },
  "accessibility": {
    "labelSource": "Existing demo label or ARIA prop",
    "semantics": "Preserve the component's native element and the semantics demonstrated by the source fixture.",
    "keyboard": [
      "Tab and Shift+Tab",
      "Enter or Space for native activation",
      "Arrow keys where the component exposes a composite control"
    ],
    "focusReturn": "Preserve browser focus order and visible focus.",
    "errorAnnouncement": "No error announcement path is present in this demo; the consumer owns validation messaging.",
    "reducedMotion": "Verify prefers-reduced-motion with the existing component transition path.",
    "forcedColors": "Verify visible borders, text, and focus in forced-colors mode."
  },
  "responsive": {
    "widths": [
      320,
      390,
      768,
      1260
    ],
    "shortViewport": "Check the example at a 300px viewport height with keyboard or portal content visible.",
    "overflow": "The page should not gain horizontal overflow; component-local scrolling must remain intentional.",
    "touchTargetMinPx": 44,
    "coarseInputFontPx": 16
  },
  "errors": [
    {
      "fixture": "Exercise the existing demo's error, empty, loading, or invalid fixture.",
      "visibleResult": "The consumer-visible result must remain explicit and must not be replaced by a silent console error.",
      "focusResult": "Focus must remain on the triggering control or move to the announced error according to the native pattern.",
      "ownership": "Consumer-owned sample state only; no network request or customer data is used."
    }
  ],
  "verification": {
    "commands": [
      "npx tsc --noEmit",
      "npx vite build"
    ],
    "lockfile": "Use the consumer project's committed lockfile.",
    "browser": [
      "Chromium 1260x800",
      "Chromium 390x844",
      "Keyboard and reduced-motion pass"
    ]
  },
  "validation": {
    "consumerFixture": {
      "tsc": "pass",
      "viteBuild": "pass",
      "resourceModel": "Generated usage plus only the component files and CSS delivered by the primary item and listed registry dependencies."
    },
    "registryArtifact": "server-gated"
  },
  "exceptions": []
}
