{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card-saved-views-your-views-1",
  "type": "registry:block",
  "title": "Your views",
  "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/saved-views-your-views-1.tsx",
      "type": "registry:component",
      "target": "components/overtrue/blocks/saved-views-your-views-1.tsx",
      "content": "\"use client\";\nimport { BlockFrame } from \"./runtime/blocks/frame\";\nimport \"./runtime/cards.css\";\n// Extracted from src/components/overtrue/scenes/state-patterns.tsx:183.\nimport { useState } from \"react\";\nimport { SceneCard, Action, Go } from \"./runtime/components/overtrue/scenes/shared\";\n\nfunction CardExample() {\n  const [views, setViews] = useState([\n    \"Visitor journey\",\n    \"Identity handover\",\n    \"Member permissions\",\n    \"Publication templates\",\n  ]);\n  const [, setRemoved] = useState<{\n    name: string;\n    index: number;\n  } | null>(null);\n  const [, setOpen] = useState(false);\n  const [, setGeneration] = useState(0);\n\n  return (\n    <>\n      <div className=\"overtrue-block-content\" data-workspace-page=\"toasts\">\n        <SceneCard title=\"Your views\">\n          <div className=\"scene-record-list\">\n            {views.map((view, index) => (\n              <div key={view}>\n                <div className=\"scene-record-copy\">\n                  <strong>{view}</strong>\n                  <small>Private view · Task workspace</small>\n                </div>\n                <Go\n                  to={`/tasks-list?q=${encodeURIComponent(view.toLowerCase().split(\" \")[0])}`}\n                >\n                  Open\n                </Go>\n                <Action\n                  onClick={() => {\n                    setRemoved({ name: view, index });\n                    setViews((items) => items.filter((item) => item !== view));\n                    setGeneration((value) => value + 1);\n                    setOpen(true);\n                  }}\n                >\n                  Remove\n                </Action>\n              </div>\n            ))}\n            {!views.length && (\n              <p>No saved views. Open the task list to continue working.</p>\n            )}\n          </div>\n        </SceneCard>\n      </div>\n    </>\n  );\n}\n\nexport default function Block() { return <BlockFrame><CardExample /></BlockFrame>; }\n"
    }
  ],
  "docs": "Documentation: https://ui.overtrue.xyz/blocks/saved-views-your-views-1. Includes the shared card foundation and hosted demo imagery. Replace sample data and navigation with your application data."
}
