{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card-billing-billing-2-2",
  "type": "registry:block",
  "title": "Billing summary",
  "description": "Billing card from the overtrue/ui workspace examples. Editable source, scoped styles, and demo interactions.",
  "categories": [
    "cards",
    "billing"
  ],
  "registryDependencies": [
    "https://ui.overtrue.xyz/r/overtrue-card-foundation.json"
  ],
  "files": [
    {
      "path": "src/blocks/registry/billing-billing-2-2.tsx",
      "type": "registry:component",
      "target": "components/overtrue/blocks/billing-billing-2-2.tsx",
      "content": "\"use client\";\nimport { BlockFrame } from \"./runtime/blocks/frame\";\nimport \"./runtime/cards.css\";\n// Extracted from src/components/overtrue/scenes/billing.tsx:85.\nimport { useState } from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { invoices } from \"./runtime/data/workspace/studio\";\nimport { SceneCard, Pill } from \"./runtime/components/overtrue/scenes/shared\";\n\nfunction CardExample({ id = \"pay\" }: { id?: string } = {}) {\n  const [filter] = useState(\"All invoices\");\n  const shown = invoices.filter(\n    (invoice) => filter === \"All invoices\" || invoice.status === filter,\n  );\n\n  return (\n    <>\n      <div className=\"overtrue-block-content\" data-workspace-page={id}>\n        <SceneCard className=\"scene-table-card\">\n          <div\n            className=\"scene-table-wrap\"\n            tabIndex={0}\n            role=\"region\"\n            aria-label=\"Invoices, scroll to see all columns\"\n          >\n            <table className=\"scene-table\">\n              <thead>\n                <tr>\n                  <th>Invoice</th>\n                  <th>Client</th>\n                  <th>Issued</th>\n                  <th>Due date</th>\n                  <th className=\"scene-number\">Amount</th>\n                  <th>Status</th>\n                </tr>\n              </thead>\n              <tbody>\n                {shown.map((invoice) => (\n                  <tr key={invoice.id}>\n                    <td>\n                      <Link to={`/invoice?invoice=${invoice.id}`}>\n                        <strong>{invoice.id}</strong>\n                      </Link>\n                    </td>\n                    <td>\n                      <strong>{invoice.client}</strong>\n                      <small>{invoice.description}</small>\n                    </td>\n                    <td>{invoice.issued}</td>\n                    <td>{invoice.due}</td>\n                    <td className=\"scene-number\">\n                      ${invoice.amount.toLocaleString(\"en-US\")}\n                    </td>\n                    <td>\n                      <Pill>{invoice.status}</Pill>\n                    </td>\n                  </tr>\n                ))}\n              </tbody>\n            </table>\n          </div>\n          <div className=\"scene-table-summary\" role=\"status\">\n            <span>\n              {shown.length} of {invoices.length} invoices\n            </span>\n            <span>\n              View total{\" \"}\n              <strong>\n                $\n                {shown\n                  .reduce((sum, invoice) => sum + invoice.amount, 0)\n                  .toLocaleString(\"en-US\")}\n              </strong>\n            </span>\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/billing-billing-2-2. Includes the shared card foundation and hosted demo imagery. Replace sample data and navigation with your application data."
}
