{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "extends": "none",
  "name": "leaderboard-currency-example",
  "title": "Leaderboard Currency",
  "description": "leaderboard-currency-example",
  "registryDependencies": [
    "https://intentui.com/r/leaderboard"
  ],
  "files": [
    {
      "path": "src/components/examples/visualizations/leaderboard/leaderboard-currency-example.tsx",
      "content": "\"use client\"\n\nimport {\n  Leaderboard,\n  LeaderboardContent,\n  LeaderboardEnd,\n  LeaderboardItem,\n  LeaderboardStart,\n} from \"@/components/ui/leaderboard\"\n\nconst topRevenueSources = [\n  { label: \"United States\", amount: 30000 },\n  { label: \"Europe\", amount: 24500 },\n  { label: \"Asia Pacific\", amount: 19800 },\n  { label: \"Canada\", amount: 12400 },\n  { label: \"Latin America\", amount: 7600 },\n]\n\nconst maxAmount = Math.max(...topRevenueSources.map((item) => item.amount))\n\nexport default function LeaderboardCurrencyDemo() {\n  return (\n    <Leaderboard>\n      <LeaderboardContent>\n        {topRevenueSources.map((item, index) => (\n          <LeaderboardItem\n            key={index}\n            maxValue={maxAmount}\n            value={item.amount}\n            formatOptions={{\n              style: \"currency\",\n              currency: \"USD\",\n              maximumFractionDigits: 0,\n            }}\n          >\n            {({ valueText }) => (\n              <>\n                <LeaderboardStart>{item.label}</LeaderboardStart>\n                <LeaderboardEnd>{valueText}</LeaderboardEnd>\n              </>\n            )}\n          </LeaderboardItem>\n        ))}\n      </LeaderboardContent>\n    </Leaderboard>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/leaderboard-currency-example/page.tsx"
    }
  ],
  "type": "registry:page"
}