{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ds-schedule",
  "title": "Schedule",
  "description": "Grade semanal com slots — ReUI Schedule 10.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@lema-ds/card",
    "@lema-ds/skeleton"
  ],
  "files": [
    {
      "path": "components/ds/ds-schedule.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Card } from \"@/components/ui/card\"\nimport { Skeleton } from \"@/components/ui/skeleton\"\n\n// ── Types ──────────────────────────────────────────────────────────────────\n\nexport interface ScheduleSlot {\n  time?: string\n  title?: string\n  color?: string\n}\n\nexport interface ScheduleProps extends React.HTMLAttributes<HTMLDivElement> {\n  days?: string[]\n  slots: ScheduleSlot[][]\n  loading?: boolean\n}\n\n// ── Variants ───────────────────────────────────────────────────────────────\n\nexport const scheduleVariants = cva(\n  \"w-full overflow-x-auto rounded-2xl border bg-card p-4\"\n)\n\n// ── Component ──────────────────────────────────────────────────────────────\n\nexport function Schedule({\n  className,\n  days = [\"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\"],\n  slots,\n  loading = false,\n  ...props\n}: ScheduleProps) {\n  if (loading) {\n    return (\n      <div\n        data-slot=\"schedule-skeleton\"\n        className={cn(scheduleVariants(), className)}\n        {...props}\n      >\n        <Skeleton className=\"h-48 w-full\" />\n      </div>\n    )\n  }\n\n  return (\n    <Card\n      data-slot=\"schedule\"\n      className={cn(scheduleVariants(), className)}\n      {...props}\n    >\n      <div\n        className=\"grid gap-2\"\n        style={{ gridTemplateColumns: `60px repeat(${days.length}, 1fr)` }}\n      >\n        <span />\n        {days.map((d) => (\n          <span\n            key={d}\n            className=\"text-center text-xs font-medium text-muted-foreground\"\n          >\n            {d}\n          </span>\n        ))}\n        {slots.map((row, ri) => (\n          <React.Fragment key={ri}>\n            <span className=\"py-2 text-xs text-muted-foreground tabular-nums\">\n              {row[0]?.time ?? \"\"}\n            </span>\n            {days.map((_, ci) => {\n              const slot = row[ci]\n              return (\n                <div\n                  key={ci}\n                  className={cn(\n                    \"h-10 rounded-md border p-1 text-xs\",\n                    slot?.title\n                      ? \"border-primary/20 bg-primary/10 text-foreground\"\n                      : \"border-transparent bg-muted/30\"\n                  )}\n                  style={{ backgroundColor: slot?.color }}\n                >\n                  {slot?.title && (\n                    <span className=\"truncate text-xs font-medium\">\n                      {slot.title}\n                    </span>\n                  )}\n                </div>\n              )\n            })}\n          </React.Fragment>\n        ))}\n      </div>\n    </Card>\n  )\n}\n",
      "type": "registry:ui"
    }
  ],
  "categories": [
    "schedule"
  ],
  "type": "registry:block"
}
