{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "command-search-ui",
  "type": "registry:item",
  "title": "Command Search Ui",
  "description": "A command-search-ui block.",
  "dependencies": [
    "@mui/icons-material",
    "@mui/material",
    "@emotion/react",
    "@emotion/styled"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "blocks/command-search-ui/command-search-ui.tsx",
      "target": "src/mui-treasury/blocks/command-search-ui/command-search-ui.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\n\nimport AccessTimeIcon from '@mui/icons-material/AccessTime';\nimport AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutlined';\nimport CalendarMonthIcon from '@mui/icons-material/CalendarMonth';\nimport ChevronLeftIcon from '@mui/icons-material/ChevronLeft';\nimport ChevronRightIcon from '@mui/icons-material/ChevronRight';\nimport GroupIcon from '@mui/icons-material/Group';\nimport HomeIcon from '@mui/icons-material/Home';\nimport ReceiptIcon from '@mui/icons-material/Receipt';\nimport SearchIcon from '@mui/icons-material/Search';\nimport {\n  Avatar,\n  Box,\n  Button,\n  Card,\n  CardContent,\n  Chip,\n  Dialog,\n  DialogContent,\n  IconButton,\n  InputAdornment,\n  List,\n  ListItemButton,\n  ListItemIcon,\n  ListItemText,\n  Stack,\n  TextField,\n  Typography,\n} from '@mui/material';\n\nconst filterOptions = [\n  'All',\n  'Training',\n  'Interview',\n  'Design task',\n  'Review',\n  'Onboarding',\n];\n\nconst meetings = [\n  {\n    id: 1,\n    name: 'James B.',\n    time: '9 AM',\n    duration: '30 min',\n    avatar: 'https://placehold.co/80',\n    status: 'online',\n  },\n  {\n    id: 2,\n    name: 'Sophia W.',\n    time: '10 AM',\n    duration: '30 min',\n    avatar: 'https://placehold.co/80',\n    status: 'online',\n  },\n  {\n    id: 3,\n    name: 'Arthur T.',\n    time: '11 AM',\n    duration: '30 min',\n    avatar: 'https://placehold.co/80',\n    status: 'online',\n  },\n  {\n    id: 4,\n    name: 'Ravi P.',\n    time: '12 PM',\n    duration: '30 min',\n    avatar: 'https://placehold.co/80',\n    status: 'online',\n  },\n];\n\nconst quickActions = [\n  { icon: <HomeIcon />, label: 'Dashboard page' },\n  { icon: <GroupIcon />, label: 'Team page' },\n  { icon: <ReceiptIcon />, label: 'Payroll page' },\n  { icon: <AddCircleOutlineIcon />, label: 'Create new position' },\n  { icon: <AccessTimeIcon />, label: 'View attendance report' },\n  { icon: <CalendarMonthIcon />, label: 'Schedule meeting' },\n];\n\nexport function CommandSearchUI() {\n  const [open, setOpen] = React.useState(true);\n  const [selectedFilter, setSelectedFilter] = React.useState('All');\n  const [searchValue, setSearchValue] = React.useState('');\n\n  React.useEffect(() => {\n    const handleKeyDown = (e: KeyboardEvent) => {\n      if ((e.metaKey || e.ctrlKey) && e.key === 'k') {\n        e.preventDefault();\n        setOpen(true);\n      }\n      if (e.key === 'Escape') {\n        setOpen(false);\n      }\n    };\n\n    window.addEventListener('keydown', handleKeyDown);\n    return () => window.removeEventListener('keydown', handleKeyDown);\n  }, []);\n\n  return (\n    <Dialog\n      open={open}\n      onClose={() => setOpen(false)}\n      maxWidth=\"md\"\n      fullWidth\n      slotProps={{\n        paper: {\n          sx: {\n            borderRadius: 2,\n            maxHeight: '90vh',\n            overflow: 'hidden',\n            display: 'flex',\n            flexDirection: 'column',\n          },\n        },\n      }}\n    >\n      <DialogContent\n        sx={{\n          p: 0,\n          overflowY: 'auto',\n          display: 'flex',\n          flexDirection: 'column',\n        }}\n      >\n        <Box sx={{ p: 2 }}>\n          <TextField\n            fullWidth\n            placeholder=\"Search meetings, people, or type a command...\"\n            value={searchValue}\n            onChange={(e) => setSearchValue(e.target.value)}\n            variant=\"outlined\"\n            autoFocus\n            slotProps={{\n              input: {\n                startAdornment: (\n                  <InputAdornment position=\"start\">\n                    <SearchIcon sx={{ color: 'text.secondary' }} />\n                  </InputAdornment>\n                ),\n                endAdornment: (\n                  <InputAdornment position=\"end\">\n                    <Chip\n                      label=\"⌘K\"\n                      size=\"small\"\n                      sx={(theme) => ({\n                        height: 20,\n                        fontSize: '0.75rem',\n                        bgcolor: 'grey.100',\n                        ...theme.applyStyles('dark', {\n                          bgcolor: 'grey.800',\n                        }),\n                      })}\n                    />\n                  </InputAdornment>\n                ),\n                sx: {\n                  '& fieldset': { border: 'none' },\n                },\n              },\n            }}\n            sx={(theme) => ({\n              bgcolor: 'grey.50',\n              borderRadius: 1,\n              ...theme.applyStyles('dark', {\n                bgcolor: 'grey.900',\n              }),\n            })}\n          />\n        </Box>\n\n        <Box sx={{ px: 2, pb: 2 }}>\n          <Stack direction=\"row\" spacing={1} sx={{ flexWrap: 'wrap', gap: 1 }}>\n            {filterOptions.map((option) => (\n              <Chip\n                key={option}\n                label={option}\n                onClick={() => setSelectedFilter(option)}\n                variant={selectedFilter === option ? 'filled' : 'outlined'}\n                color={selectedFilter === option ? 'primary' : 'default'}\n                sx={{\n                  borderRadius: 2,\n                  fontWeight: selectedFilter === option ? 600 : 400,\n                }}\n              />\n            ))}\n          </Stack>\n        </Box>\n\n        <Box sx={{ px: 2, pb: 2 }}>\n          <Box\n            sx={{\n              display: 'flex',\n              alignItems: 'center',\n              justifyContent: 'space-between',\n              mb: 2,\n            }}\n          >\n            <Typography\n              variant=\"body2\"\n              sx={{\n                color: 'text.secondary',\n              }}\n            >\n              Recent meetings (8)\n            </Typography>\n            <Stack direction=\"row\" spacing={0.5}>\n              <IconButton size=\"small\">\n                <ChevronLeftIcon fontSize=\"small\" />\n              </IconButton>\n              <IconButton size=\"small\">\n                <ChevronRightIcon fontSize=\"small\" />\n              </IconButton>\n            </Stack>\n          </Box>\n\n          <Box\n            sx={{\n              display: 'flex',\n              gap: 2,\n              overflowX: 'auto',\n              '&::-webkit-scrollbar': { display: 'none' },\n              scrollbarWidth: 'none',\n            }}\n          >\n            {meetings.map((meeting) => (\n              <Card\n                key={meeting.id}\n                sx={{\n                  minWidth: 160,\n                  borderRadius: 2,\n                  border: 1,\n                  borderColor: 'divider',\n                  boxShadow: 0,\n                }}\n              >\n                <CardContent\n                  sx={{\n                    display: 'flex',\n                    flexDirection: 'column',\n                    alignItems: 'center',\n                    p: 2,\n                    '&:last-child': { pb: 2 },\n                  }}\n                >\n                  <Box sx={{ position: 'relative', mb: 1.5 }}>\n                    <Avatar\n                      src={meeting.avatar}\n                      sx={{ width: 56, height: 56, mb: 1 }}\n                    />\n                    <Box\n                      sx={{\n                        position: 'absolute',\n                        bottom: 8,\n                        right: 0,\n                        width: 12,\n                        height: 12,\n                        bgcolor: 'success.main',\n                        borderRadius: '50%',\n                        border: 2,\n                        borderColor: 'background.paper',\n                      }}\n                    />\n                  </Box>\n                  <Typography\n                    variant=\"body2\"\n                    sx={{\n                      fontWeight: 600,\n                    }}\n                  >\n                    {meeting.name}\n                  </Typography>\n                  <Typography\n                    variant=\"caption\"\n                    sx={{\n                      color: 'text.secondary',\n                    }}\n                  >\n                    {meeting.time} - {meeting.duration}\n                  </Typography>\n                  <Button\n                    variant=\"text\"\n                    size=\"small\"\n                    sx={{ mt: 1.5, textTransform: 'none' }}\n                  >\n                    Detail\n                  </Button>\n                </CardContent>\n              </Card>\n            ))}\n          </Box>\n        </Box>\n\n        <Box sx={{ px: 2, pb: 2 }}>\n          <Typography\n            variant=\"body2\"\n            sx={{\n              color: 'text.secondary',\n              mb: 1.5,\n            }}\n          >\n            Quick actions (6)\n          </Typography>\n          <List dense sx={{ p: 0 }}>\n            {quickActions.map((action, index) => (\n              <ListItemButton\n                key={index}\n                sx={{\n                  borderRadius: 1,\n                  mb: 0.5,\n                  '&:hover': {\n                    bgcolor: 'action.hover',\n                  },\n                }}\n              >\n                <ListItemIcon sx={{ minWidth: 40, color: 'text.secondary' }}>\n                  {action.icon}\n                </ListItemIcon>\n                <ListItemText\n                  primary={action.label}\n                  slotProps={{\n                    primary: {\n                      variant: 'body2',\n                    },\n                  }}\n                />\n              </ListItemButton>\n            ))}\n          </List>\n        </Box>\n\n        <Box\n          sx={(theme) => ({\n            px: 2,\n            py: 1.5,\n            borderTop: 1,\n            borderColor: 'divider',\n            display: 'flex',\n            justifyContent: 'space-between',\n            bgcolor: 'grey.50',\n            ...theme.applyStyles('dark', {\n              bgcolor: 'grey.900',\n            }),\n          })}\n        >\n          <Typography\n            variant=\"caption\"\n            sx={{\n              color: 'text.secondary',\n            }}\n          >\n            Use ↑ ↓ to navigate\n          </Typography>\n          <Typography\n            variant=\"caption\"\n            sx={{\n              color: 'text.secondary',\n            }}\n          >\n            Type / for commands\n          </Typography>\n        </Box>\n      </DialogContent>\n    </Dialog>\n  );\n}\n",
      "type": "registry:item"
    },
    {
      "path": "blocks/command-search-ui/index.ts",
      "target": "src/mui-treasury/blocks/command-search-ui/index.ts",
      "content": "export * from './command-search-ui';\n",
      "type": "registry:item"
    }
  ],
  "meta": {
    "screenshot": "/og/command-search-ui.png",
    "category": "block",
    "previewMode": "iframe",
    "exportName": "CommandSearchUI",
    "subcategory": "dashboard"
  }
}