{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "portfolio-value-chart",
  "type": "registry:item",
  "title": "Portfolio Value Chart",
  "description": "A portfolio-value-chart block.",
  "dependencies": [
    "@mui/material",
    "@mui/x-charts",
    "@emotion/react",
    "@emotion/styled"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "blocks/portfolio-value-chart/portfolio-value-chart.tsx",
      "target": "src/mui-treasury/blocks/portfolio-value-chart/portfolio-value-chart.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\n\nimport Box from '@mui/material/Box';\nimport Card from '@mui/material/Card';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\nimport { LineChart } from '@mui/x-charts/LineChart';\n\n// Generate mock data for the chart\nconst generateData = () => {\n  // Simple x-axis points (0-32 for days)\n  const xData = Array.from({ length: 33 }, (_, i) => i);\n\n  // Generate EKG-like portfolio values with more dramatic variations\n  const etfData = xData.map((day) => {\n    // ETF: Multiple frequency waves for EKG-like pattern\n    const base = 95000;\n    const wave1 = Math.sin(day * 0.8) * 3000;\n    const wave2 = Math.sin(day * 1.5) * 2000;\n    const wave3 = Math.cos(day * 0.3) * 1500;\n    const noise = Math.sin(day * 3) * 500;\n    return base + wave1 + wave2 + wave3 + noise + day * 50;\n  });\n\n  const vitainvestData = xData.map((day) => {\n    // Vitainvest: Strong upward trend with oscillations\n    const base = 85000;\n    const wave1 = Math.sin(day * 0.6) * 2500;\n    const wave2 = Math.cos(day * 1.2) * 1500;\n    const spike = day % 5 === 0 ? (Math.sin(day * 2.7) * 0.5 + 0.5) * 1000 : 0;\n    return base + wave1 + wave2 + spike + day * 600;\n  });\n\n  const ishareData = xData.map((day) => {\n    // iShares: Volatile pattern with sharp movements\n    const base = 115000;\n    const wave1 = Math.sin(day * 0.4) * 5000;\n    const wave2 = Math.cos(day * 0.9) * 3000;\n    const wave3 = Math.sin(day * 2) * 2000;\n    const trend = day < 16 ? -day * 400 : (day - 16) * 300;\n    return base + wave1 + wave2 + wave3 + trend;\n  });\n\n  return { xData, etfData, vitainvestData, ishareData };\n};\n\nconst { xData, etfData, vitainvestData, ishareData } = generateData();\n\n// Format x-axis labels\nconst xAxisData = xData.map((_: number, index: number) => {\n  if (index === 0) return 'Aug 25';\n  if (index === 4) return 'Aug 29';\n  if (index === 8) return 'Sep 02';\n  if (index === 12) return 'Sep 06';\n  if (index === 16) return 'Sep 10';\n  if (index === 20) return 'Sep 14';\n  if (index === 24) return 'Sep 18';\n  if (index === 28) return 'Sep 22';\n  if (index === 32) return 'Sep 26';\n  return '';\n});\n\nexport function PortfolioValueChart() {\n  return (\n    <Card\n      sx={(theme) => ({\n        p: 3,\n        borderRadius: 2,\n        border: `1px solid`,\n        borderColor: 'divider',\n        bgcolor: 'background.paper',\n        boxShadow: 'none',\n        ...theme.applyStyles('dark', {\n          borderColor: 'divider',\n        }),\n      })}\n    >\n      <Stack spacing={3}>\n        <Box>\n          <Typography\n            variant=\"body2\"\n            sx={{\n              color: 'text.secondary',\n              mb: 0.5,\n            }}\n          >\n            Portfolio Value\n          </Typography>\n          <Typography\n            variant=\"h4\"\n            component=\"div\"\n            sx={{\n              fontWeight: 700,\n              color: 'text.primary',\n            }}\n          >\n            $328,505.10\n          </Typography>\n        </Box>\n\n        <Stack\n          direction=\"row\"\n          spacing={2.5}\n          sx={{ px: 1 }}\n          role=\"list\"\n          aria-label=\"Portfolio legend\"\n        >\n          <Stack\n            direction=\"row\"\n            spacing={1}\n            role=\"listitem\"\n            sx={{\n              alignItems: 'center',\n            }}\n          >\n            <Box\n              sx={{\n                width: 24,\n                height: 3,\n                bgcolor: '#2196F3',\n                borderRadius: 1,\n              }}\n              aria-hidden=\"true\"\n            />\n            <Typography\n              variant=\"body2\"\n              sx={{\n                color: 'text.secondary',\n              }}\n            >\n              ETF Shares Vital\n            </Typography>\n          </Stack>\n          <Stack\n            direction=\"row\"\n            spacing={1}\n            role=\"listitem\"\n            sx={{\n              alignItems: 'center',\n            }}\n          >\n            <Box\n              sx={{\n                width: 24,\n                height: 3,\n                bgcolor: '#00BCD4',\n                borderRadius: 1,\n              }}\n              aria-hidden=\"true\"\n            />\n            <Typography\n              variant=\"body2\"\n              sx={{\n                color: 'text.secondary',\n              }}\n            >\n              Vitainvest Core\n            </Typography>\n          </Stack>\n          <Stack\n            direction=\"row\"\n            spacing={1}\n            role=\"listitem\"\n            sx={{\n              alignItems: 'center',\n            }}\n          >\n            <Box\n              sx={{\n                width: 24,\n                height: 3,\n                bgcolor: '#9C27B0',\n                borderRadius: 1,\n              }}\n              aria-hidden=\"true\"\n            />\n            <Typography\n              variant=\"body2\"\n              sx={{\n                color: 'text.secondary',\n              }}\n            >\n              iShares Tech Growth\n            </Typography>\n          </Stack>\n        </Stack>\n\n        <Box\n          sx={{ width: '100%', height: 350 }}\n          role=\"img\"\n          aria-label=\"Portfolio performance chart showing ETF Shares Vital, Vitainvest Core, and iShares Tech Growth from August 25 to September 26\"\n        >\n          <LineChart\n            series={[\n              {\n                data: etfData,\n                color: '#2196F3',\n                curve: 'catmullRom',\n                showMark: false,\n              },\n              {\n                data: vitainvestData,\n                color: '#00BCD4',\n                curve: 'catmullRom',\n                showMark: false,\n              },\n              {\n                data: ishareData,\n                color: '#9C27B0',\n                curve: 'catmullRom',\n                showMark: false,\n              },\n            ]}\n            xAxis={[\n              {\n                data: xData,\n                scaleType: 'point',\n                tickLabelStyle: {\n                  fontSize: 12,\n                  fill: 'var(--mui-palette-text-secondary)',\n                },\n                tickNumber: 9,\n                valueFormatter: (value) => {\n                  const index = xData.indexOf(value);\n                  return xAxisData[index] || '';\n                },\n              },\n            ]}\n            yAxis={[\n              {\n                position: 'none',\n                width: 0,\n              },\n            ]}\n            margin={{\n              left: 10,\n              right: 10,\n              top: 30,\n              bottom: 40,\n            }}\n            height={350}\n            grid={{\n              horizontal: true,\n              vertical: false,\n            }}\n            sx={(theme) => ({\n              '& .MuiChartsAxis-line': {\n                stroke: 'var(--mui-palette-divider)',\n                strokeOpacity: 0.3,\n              },\n              '& .MuiChartsAxis-tick': {\n                stroke: 'var(--mui-palette-divider)',\n                strokeOpacity: 0.3,\n              },\n              '& .MuiChartsGrid-line': {\n                stroke: 'var(--mui-palette-divider)',\n                strokeOpacity: 0.15,\n              },\n              '& .MuiLineElement-root': {\n                strokeWidth: 2,\n              },\n              ...theme.applyStyles('dark', {\n                '& .MuiChartsAxis-line': {\n                  strokeOpacity: 0.2,\n                },\n                '& .MuiChartsAxis-tick': {\n                  strokeOpacity: 0.2,\n                },\n                '& .MuiChartsGrid-line': {\n                  strokeOpacity: 0.1,\n                },\n              }),\n            })}\n          />\n        </Box>\n      </Stack>\n    </Card>\n  );\n}\n",
      "type": "registry:item"
    },
    {
      "path": "blocks/portfolio-value-chart/index.ts",
      "target": "src/mui-treasury/blocks/portfolio-value-chart/index.ts",
      "content": "export * from './portfolio-value-chart';\n",
      "type": "registry:item"
    }
  ],
  "meta": {
    "screenshot": "/og/portfolio-value-chart.png",
    "category": "block",
    "exportName": "PortfolioValueChart",
    "subcategory": "dashboard"
  }
}