{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "switch-mui-treasury",
  "type": "registry:item",
  "title": "Switch (MUI Treasury)",
  "description": "Switch styled with the MUI Treasury theme — install the theme alongside.",
  "dependencies": [
    "@mui/material",
    "@emotion/react",
    "@emotion/styled"
  ],
  "registryDependencies": [
    "https://www.mui-treasury.com/r/mui-treasury.json"
  ],
  "files": [
    {
      "path": "components/switch-mui-treasury/switch-mui-treasury.tsx",
      "target": "src/mui-treasury/components/switch-mui-treasury/switch-mui-treasury.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\n\nimport { Box, Divider, Paper, Stack, Switch, Typography } from '@mui/material';\n\nconst SETTINGS = [\n  {\n    id: 'auto-assign',\n    title: 'Auto-assign to self',\n    description:\n      'When creating new issues, always assign them to yourself by default.',\n    initial: false,\n  },\n  {\n    id: 'branch-status',\n    title: 'On git branch copy, move issue to started',\n    description:\n      \"After copying the git branch name, issue status is moved to the team's first started workflow status.\",\n    initial: true,\n  },\n  {\n    id: 'auto-claim',\n    title: 'On move to started, assign to yourself',\n    description:\n      'When you move an unassigned issue to started, it will be automatically assigned to you.',\n    initial: true,\n  },\n  {\n    id: 'pr-ready',\n    title: 'Auto-convert draft pull requests',\n    description:\n      'Mark draft pull requests as ready for review when a review is requested or the PR is approved.',\n    initial: false,\n  },\n];\n\nexport function SwitchMuiTreasury() {\n  const [values, setValues] = React.useState<Record<string, boolean>>(\n    Object.fromEntries(SETTINGS.map((s) => [s.id, s.initial])),\n  );\n\n  return (\n    <Box sx={{ width: '100%', maxWidth: 640, mx: 'auto' }}>\n      <Typography variant=\"subtitle1\" sx={{ mb: 1, fontWeight: 600 }}>\n        Automations and workflows\n      </Typography>\n      <Paper variant=\"outlined\">\n        <Stack divider={<Divider />}>\n          {SETTINGS.map((setting) => (\n            <Stack\n              key={setting.id}\n              direction=\"row\"\n              spacing={2}\n              sx={{\n                alignItems: 'flex-start',\n                p: 2,\n              }}\n            >\n              <Box sx={{ flexGrow: 1 }}>\n                <Typography variant=\"body1\" sx={{ fontWeight: 500 }}>\n                  {setting.title}\n                </Typography>\n                <Typography\n                  variant=\"body2\"\n                  sx={{\n                    color: 'text.secondary',\n                  }}\n                >\n                  {setting.description}\n                </Typography>\n              </Box>\n              <Switch\n                checked={values[setting.id]}\n                onChange={(e) =>\n                  setValues((v) => ({ ...v, [setting.id]: e.target.checked }))\n                }\n              />\n            </Stack>\n          ))}\n        </Stack>\n      </Paper>\n    </Box>\n  );\n}\n",
      "type": "registry:item"
    },
    {
      "path": "components/switch-mui-treasury/index.ts",
      "target": "src/mui-treasury/components/switch-mui-treasury/index.ts",
      "content": "export * from './switch-mui-treasury';\n",
      "type": "registry:item"
    }
  ],
  "meta": {
    "category": "primitive",
    "subcategory": "switch",
    "exportName": "SwitchMuiTreasury"
  }
}