{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "project-invite-modal",
  "type": "registry:item",
  "title": "Project Invite Modal",
  "description": "A project-invite-modal block.",
  "dependencies": [
    "@mui/icons-material",
    "@mui/material",
    "@emotion/react",
    "@emotion/styled"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "blocks/project-invite-modal/project-invite-modal.tsx",
      "target": "src/mui-treasury/blocks/project-invite-modal/project-invite-modal.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\n\nimport ClearIcon from '@mui/icons-material/Clear';\nimport CloseIcon from '@mui/icons-material/Close';\nimport CodeIcon from '@mui/icons-material/Code';\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport FileUploadIcon from '@mui/icons-material/FileUpload';\nimport GroupAddIcon from '@mui/icons-material/GroupAdd';\nimport {\n  Avatar,\n  Box,\n  Button,\n  Dialog,\n  DialogContent,\n  DialogTitle,\n  Divider,\n  FormControl,\n  IconButton,\n  InputAdornment,\n  MenuItem,\n  Select,\n  Stack,\n  TextField,\n  Typography,\n} from '@mui/material';\n\ninterface ProjectMember {\n  id: string;\n  name: string;\n  email: string;\n  avatar: string;\n  permission: 'Owner' | 'Can View' | 'Can Edit';\n}\n\nexport function ProjectInviteModal() {\n  const [open, setOpen] = React.useState(true);\n  const [email, setEmail] = React.useState('Johndoe@gmail.com');\n  const [linkAccess, setLinkAccess] = React.useState('Anyone with link');\n  const [invitePermission, setInvitePermission] = React.useState('Can View');\n  const [copied, setCopied] = React.useState(false);\n\n  const members: ProjectMember[] = [\n    {\n      id: '1',\n      name: 'Insan Kamil',\n      email: 'insank@gmail.com',\n      avatar: 'https://placehold.co/40',\n      permission: 'Owner',\n    },\n    {\n      id: '2',\n      name: 'John Smith',\n      email: 'johnsmith@gmail.com',\n      avatar: 'https://placehold.co/40',\n      permission: 'Can View',\n    },\n    {\n      id: '3',\n      name: 'Mario Rodriguez',\n      email: 'mariorodriguez@gmail.com',\n      avatar: 'https://placehold.co/40',\n      permission: 'Can Edit',\n    },\n    {\n      id: '4',\n      name: 'Emily Chen',\n      email: 'emilychen@gmail.com',\n      avatar: 'https://placehold.co/40',\n      permission: 'Can Edit',\n    },\n  ];\n\n  const handleCopy = () => {\n    navigator.clipboard.writeText('https://www.figma.com/designProject-Screen');\n    setCopied(true);\n    setTimeout(() => setCopied(false), 2000);\n  };\n\n  const handleClose = () => {\n    setOpen(false);\n  };\n\n  return (\n    <Dialog\n      open={open}\n      onClose={handleClose}\n      maxWidth=\"sm\"\n      fullWidth\n      slotProps={{\n        paper: {\n          sx: {\n            borderRadius: 2,\n            p: 1,\n          },\n        },\n      }}\n    >\n      <Box sx={{ position: 'relative' }}>\n        <IconButton\n          aria-label=\"close\"\n          onClick={handleClose}\n          sx={{\n            position: 'absolute',\n            right: 8,\n            top: 8,\n            color: 'text.secondary',\n          }}\n        >\n          <CloseIcon />\n        </IconButton>\n\n        <DialogTitle sx={{ pb: 0.5 }}>\n          <Stack\n            direction=\"row\"\n            spacing={1.5}\n            sx={{\n              alignItems: 'flex-start',\n            }}\n          >\n            <Box\n              sx={(theme) => ({\n                position: 'relative',\n                color: (theme.vars || theme).palette.text.icon,\n              })}\n            >\n              <GroupAddIcon sx={{ fontSize: 28 }} />\n            </Box>\n            <Box>\n              <Typography variant=\"h6\" component=\"div\">\n                Invite to Project\n              </Typography>\n              <Typography\n                variant=\"body2\"\n                sx={{\n                  color: 'text.secondary',\n                }}\n              >\n                Collaborate with members on this project.\n              </Typography>\n            </Box>\n          </Stack>\n        </DialogTitle>\n\n        <Divider sx={{ my: 2, mx: 3 }} />\n\n        <DialogContent sx={{ pt: 0 }}>\n          <Stack spacing={3}>\n            <Box>\n              <Typography\n                variant=\"subtitle1\"\n                gutterBottom\n                sx={{\n                  fontWeight: '500',\n                }}\n              >\n                Link to Share\n              </Typography>\n              <Typography\n                variant=\"body2\"\n                sx={{\n                  color: 'text.secondary',\n                  mb: 2,\n                }}\n              >\n                Anyone with the link can access\n              </Typography>\n\n              <Stack spacing={2}>\n                <FormControl fullWidth size=\"small\">\n                  <Select\n                    value={linkAccess}\n                    onChange={(e) => setLinkAccess(e.target.value)}\n                    IconComponent={ExpandMoreIcon}\n                    sx={{\n                      bgcolor: 'background.paper',\n                    }}\n                  >\n                    <MenuItem value=\"Anyone with link\">\n                      Anyone with link\n                    </MenuItem>\n                    <MenuItem value=\"Restricted\">Restricted</MenuItem>\n                    <MenuItem value=\"Only members\">Only members</MenuItem>\n                  </Select>\n                </FormControl>\n\n                <TextField\n                  fullWidth\n                  size=\"small\"\n                  value=\"https://www.figma.com/designProject-Screen\"\n                  slotProps={{\n                    input: {\n                      readOnly: true,\n                      endAdornment: (\n                        <InputAdornment position=\"end\">\n                          <Button\n                            size=\"small\"\n                            startIcon={<ContentCopyIcon fontSize=\"small\" />}\n                            onClick={handleCopy}\n                            sx={{ minWidth: 'auto' }}\n                          >\n                            {copied ? 'Copied' : 'Copy'}\n                          </Button>\n                        </InputAdornment>\n                      ),\n                      sx: { pr: 0.5 },\n                    },\n                  }}\n                />\n              </Stack>\n            </Box>\n\n            <Box>\n              <Typography\n                variant=\"subtitle1\"\n                gutterBottom\n                sx={{\n                  fontWeight: '500',\n                }}\n              >\n                Email\n              </Typography>\n\n              <Stack direction=\"row\" spacing={1.5}>\n                <TextField\n                  fullWidth\n                  size=\"small\"\n                  type=\"email\"\n                  value={email}\n                  onChange={(e) => setEmail(e.target.value)}\n                  slotProps={{\n                    input: {\n                      endAdornment: email && (\n                        <InputAdornment position=\"end\">\n                          <IconButton\n                            size=\"small\"\n                            onClick={() => setEmail('')}\n                            edge=\"end\"\n                            aria-label=\"clear email\"\n                          >\n                            <ClearIcon fontSize=\"small\" />\n                          </IconButton>\n                        </InputAdornment>\n                      ),\n                    },\n                  }}\n                />\n\n                <FormControl size=\"small\" sx={{ minWidth: 120 }}>\n                  <Select\n                    value={invitePermission}\n                    onChange={(e) => setInvitePermission(e.target.value)}\n                    IconComponent={ExpandMoreIcon}\n                  >\n                    <MenuItem value=\"Can View\">Can View</MenuItem>\n                    <MenuItem value=\"Can Edit\">Can Edit</MenuItem>\n                  </Select>\n                </FormControl>\n\n                <Button\n                  variant=\"contained\"\n                  size=\"small\"\n                  sx={{ px: 2.5, whiteSpace: 'nowrap' }}\n                >\n                  Send Invite\n                </Button>\n              </Stack>\n            </Box>\n\n            <Box>\n              <Typography\n                variant=\"subtitle1\"\n                gutterBottom\n                sx={{\n                  fontWeight: '500',\n                }}\n              >\n                Project Members\n              </Typography>\n\n              <Stack spacing={2} sx={{ mt: 2 }}>\n                {members.map((member) => (\n                  <Stack\n                    key={member.id}\n                    direction=\"row\"\n                    spacing={2}\n                    sx={{\n                      alignItems: 'center',\n                    }}\n                  >\n                    <Avatar\n                      src={member.avatar}\n                      alt={member.name}\n                      sx={{ width: 40, height: 40 }}\n                    />\n\n                    <Box sx={{ flex: 1 }}>\n                      <Typography variant=\"body1\">{member.name}</Typography>\n                      <Typography\n                        variant=\"body2\"\n                        sx={{\n                          color: 'text.secondary',\n                        }}\n                      >\n                        {member.email}\n                      </Typography>\n                    </Box>\n\n                    <FormControl variant=\"standard\" size=\"small\">\n                      <Select\n                        value={member.permission}\n                        IconComponent={ExpandMoreIcon}\n                        disabled={member.permission === 'Owner'}\n                        sx={{\n                          '& .MuiSelect-select': {\n                            pr: 3,\n                            color: 'text.secondary',\n                          },\n                          '&:before': {\n                            display: 'none',\n                          },\n                          '&:after': {\n                            display: 'none',\n                          },\n                        }}\n                      >\n                        <MenuItem value=\"Owner\">Owner</MenuItem>\n                        <MenuItem value=\"Can View\">Can View</MenuItem>\n                        <MenuItem value=\"Can Edit\">Can Edit</MenuItem>\n                      </Select>\n                    </FormControl>\n                  </Stack>\n                ))}\n              </Stack>\n            </Box>\n\n            <Stack direction=\"row\" spacing={3} sx={{ pt: 1 }}>\n              <Button\n                startIcon={<CodeIcon />}\n                sx={{\n                  textTransform: 'none',\n                  color: 'text.primary',\n                  p: 0,\n                  minWidth: 'auto',\n                  '&:hover': {\n                    bgcolor: 'transparent',\n                    textDecoration: 'underline',\n                  },\n                }}\n              >\n                Get embed code\n              </Button>\n\n              <Button\n                startIcon={<FileUploadIcon />}\n                sx={{\n                  textTransform: 'none',\n                  color: 'text.primary',\n                  p: 0,\n                  minWidth: 'auto',\n                  '&:hover': {\n                    bgcolor: 'transparent',\n                    textDecoration: 'underline',\n                  },\n                }}\n              >\n                Export\n              </Button>\n            </Stack>\n          </Stack>\n        </DialogContent>\n      </Box>\n    </Dialog>\n  );\n}\n",
      "type": "registry:item"
    },
    {
      "path": "blocks/project-invite-modal/index.ts",
      "target": "src/mui-treasury/blocks/project-invite-modal/index.ts",
      "content": "export * from './project-invite-modal';\n",
      "type": "registry:item"
    }
  ],
  "meta": {
    "screenshot": "/og/project-invite-modal.png",
    "category": "block",
    "previewMode": "iframe",
    "exportName": "ProjectInviteModal",
    "subcategory": "authentication"
  }
}