{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ai-artifact",
  "type": "registry:item",
  "title": "AI Artifact",
  "description": "A container component for displaying artifacts with header, actions, and content areas",
  "dependencies": [
    "@mui/material",
    "lucide-react",
    "@emotion/react",
    "@emotion/styled"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "components/ai-artifact/ai-artifact.tsx",
      "target": "src/mui-treasury/components/ai-artifact/ai-artifact.tsx",
      "content": "'use client';\n\nimport { type ComponentProps, memo } from 'react';\n\nimport Box from '@mui/material/Box';\nimport IconButton from '@mui/material/IconButton';\nimport Paper from '@mui/material/Paper';\nimport Tooltip from '@mui/material/Tooltip';\nimport Typography from '@mui/material/Typography';\nimport { XIcon } from 'lucide-react';\n\nexport type ArtifactProps = ComponentProps<typeof Paper>;\n\nexport const Artifact = ({ children, sx, ...props }: ArtifactProps) => (\n  <Paper\n    elevation={4}\n    sx={{\n      display: 'flex',\n      flexDirection: 'column',\n      overflow: 'hidden',\n      border: 1,\n      borderColor: 'divider',\n      ...sx,\n    }}\n    {...props}\n  >\n    {children}\n  </Paper>\n);\n\nexport type ArtifactHeaderProps = ComponentProps<typeof Box>;\n\nexport const ArtifactHeader = ({\n  children,\n  sx,\n  ...props\n}: ArtifactHeaderProps) => (\n  <Box\n    sx={[\n      (theme) => ({\n        display: 'flex',\n        alignItems: 'center',\n        justifyContent: 'space-between',\n        borderBottom: 1,\n        borderColor: 'divider',\n        bgcolor: (theme.vars || theme).palette.action.hover,\n        px: 2,\n        py: 1.5,\n      }),\n      ...(Array.isArray(sx) ? sx : [sx]),\n    ]}\n    {...props}\n  >\n    {children}\n  </Box>\n);\n\nexport type ArtifactCloseProps = ComponentProps<typeof IconButton>;\n\nexport const ArtifactClose = memo(\n  ({ children, size = 'small', sx, ...props }: ArtifactCloseProps) => (\n    <IconButton\n      size={size}\n      type=\"button\"\n      sx={{\n        width: 32,\n        height: 32,\n        p: 0,\n        color: 'text.secondary',\n        '&:hover': {\n          color: 'text.primary',\n        },\n        ...sx,\n      }}\n      aria-label=\"Close\"\n      {...props}\n    >\n      {children ?? <XIcon className=\"size-4\" />}\n    </IconButton>\n  ),\n);\n\nArtifactClose.displayName = 'ArtifactClose';\n\nexport type ArtifactTitleProps = ComponentProps<typeof Typography>;\n\nexport const ArtifactTitle = ({ sx, ...props }: ArtifactTitleProps) => (\n  <Typography\n    variant=\"body2\"\n    sx={{\n      fontWeight: 500,\n      color: 'text.primary',\n      ...sx,\n    }}\n    {...props}\n  />\n);\n\nexport type ArtifactDescriptionProps = ComponentProps<typeof Typography>;\n\nexport const ArtifactDescription = ({\n  sx,\n  ...props\n}: ArtifactDescriptionProps) => (\n  <Typography\n    variant=\"body2\"\n    sx={{\n      color: 'text.secondary',\n      ...sx,\n    }}\n    {...props}\n  />\n);\n\nexport type ArtifactActionsProps = ComponentProps<typeof Box>;\n\nexport const ArtifactActions = ({\n  children,\n  sx,\n  ...props\n}: ArtifactActionsProps) => (\n  <Box\n    sx={{\n      display: 'flex',\n      alignItems: 'center',\n      gap: 0.5,\n      ...sx,\n    }}\n    {...props}\n  >\n    {children}\n  </Box>\n);\n\nexport type ArtifactActionProps = ComponentProps<typeof IconButton> & {\n  tooltip?: string;\n  label?: string;\n  icon?: React.ComponentType<{ className?: string }>;\n};\n\nexport const ArtifactAction = ({\n  tooltip,\n  label,\n  icon: Icon,\n  children,\n  size = 'small',\n  sx,\n  ...props\n}: ArtifactActionProps) => {\n  const button = (\n    <IconButton\n      size={size}\n      type=\"button\"\n      sx={{\n        width: 32,\n        height: 32,\n        p: 0,\n        color: 'text.secondary',\n        '&:hover': {\n          color: 'text.primary',\n        },\n        ...sx,\n      }}\n      aria-label={label || tooltip}\n      {...props}\n    >\n      {Icon ? <Icon className=\"size-4\" /> : children}\n    </IconButton>\n  );\n\n  if (tooltip) {\n    return (\n      <Tooltip title={tooltip} arrow>\n        {button}\n      </Tooltip>\n    );\n  }\n\n  return button;\n};\n\nexport type ArtifactContentProps = ComponentProps<typeof Box>;\n\nexport const ArtifactContent = ({\n  children,\n  sx,\n  ...props\n}: ArtifactContentProps) => (\n  <Box\n    sx={{\n      flex: 1,\n      overflow: 'auto',\n      p: 2,\n      ...sx,\n    }}\n    {...props}\n  >\n    {children}\n  </Box>\n);\n",
      "type": "registry:item"
    },
    {
      "path": "components/ai-artifact/index.ts",
      "target": "src/mui-treasury/components/ai-artifact/index.ts",
      "content": "export * from './ai-artifact';\n",
      "type": "registry:item"
    }
  ],
  "meta": {
    "category": "ai",
    "subcategory": "elements"
  }
}