{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card-data-loading-connection-preview-2",
  "type": "registry:block",
  "title": "Connection preview",
  "description": "Workspace card from the overtrue/ui workspace examples. Editable source, scoped styles, and demo interactions.",
  "categories": [
    "cards",
    "workspace"
  ],
  "registryDependencies": [
    "https://ui.overtrue.xyz/r/overtrue-card-foundation.json"
  ],
  "files": [
    {
      "path": "src/blocks/registry/data-loading-connection-preview-2.tsx",
      "type": "registry:component",
      "target": "components/overtrue/blocks/data-loading-connection-preview-2.tsx",
      "content": "\"use client\";\nimport { BlockFrame } from \"./runtime/blocks/frame\";\nimport \"./runtime/cards.css\";\n// Extracted from src/components/overtrue/scenes/state-patterns.tsx:366.\nimport { useState } from \"react\";\nimport { Steps } from \"./runtime/registry/overtrue/steps\";\nimport { SceneCard } from \"./runtime/components/overtrue/scenes/shared\";\n\nfunction CardExample({ id = \"placeholder\" }: { id?: string } = {}) {\n  const [state] = useState<\"loading\" | \"ready\" | \"error\">(\"loading\");\n  const [simulateError, setSimulateError] = useState(false);\n\n  return (\n    <>\n      <div className=\"overtrue-block-content\" data-workspace-page={id}>\n        <SceneCard title=\"Connection preview\">\n          <label className=\"scene-toggle-row\">\n            <span>Simulate a failed request</span>\n            <input\n              type=\"checkbox\"\n              checked={simulateError}\n              onChange={(e) => setSimulateError(e.target.checked)}\n            />\n          </label>\n          <p>\n            This example loads local records after a short delay. No remote\n            request is made.\n          </p>\n          <Steps\n            orientation=\"vertical\"\n            steps={[\n              \"Connect to workspace\",\n              \"Load project records\",\n              \"Ready to continue\",\n            ]}\n            current={state === \"ready\" ? 3 : state === \"loading\" ? 1 : 0}\n          />\n        </SceneCard>\n      </div>\n    </>\n  );\n}\n\nexport default function Block() { return <BlockFrame><CardExample /></BlockFrame>; }\n"
    }
  ],
  "docs": "Documentation: https://ui.overtrue.xyz/blocks/data-loading-connection-preview-2. Includes the shared card foundation and hosted demo imagery. Replace sample data and navigation with your application data."
}
