{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card-wizard-wizard-1-1",
  "type": "registry:block",
  "title": "Project setup",
  "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/wizard-wizard-1-1.tsx",
      "type": "registry:component",
      "target": "components/overtrue/blocks/wizard-wizard-1-1.tsx",
      "content": "\"use client\";\nimport { BlockFrame } from \"./runtime/blocks/frame\";\nimport \"./runtime/cards.css\";\n// Extracted from src/components/overtrue/scenes/settings.tsx:389.\nimport { useState } from \"react\";\nimport { team } from \"./runtime/data/workspace/studio\";\nimport { useWorkData } from \"./runtime/components/overtrue/workspace/work-data\";\nimport {\n  SceneCard,\n  Action,\n  Go,\n  Pill,\n} from \"./runtime/components/overtrue/scenes/shared\";\n\nfunction CardExample({ id = \"wizard\" }: { id?: string } = {}) {\n  const { projects, setProjects, clients } = useWorkData();\n  const [createdId, setCreatedId] = useState<string | null>(null);\n  const [step, setStep] = useState(0);\n  const [name, setName] = useState(\"\");\n  const [client, setClient] = useState(\"Culture venue\");\n  const [done, setDone] = useState(false);\n  const [brief, setBrief] = useState(\"\");\n  const [members, setMembers] = useState([true, true, true]);\n\n  return (\n    <>\n      <div className=\"overtrue-block-content\" data-workspace-page={id}>\n        <SceneCard\n          title={\n            done\n              ? \"Your project is ready\"\n              : step === 0\n                ? \"What are we working on?\"\n                : step === 1\n                  ? \"Good work starts with the right people.\"\n                  : \"One last look.\"\n          }\n        >\n          {done ? (\n            <div className=\"scene-empty\">\n              <img\n                src=\"https://ui.overtrue.xyz/assets/overtrue/illustration-connected.webp\"\n                alt=\"Project ready\"\n              />\n              <h2>{name}</h2>\n              <p>Created in this demo session for {client}.</p>\n              <Go to={`/datagrid?project=${createdId}`}>Open project</Go>\n            </div>\n          ) : (\n            <form\n              className=\"scene-form\"\n              onSubmit={(e) => {\n                e.preventDefault();\n                if (step < 2) {\n                  setStep(step + 1);\n                  return;\n                }\n                const projectId = `PRJ-${Math.max(...projects.map((project) => Number(project.id.replace(/\\D/g, \"\")))) + 1}`;\n                setProjects((current) => [\n                  ...current,\n                  {\n                    id: projectId,\n                    name: name.trim(),\n                    client,\n                    owner: team[0].name,\n                    category: \"New engagement\",\n                    progress: 0,\n                    budget: 0,\n                    due: \"To be scheduled\",\n                    status: \"Planned\",\n                    image: \"https://ui.overtrue.xyz/assets/overtrue/project-06.webp\",\n                    brief,\n                  },\n                ]);\n                setCreatedId(projectId);\n                setDone(true);\n              }}\n            >\n              {step === 0 ? (\n                <>\n                  <label>\n                    Project name\n                    <input\n                      required\n                      value={name}\n                      onChange={(e) => setName(e.target.value)}\n                      placeholder=\"For example, Visitor experience\"\n                    />\n                  </label>\n                  <label>\n                    Client\n                    <select\n                      className=\"native-select\"\n                      value={client}\n                      onChange={(e) => setClient(e.target.value)}\n                    >\n                      {clients.map((client) => (\n                        <option key={client.id}>{client.name}</option>\n                      ))}\n                    </select>\n                  </label>\n                  <label>\n                    What does success look like?\n                    <textarea\n                      rows={4}\n                      value={brief}\n                      onChange={(e) => setBrief(e.target.value)}\n                      placeholder=\"Describe the outcome, not just the deliverables.\"\n                    />\n                  </label>\n                </>\n              ) : step === 1 ? (\n                <>\n                  <p>\n                    Maya Okafor will be the project owner. Add the people who\n                    will help shape the work.\n                  </p>\n                  {[\n                    \"Ines Duarte · Research\",\n                    \"Leo Nakamura · Engineering\",\n                    \"June Park · Brand design\",\n                  ].map((s, i) => (\n                    <label className=\"scene-toggle-row\" key={s}>\n                      <span>{s}</span>\n                      <input\n                        type=\"checkbox\"\n                        checked={members[i]}\n                        onChange={(e) =>\n                          setMembers(\n                            members.map((value, index) =>\n                              index === i ? e.target.checked : value,\n                            ),\n                          )\n                        }\n                      />\n                    </label>\n                  ))}\n                </>\n              ) : (\n                <>\n                  <Pill>Ready to begin</Pill>\n                  <dl className=\"scene-details\">\n                    <div>\n                      <dt>Project</dt>\n                      <dd>{name}</dd>\n                    </div>\n                    <div>\n                      <dt>Client</dt>\n                      <dd>{client}</dd>\n                    </div>\n                    <div>\n                      <dt>Team</dt>\n                      <dd>\n                        Maya Okafor + {members.filter(Boolean).length}{\" \"}\n                        collaborators\n                      </dd>\n                    </div>\n                  </dl>\n                  {brief && (\n                    <p>\n                      <strong>Success looks like:</strong> {brief}\n                    </p>\n                  )}\n                  <p>\n                    You can refine the brief and invite more people once the\n                    project is open.\n                  </p>\n                </>\n              )}\n              <div className=\"scene-form-footer\">\n                {step > 0 && (\n                  <Action onClick={() => setStep(step - 1)}>Back</Action>\n                )}\n                <Action type=\"submit\" primary>\n                  {step === 2 ? \"Create project\" : \"Continue\"}\n                </Action>\n              </div>\n            </form>\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/wizard-wizard-1-1. Includes the shared card foundation and hosted demo imagery. Replace sample data and navigation with your application data."
}
