{
  "title": "Free Admin Dashboard",
  "description": "This premium admin dashboard template delivers responsive layouts, diverse charts, and advanced tables for your web applications.",
  "name": "free-dashboard-template",
  "dependencies": [
    "motion",
    "recharts",
    "@tanstack/react-router"
  ],
  "registryDependencies": [
    "card",
    "chart",
    "select",
    "badge",
    "table",
    "button",
    "scroll-area",
    "progress",
    "breadcrumb",
    "dropdown-menu",
    "separator",
    "avatar",
    "sidebar",
    "collapsible",
    "popover",
    "dialog",
    "input"
  ],
  "type": "registry:block",
  "files": [
    {
      "path": "components/templates/free-dashboard/dashboards/logs.tsx",
      "type": "registry:block",
      "content": "import { Chart1 } from \"@/components/paceui/charts/api-traffic\";\nimport { Chart2 } from \"@/components/paceui/charts/weekly-traffic\";\nimport { Stat1, type Stat1Props } from \"@/components/blocks/dashboard/stat/stat-1\";\nimport { Table1 } from \"@/components/blocks/dashboard/table/table-1\";\nimport { Widget1 } from \"@/components/blocks/dashboard/widget/widget-1\";\nimport { Widget5 } from \"@/components/blocks/dashboard/widget/widget-5\";\nimport { PageTitle } from \"@/components/templates/free-dashboard/layouts/page-title\";\n\nconst logStats: Stat1Props[] = [\n    {\n        title: \"Total Throughput\",\n        value: \"45.2k RPM\",\n        changeValue: \"+5.2%\",\n        direction: \"up\",\n    },\n    {\n        title: \"P99 Latency\",\n        value: \"210ms\",\n        changeValue: \"+15ms\",\n        direction: \"down\",\n    },\n    {\n        title: \"Failed Requests (5xx)\",\n        value: \"14\",\n        changeValue: \"-21.4%\",\n        direction: \"up\",\n    },\n    {\n        title: \"Success Rate (2xx)\",\n        value: \"99.92%\",\n        changeValue: \"+0.04%\",\n        direction: \"up\",\n    },\n    {\n        title: \"Auth Failures (401/403)\",\n        value: \"128\",\n        changeValue: \"+12%\",\n        direction: \"down\",\n    },\n];\n\nexport const LogsDashboard = () => {\n    return (\n        <div>\n            <PageTitle title=\"Logs Analytics\" />\n            <div className=\"mt-4 grid gap-4 sm:mt-5 sm:gap-5 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5\">\n                {logStats.map((stat, index) => (\n                    <Stat1 {...stat} key={index} />\n                ))}\n            </div>\n            <div className=\"mt-4 grid grid-cols-1 gap-4 sm:mt-5 sm:gap-5 xl:grid-cols-7\">\n                <div className=\"xl:col-span-4\">\n                    <Chart1 />\n                </div>\n                <div className=\"h-90 xl:col-span-3 2xl:h-94\">\n                    <Widget1 />\n                </div>\n            </div>\n\n            <div className=\"mt-4 grid grid-cols-1 gap-4 sm:mt-5 sm:gap-5 lg:grid-cols-2 2xl:grid-cols-3\">\n                <Table1 />\n\n                <Chart2 />\n\n                <Widget5 />\n            </div>\n        </div>\n    );\n};\n"
    },
    {
      "path": "components/paceui/charts/api-traffic.tsx",
      "type": "registry:block",
      "content": "import { useEffect, useState } from \"react\";\n\nimport { ActivityIcon } from \"lucide-react\";\nimport { Area, AreaChart, CartesianGrid, XAxis } from \"recharts\";\n\nimport { useIsMobile } from \"@/hooks/use-mobile\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { type ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent } from \"@/components/ui/chart\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"@/components/ui/select\";\n\nexport interface ApiTrafficDataPoint {\n    date: string;\n    success: number;\n    failed: number;\n}\n\nexport interface ApiTrafficProps {\n    data?: ApiTrafficDataPoint[];\n    className?: string;\n}\n\nconst chartData: ApiTrafficDataPoint[] = Array.from({ length: 90 }, (_, i) => ({\n    date: new Date(Date.now() + i * 864e5).toISOString().slice(0, 10),\n    success: Math.floor(Math.random() * 400) + 400,\n    failed: Math.floor(Math.random() * 50) + 5,\n}));\n\nconst chartConfig: ChartConfig = {\n    success: {\n        label: \"Success\",\n        color: \"var(--chart-1)\",\n    },\n    failed: {\n        label: \"Failed\",\n        color: \"var(--chart-5)\",\n    },\n};\n\nexport const ApiTraffic = ({ data = chartData, className }: ApiTrafficProps = {}) => {\n    const isMobile = useIsMobile();\n    const [timeRange, setTimeRange] = useState<string | null>(\"90d\");\n\n    useEffect(() => {\n        if (isMobile) {\n            setTimeRange(\"7d\");\n        }\n    }, [isMobile]);\n\n    const filteredData = data.slice(timeRange === \"7d\" ? -7 : timeRange === \"30d\" ? -30 : -90);\n\n    return (\n        <Card className={cn(\"pb-3 max-2xl:gap-3 max-2xl:pt-4\", className)}>\n            <CardHeader className=\"max-2xl:px-4\">\n                <div className=\"flex items-center gap-3\">\n                    <div className=\"rounded-md border p-2 shadow-xs\">\n                        <ActivityIcon className=\"size-4.5\" />\n                    </div>\n                    <div className=\"flex flex-col gap-0.5\">\n                        <CardTitle className=\"leading-none\">API Traffic</CardTitle>\n                        <CardDescription className=\"leading-none max-sm:text-xs\">\n                            Last 30 days performance\n                        </CardDescription>\n                    </div>\n                </div>\n                <CardAction>\n                    <Select value={timeRange ?? \"90d\"} onValueChange={setTimeRange}>\n                        <SelectTrigger className=\"w-20 shadow-none sm:w-32\" size=\"sm\" aria-label=\"Select time range\">\n                            <SelectValue placeholder=\"Last 3 months\" />\n                        </SelectTrigger>\n                        <SelectContent className=\"rounded-xl\">\n                            <SelectItem value=\"90d\">Last 3 months</SelectItem>\n                            <SelectItem value=\"30d\">Last 30 days</SelectItem>\n                            <SelectItem value=\"7d\">Last 7 days</SelectItem>\n                        </SelectContent>\n                    </Select>\n                </CardAction>\n            </CardHeader>\n            <CardContent className=\"px-3 pt-2 sm:px-4\">\n                <ChartContainer config={chartConfig} className=\"aspect-auto h-71 w-full\">\n                    <AreaChart data={filteredData}>\n                        <defs>\n                            <linearGradient id=\"fillSuccess\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n                                <stop offset=\"5%\" stopColor=\"var(--color-success)\" stopOpacity={0.8} />\n                                <stop offset=\"95%\" stopColor=\"var(--color-success)\" stopOpacity={0.1} />\n                            </linearGradient>\n                            <linearGradient id=\"fillFailed\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n                                <stop offset=\"5%\" stopColor=\"var(--color-failed)\" stopOpacity={0.8} />\n                                <stop offset=\"95%\" stopColor=\"var(--color-failed)\" stopOpacity={0.1} />\n                            </linearGradient>\n                        </defs>\n                        <CartesianGrid vertical={false} strokeDasharray=\"3 3\" />\n                        <XAxis\n                            dataKey=\"date\"\n                            tickLine={false}\n                            axisLine={false}\n                            tickMargin={8}\n                            minTickGap={32}\n                            tickFormatter={(value) =>\n                                new Date(value).toLocaleDateString(\"en-US\", {\n                                    month: \"short\",\n                                    day: \"numeric\",\n                                })\n                            }\n                        />\n                        <ChartTooltip\n                            cursor={false}\n                            content={\n                                <ChartTooltipContent\n                                    className=\"rounded-md shadow-none\"\n                                    labelFormatter={(value) =>\n                                        new Date(value as string | number).toLocaleDateString(\"en-US\", {\n                                            month: \"long\",\n                                            day: \"numeric\",\n                                        })\n                                    }\n                                    indicator=\"dot\"\n                                />\n                            }\n                        />\n                        <Area\n                            dataKey=\"success\"\n                            type=\"monotone\"\n                            fill=\"url(#fillSuccess)\"\n                            stroke=\"var(--color-success)\"\n                        />\n                        <Area dataKey=\"failed\" type=\"monotone\" fill=\"url(#fillFailed)\" stroke=\"var(--color-failed)\" />\n                    </AreaChart>\n                </ChartContainer>\n            </CardContent>\n        </Card>\n    );\n};\n\nexport { ApiTraffic as Chart1 };\n"
    },
    {
      "path": "hooks/use-mobile.ts",
      "type": "registry:block",
      "content": "import { useEffect, useState } from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n    const [isMobile, setIsMobile] = useState<boolean | undefined>(undefined);\n\n    useEffect(() => {\n        const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n        const onChange = () => {\n            setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n        };\n        mql.addEventListener(\"change\", onChange);\n        setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n        return () => mql.removeEventListener(\"change\", onChange);\n    }, []);\n\n    return !!isMobile;\n}\n"
    },
    {
      "path": "components/paceui/charts/weekly-traffic.tsx",
      "type": "registry:block",
      "content": "import { useLayoutEffect, useMemo, useRef, useState } from \"react\";\n\nimport NumberFlow from \"@number-flow/react\";\nimport { CalendarArrowUpIcon } from \"lucide-react\";\nimport { AnimatePresence, type Variants, motion } from \"motion/react\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\n\nconst days = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nconst timeSlots = [\n    { label: \"00-03\", name: \"Night\" },\n    { label: \"03-06\", name: \"Early\" },\n    { label: \"06-09\", name: \"Morning\" },\n    { label: \"09-12\", name: \"Late Morn\" },\n    { label: \"12-15\", name: \"Afternoon\" },\n    { label: \"15-18\", name: \"Late Aft\" },\n    { label: \"18-21\", name: \"Evening\" },\n    { label: \"21-24\", name: \"Late Night\" },\n];\n\nconst legendColors = [\"bg-chart-1\", \"bg-chart-2\", \"bg-chart-3\", \"bg-chart-4\", \"bg-chart-5\"];\n\nconst EASE: [number, number, number, number] = [0.22, 1, 0.36, 1];\n\nconst rootVariants: Variants = {\n    hidden: {},\n    show: {\n        transition: { staggerChildren: 0.12, delayChildren: 0.1 },\n    },\n};\n\nconst titleVariants: Variants = {\n    hidden: { opacity: 0, y: 12, filter: \"blur(4px)\" },\n    show: {\n        opacity: 1,\n        y: 0,\n        filter: \"blur(0px)\",\n        transition: { duration: 0.5, ease: EASE },\n    },\n};\n\nconst legendGroupVariants: Variants = {\n    hidden: {},\n    show: {\n        transition: { staggerChildren: 0.06, delayChildren: 0.1 },\n    },\n};\n\nconst legendItemVariants: Variants = {\n    hidden: { opacity: 0, scale: 0.6 },\n    show: {\n        opacity: 1,\n        scale: 1,\n        transition: { duration: 0.35, ease: EASE },\n    },\n};\n\nconst axisGroupVariants: Variants = {\n    hidden: {},\n    show: {\n        transition: { staggerChildren: 0.035 },\n    },\n};\n\nconst axisItemVariants: Variants = {\n    hidden: { opacity: 0, y: 6 },\n    show: {\n        opacity: 1,\n        y: 0,\n        transition: { duration: 0.35, ease: EASE },\n    },\n};\n\nconst gridVariants: Variants = {\n    hidden: {},\n    show: {\n        transition: { staggerChildren: 0.07, delayChildren: 0.15 },\n    },\n};\n\nconst rowVariants: Variants = {\n    hidden: {},\n    show: {\n        transition: { staggerChildren: 0.028 },\n    },\n};\n\nconst cellVariants: Variants = {\n    hidden: { opacity: 0 },\n    show: {\n        opacity: 1,\n        transition: { duration: 0.3, ease: \"easeOut\" },\n    },\n};\n\nconst slideVariants: Variants = {\n    enter: (d: { x: number; y: number }) => ({\n        x: 10 * d.x,\n        y: 10 * d.y,\n        opacity: 0,\n        filter: \"blur(4px)\",\n    }),\n    center: { x: 0, y: 0, opacity: 1, filter: \"blur(0px)\" },\n    exit: (d: { x: number; y: number }) => ({\n        x: -10 * d.x,\n        y: -10 * d.y,\n        opacity: 0,\n        filter: \"blur(4px)\",\n    }),\n};\n\ntype ActiveCell = {\n    id: string;\n    day: string;\n    slot: string;\n    value: number;\n};\n\nexport const WeeklyTraffic = () => {\n    const gridRef = useRef<HTMLDivElement>(null);\n    const tipRef = useRef<HTMLDivElement>(null);\n    const contentRef = useRef<HTMLDivElement>(null);\n    const [active, setActive] = useState<ActiveCell | null>(null);\n    const [dir, setDir] = useState({ row: 0, col: 0 });\n    const [trend, setTrend] = useState<1 | -1>(1);\n    const prevIdxRef = useRef<{ row: number; col: number } | null>(null);\n    const prevValRef = useRef(0);\n    const [anchor, setAnchor] = useState<{\n        x: number;\n        y: number;\n        w: number;\n        arrowLeft: number;\n        cx: number;\n        cy: number;\n    } | null>(null);\n\n    const PADDING_X = 24;\n\n    const buildAnchor = (cx: number, cy: number, tipW: number, tipH: number) => {\n        const grid = gridRef.current?.getBoundingClientRect();\n        if (!grid) return null;\n        const GAP = 6;\n        const unclampedX = cx - tipW / 2;\n        const x = Math.min(Math.max(0, unclampedX), Math.max(0, grid.width - tipW));\n        const arrowLeft = Math.min(Math.max(cx - x - 5, 8), Math.max(8, tipW - 18));\n        return { x, y: cy - tipH - GAP, w: tipW, arrowLeft, cx, cy };\n    };\n\n    const anchorTip = (cell: HTMLElement) => {\n        const grid = gridRef.current?.getBoundingClientRect();\n        const rect = cell.getBoundingClientRect();\n        if (!grid) return;\n        const tipW = (contentRef.current?.offsetWidth ?? 156) + PADDING_X;\n        const tipH = tipRef.current?.offsetHeight ?? 52;\n        const next = buildAnchor(\n            rect.left + rect.width / 2 - grid.left,\n            rect.top - grid.top,\n            tipW,\n            tipH,\n        );\n        if (next) setAnchor(next);\n    };\n\n    useLayoutEffect(() => {\n        if (!active || !anchor || !contentRef.current) return;\n        const natural = contentRef.current.offsetWidth + PADDING_X;\n        if (Math.abs(natural - anchor.w) < 0.5) return;\n        const tipH = tipRef.current?.offsetHeight ?? 52;\n        const corrected = buildAnchor(anchor.cx, anchor.cy, natural, tipH);\n        if (corrected) setAnchor(corrected);\n    }, [active?.id]);\n\n    const data = useMemo(() => {\n        return days.map((day) => {\n            return {\n                day,\n                slots: timeSlots.map((_, i) => {\n                    const isWorkHours = i >= 3 && i <= 5;\n                    const base = isWorkHours ? Math.random() * 80 + 20 : Math.random() * 20;\n                    return Math.floor(base);\n                }),\n            };\n        });\n    }, []);\n\n    const getColorClass = (value: number) => {\n        if (value < 20) return \"bg-chart-1\";\n        if (value < 40) return \"bg-chart-2\";\n        if (value < 60) return \"bg-chart-3\";\n        if (value < 80) return \"bg-chart-4\";\n        return \"bg-chart-5\";\n    };\n\n    return (\n        <Card className=\"flex size-full flex-col gap-5 overflow-hidden py-4\">\n            <motion.div\n                initial=\"hidden\"\n                whileInView=\"show\"\n                viewport={{ once: true, amount: 0.3 }}\n                variants={rootVariants}\n                className=\"flex size-full flex-col gap-5\">\n                <CardHeader className=\"flex items-center justify-between gap-2 px-4\">\n                    <motion.div variants={titleVariants} className=\"flex items-center gap-2\">\n                        <CalendarArrowUpIcon className=\"size-4.5\" />\n                        <CardTitle>Weekly Traffic</CardTitle>\n                    </motion.div>\n                    <motion.div\n                        variants={legendGroupVariants}\n                        className=\"flex items-center justify-end gap-1\">\n                        <motion.span\n                            variants={legendItemVariants}\n                            className=\"text-muted-foreground mr-1 text-sm\">\n                            L<span className=\"max-sm:hidden\">ow</span>\n                        </motion.span>\n                        {legendColors.map((color) => (\n                            <motion.div\n                                key={color}\n                                variants={legendItemVariants}\n                                className={cn(color, \"size-2.5 rounded-xs\")}\n                            />\n                        ))}\n                        <motion.span\n                            variants={legendItemVariants}\n                            className=\"text-muted-foreground ml-1 text-sm\">\n                            H<span className=\"max-sm:hidden\">igh</span>\n                        </motion.span>\n                    </motion.div>\n                </CardHeader>\n\n                <CardContent className=\"flex min-h-0 w-full grow flex-col gap-2 px-4\">\n                    <div className=\"flex gap-2\">\n                        <div className=\"w-8\" />\n                        <motion.div\n                            variants={axisGroupVariants}\n                            className=\"grid grow grid-cols-8 gap-1 text-center\">\n                            {timeSlots.map((slot) => (\n                                <motion.span\n                                    key={slot.label}\n                                    variants={axisItemVariants}\n                                    className=\"text-muted-foreground truncate px-0.5 text-[9px]\">\n                                    {slot.label}\n                                </motion.span>\n                            ))}\n                        </motion.div>\n                    </div>\n\n                    <div className=\"flex min-h-0 grow gap-2\">\n                        <motion.div\n                            variants={axisGroupVariants}\n                            className=\"flex w-8 shrink-0 flex-col justify-between gap-1\">\n                            {days.map((day) => (\n                                <motion.span\n                                    key={day}\n                                    variants={axisItemVariants}\n                                    className=\"text-muted-foreground flex h-full items-center text-xs/none\">\n                                    {day}\n                                </motion.span>\n                            ))}\n                        </motion.div>\n\n                        <motion.div\n                            ref={gridRef}\n                            variants={gridVariants}\n                            onMouseLeave={() => setActive(null)}\n                            className=\"relative flex h-full w-full grow flex-col gap-1\">\n                            {data.map((row, rIdx) => (\n                                <motion.div\n                                    key={row.day}\n                                    variants={rowVariants}\n                                    className=\"grid grow grid-cols-8 gap-1\">\n                                    {row.slots.map((val, i) => (\n                                        <motion.div\n                                            key={`${row.day}-${i}`}\n                                            variants={cellVariants}\n                                            onMouseEnter={(e) => {\n                                                anchorTip(e.currentTarget);\n                                                const prev = prevIdxRef.current;\n                                                setDir({\n                                                    row: prev\n                                                        ? Math.max(-1, Math.min(1, rIdx - prev.row))\n                                                        : 0,\n                                                    col: prev\n                                                        ? Math.max(-1, Math.min(1, i - prev.col))\n                                                        : 0,\n                                                });\n                                                prevIdxRef.current = { row: rIdx, col: i };\n                                                setTrend(val >= prevValRef.current ? 1 : -1);\n                                                prevValRef.current = val;\n                                                setActive({\n                                                    id: `${row.day}-${i}`,\n                                                    day: row.day,\n                                                    slot: timeSlots[i].name,\n                                                    value: val,\n                                                });\n                                            }}\n                                            className=\"h-full min-h-6 w-full\">\n                                            <div\n                                                className={cn(\n                                                    \"h-full min-h-6 w-full cursor-pointer rounded-sm transition-[filter] hover:brightness-125\",\n                                                    getColorClass(val),\n                                                )}\n                                            />\n                                        </motion.div>\n                                    ))}\n                                </motion.div>\n                            ))}\n\n                            <AnimatePresence>\n                                {active && anchor && (\n                                    <motion.div\n                                        ref={tipRef}\n                                        initial={{ opacity: 0, x: anchor.x, y: anchor.y, width: anchor.w }}\n                                        animate={{ opacity: 1, x: anchor.x, y: anchor.y, width: anchor.w }}\n                                        exit={{ opacity: 0 }}\n                                        transition={{ duration: 0.7, ease: EASE }}\n                                        className=\"bg-foreground text-background pointer-events-none absolute top-0 left-0 z-20 rounded-md px-3 py-1.5 text-xs shadow-lg\">\n                                        <div className=\"overflow-hidden\">\n                                            <div ref={contentRef} className=\"w-max\">\n                                                <div className=\"flex items-center gap-1 font-semibold\">\n                                                    <span className=\"relative inline-flex overflow-hidden\">\n                                                        <AnimatePresence\n                                                            mode=\"popLayout\"\n                                                            initial={false}\n                                                            custom={{ x: 0, y: dir.row }}>\n                                                            <motion.span\n                                                                key={active.day}\n                                                                custom={{ x: 0, y: dir.row }}\n                                                                variants={slideVariants}\n                                                                initial=\"enter\"\n                                                                animate=\"center\"\n                                                                exit=\"exit\"\n                                                                transition={{ duration: 0.18, ease: \"easeOut\" }}>\n                                                                {active.day}\n                                                            </motion.span>\n                                                        </AnimatePresence>\n                                                    </span>\n                                                    <span>•</span>\n                                                    <span className=\"relative inline-flex overflow-hidden\">\n                                                        <AnimatePresence\n                                                            mode=\"popLayout\"\n                                                            initial={false}\n                                                            custom={{ x: dir.col, y: 0 }}>\n                                                            <motion.span\n                                                                key={active.slot}\n                                                                custom={{ x: dir.col, y: 0 }}\n                                                                variants={slideVariants}\n                                                                initial=\"enter\"\n                                                                animate=\"center\"\n                                                                exit=\"exit\"\n                                                                transition={{ duration: 0.18, ease: \"easeOut\" }}>\n                                                                {active.slot}\n                                                            </motion.span>\n                                                        </AnimatePresence>\n                                                    </span>\n                                                </div>\n                                                <div className=\"flex items-center gap-1\">\n                                                    <NumberFlow\n                                                        value={active.value}\n                                                        trend={trend}\n                                                        transformTiming={{\n                                                            duration: 800,\n                                                            easing: \"cubic-bezier(0.16, 1, 0.3, 1)\",\n                                                        }}\n                                                        spinTiming={{\n                                                            duration: 800,\n                                                            easing: \"cubic-bezier(0.16, 1, 0.3, 1)\",\n                                                        }}\n                                                        className=\"font-medium tabular-nums\"\n                                                    />\n                                                    <span>requests</span>\n                                                </div>\n                                            </div>\n                                        </div>\n                                        <motion.div\n                                            initial={false}\n                                            animate={{ left: anchor.arrowLeft }}\n                                            transition={{ duration: 0.7, ease: EASE }}\n                                            className=\"bg-foreground absolute -bottom-1 left-0 size-2.5 rotate-45 rounded-[2px]\"\n                                        />\n                                    </motion.div>\n                                )}\n                            </AnimatePresence>\n                        </motion.div>\n                    </div>\n                </CardContent>\n            </motion.div>\n        </Card>\n    );\n};\n\nexport { WeeklyTraffic as Chart2 };\n"
    },
    {
      "path": "components/blocks/dashboard/stat/stat-1.tsx",
      "type": "registry:block",
      "content": "import { ArrowDownRightIcon, ArrowUpRightIcon, MinusIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Card, CardDescription, CardFooter, CardHeader, CardTitle } from \"@/components/ui/card\";\n\nexport type Stat1Props = {\n    title: string;\n    value: string | number;\n    changeValue: string | number;\n    direction?: \"up\" | \"down\" | \"neutral\";\n};\n\nexport const Stat1 = ({ title, value, changeValue, direction = \"up\" }: Stat1Props) => {\n    const variants = {\n        up: {\n            Icon: ArrowUpRightIcon,\n            color: \"text-green-500\",\n        },\n        down: {\n            Icon: ArrowDownRightIcon,\n            color: \"text-destructive\",\n        },\n        neutral: {\n            Icon: MinusIcon,\n            color: \"text-muted-foreground\",\n        },\n    };\n\n    const { Icon, color } = variants[direction];\n\n    return (\n        <Card className=\"@container/card w-full gap-4 py-4\">\n            <CardHeader className=\"px-4\">\n                <CardDescription className=\"font-medium\">{title}</CardDescription>\n                <CardTitle className=\"text-2xl font-semibold @[600px]/card:text-4xl @[800px]/card:text-5xl\">\n                    {value}\n                </CardTitle>\n            </CardHeader>\n            <CardFooter className={cn(\"flex-row items-center gap-1 px-4 text-sm font-medium\", color)}>\n                <Icon className=\"size-4\" />\n                <span>{changeValue}</span>\n            </CardFooter>\n        </Card>\n    );\n};\n"
    },
    {
      "path": "components/blocks/dashboard/table/table-1.tsx",
      "type": "registry:block",
      "content": "import { ClockFadingIcon } from \"lucide-react\";\n\nimport { Badge } from \"@/components/ui/badge\";\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from \"@/components/ui/table\";\n\nconst data = [\n    { id: \"1\", method: \"GET\", path: \"/v1/users\", status: 200, duration: \"12ms\", time: \"just now\" },\n    { id: \"2\", method: \"POST\", path: \"/v1/auth/login\", status: 201, duration: \"45ms\", time: \"15 mins ago\" },\n    { id: \"3\", method: \"DELETE\", path: \"/v1/billing\", status: 404, duration: \"8ms\", time: \"2 hours ago\" },\n    { id: \"4\", method: \"PATCH\", path: \"/v1/settings\", status: 500, duration: \"102ms\", time: \"Yesterday\" },\n    { id: \"5\", method: \"GET\", path: \"/v1/settings\", status: 201, duration: \"64ms\", time: \"Last week\" },\n];\n\nconst getMethodColor = (method: string) => {\n    switch (method) {\n        case \"GET\":\n        case \"POST\":\n        case \"PATCH\":\n            return \"text-primary\";\n        case \"DELETE\":\n            return \"text-destructive\";\n    }\n};\n\nexport const Table1 = () => {\n    return (\n        <Card className=\"gap-3 pt-4 pb-3\">\n            <CardHeader className=\"px-4\">\n                <div className=\"flex items-center gap-2\">\n                    <ClockFadingIcon className=\"size-4.5\" />\n                    <CardTitle>Recent Requests</CardTitle>\n                </div>\n                <CardDescription>A list of the latest API calls to your project.</CardDescription>\n            </CardHeader>\n            <CardContent className=\"px-3\">\n                <Table>\n                    <TableHeader>\n                        <TableRow className=\"bg-muted/60\">\n                            <TableHead>Method</TableHead>\n                            <TableHead>Endpoint</TableHead>\n                            <TableHead>Status</TableHead>\n                            <TableHead>Time</TableHead>\n                            <TableHead className=\"text-right\">Duration</TableHead>\n                        </TableRow>\n                    </TableHeader>\n                    <TableBody>\n                        {data.map((row) => (\n                            <TableRow key={row.id}>\n                                <TableCell className=\"text-xs font-semibold\">\n                                    <span className={getMethodColor(row.method)}>{row.method}</span>\n                                </TableCell>\n                                <TableCell className=\"font-mono text-xs\">{row.path}</TableCell>\n                                <TableCell>\n                                    <Badge variant={row.status >= 400 ? \"destructive\" : \"secondary\"}>\n                                        {row.status}\n                                    </Badge>\n                                </TableCell>\n                                <TableCell className=\"text-xs\">{row.time}</TableCell>\n                                <TableCell className=\"text-muted-foreground text-right text-xs\">\n                                    {row.duration}\n                                </TableCell>\n                            </TableRow>\n                        ))}\n                    </TableBody>\n                </Table>\n            </CardContent>\n        </Card>\n    );\n};\n"
    },
    {
      "path": "components/blocks/dashboard/widget/widget-1.tsx",
      "type": "registry:block",
      "content": "import { useEffect, useRef, useState } from \"react\";\n\nimport { ActivityIcon, PauseIcon, PlayIcon, TerminalIcon, Trash2Icon } from \"lucide-react\";\nimport { AnimatePresence, motion } from \"motion/react\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\n\ntype LogEntry = {\n    id: string;\n    timestamp: string;\n    method: string;\n    path: string;\n    status: number;\n    latency: string;\n};\n\nconst methods = [\"GET\", \"POST\", \"PUT\", \"DELETE\"];\nconst paths = [\"/api/v1/users\", \"/api/auth/login\", \"/api/products\", \"/api/settings\", \"/health\"];\nconst statuses = [200, 200, 200, 201, 400, 401, 404, 500];\n\nexport const Widget1 = () => {\n    const [logs, setLogs] = useState<LogEntry[]>([]);\n    const [isPaused, setIsPaused] = useState(false);\n    const scrollRef = useRef<HTMLDivElement>(null);\n\n    const generateLog = (): LogEntry => {\n        const date = new Date();\n        return {\n            id: Math.random().toString(36).slice(2, 9),\n            timestamp: date.toLocaleTimeString(\"en-US\", {\n                hour12: false,\n                hour: \"2-digit\",\n                minute: \"2-digit\",\n                second: \"2-digit\",\n            }),\n            method: methods[Math.floor(Math.random() * methods.length)],\n            path: paths[Math.floor(Math.random() * paths.length)],\n            status: statuses[Math.floor(Math.random() * statuses.length)],\n            latency: `${Math.floor(Math.random() * 200) + 20}ms`,\n        };\n    };\n\n    useEffect(() => {\n        if (isPaused) return;\n\n        const interval = setInterval(() => {\n            setLogs((prev) => {\n                const newLog = generateLog();\n                const newLogs = [...prev, newLog];\n                if (newLogs.length > 20) return newLogs.slice(newLogs.length - 20);\n                return newLogs;\n            });\n        }, 2000);\n\n        return () => clearInterval(interval);\n    }, [isPaused]);\n\n    useEffect(() => {\n        if (scrollRef.current && !isPaused) {\n            const viewport = scrollRef.current;\n            if (viewport && viewport.scrollHeight - (viewport.scrollTop + viewport.clientHeight) < 50) {\n                viewport?.scrollTo({ top: viewport?.scrollHeight, behavior: \"smooth\" });\n            }\n        }\n    }, [logs, isPaused]);\n\n    return (\n        <Card className=\"flex h-full flex-col gap-0 pt-3 pb-0\">\n            <CardHeader className=\"flex items-center justify-between space-y-0 border-b px-4 pb-3!\">\n                <div className=\"flex items-center gap-2\">\n                    <TerminalIcon className=\"size-4\" />\n                    <CardTitle className=\"flex items-center gap-3 whitespace-nowrap\">\n                        <p>Live Console</p>\n                        <div className=\"bg-foreground/15 size-1.25 rounded-full max-sm:hidden\"></div>\n                        <span className=\"text-muted-foreground text-xs max-sm:hidden\">Last {logs.length} events</span>\n                    </CardTitle>\n                </div>\n                <div className=\"flex items-center gap-0\">\n                    <Button\n                        variant=\"ghost\"\n                        size=\"icon-sm\"\n                        onClick={() => setIsPaused(!isPaused)}\n                        aria-label={isPaused ? \"Resume Logs\" : \"Pause Logs\"}>\n                        {isPaused ? <PlayIcon className=\"size-4\" /> : <PauseIcon className=\"size-4\" />}\n                    </Button>\n                    <Button\n                        aria-label=\"Clear Logs\"\n                        variant=\"destructive\"\n                        className=\"bg-transparent\"\n                        size=\"icon-sm\"\n                        onClick={() => setLogs([])}>\n                        <Trash2Icon className=\"size-4\" />\n                    </Button>\n                </div>\n            </CardHeader>\n\n            <CardContent className=\"h-64 min-h-0 grow px-1.5 pt-0\">\n                {logs.length === 0 && (\n                    <div className=\"text-muted-foreground flex h-full flex-col items-center justify-center gap-2 py-4\">\n                        <ActivityIcon className=\"size-6\" />\n                        <span>Waiting for incoming requests...</span>\n                    </div>\n                )}\n                <ScrollArea ref={scrollRef} className=\"flex h-full flex-col gap-px\">\n                    <div className=\"my-1.5\">\n                        <AnimatePresence initial={false}>\n                            {logs.map((log) => (\n                                <motion.div\n                                    key={log.id}\n                                    initial={{ opacity: 0, x: -10 }}\n                                    animate={{ opacity: 1, x: 0 }}\n                                    transition={{ duration: 0.2 }}\n                                    className=\"group hover:bg-accent flex cursor-pointer items-center gap-3 rounded-md px-2.5 py-1.5\">\n                                    <span className=\"text-muted-foreground w-20\">{log.timestamp}</span>\n                                    <span\n                                        className={cn(\"w-12 text-xs font-medium\", {\n                                            \"text-primary\": [\"GET\", \"POST\"].includes(log.method),\n                                            \"text-destructive\": log.method === \"DELETE\",\n                                        })}>\n                                        {log.method}\n                                    </span>\n                                    <span\n                                        className={cn(\"w-10 font-medium\", {\n                                            \"text-destructive\": log.status > 400,\n                                        })}>\n                                        {log.status}\n                                    </span>\n                                    <span className=\"text-muted-foreground grow truncate\">{log.path}</span>\n                                    <span className=\"text-muted-foreground min-w-12 text-end text-xs\">\n                                        {log.latency}\n                                    </span>\n                                </motion.div>\n                            ))}\n                        </AnimatePresence>\n                    </div>\n                </ScrollArea>\n            </CardContent>\n        </Card>\n    );\n};\n"
    },
    {
      "path": "components/blocks/dashboard/widget/widget-5.tsx",
      "type": "registry:block",
      "content": "import { AlertCircleIcon, CpuIcon, DatabaseIcon, HardDriveIcon, NetworkIcon, ZapIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n    Card,\n    CardAction,\n    CardContent,\n    CardDescription,\n    CardHeader,\n    CardTitle,\n} from \"@/components/ui/card\";\nimport { Progress } from \"@/components/ui/progress\";\n\nconst quotas = [\n    {\n        id: \"daily-req\",\n        name: \"Daily Requests\",\n        icon: ZapIcon,\n        used: 81512,\n        limit: 100000,\n        unit: \"reqs\",\n        resetIn: \"4h 12m\",\n    },\n    {\n        id: \"bandwidth\",\n        name: \"Egress Bandwidth\",\n        icon: NetworkIcon,\n        used: 45.2,\n        limit: 100,\n        unit: \"GB\",\n        resetIn: \"4h 12m\",\n    },\n    {\n        id: \"db-conn\",\n        name: \"Active DB Connections\",\n        icon: DatabaseIcon,\n        used: 89,\n        limit: 100,\n        unit: \"conns\",\n        resetIn: null,\n    },\n    {\n        id: \"storage\",\n        name: \"Log Storage (Retention)\",\n        icon: HardDriveIcon,\n        used: 3.2,\n        limit: 5.0,\n        unit: \"TB\",\n        resetIn: null,\n    },\n];\n\nconst getPercentage = (used: number, limit: number) => Math.min(100, Math.round((used / limit) * 100));\n\nexport const Widget5 = () => {\n    return (\n        <Card className=\"flex flex-col gap-5 py-4\">\n            <CardHeader className=\"px-4\">\n                <CardTitle className=\"flex items-center gap-2\">\n                    <CpuIcon className=\"size-4.5\" />\n                    System Limits\n                </CardTitle>\n                <CardDescription>Resource usage against plan quotas.</CardDescription>\n                <CardAction>\n                    <Badge variant=\"destructive\">\n                        <AlertCircleIcon className=\"size-4\" />\n                        <span>Critical Load</span>\n                    </Badge>\n                </CardAction>\n            </CardHeader>\n            <CardContent className=\"flex flex-col gap-3 px-4\">\n                {quotas.map((item) => {\n                    const percentage = getPercentage(item.used, item.limit);\n                    const isCritical = percentage >= 85;\n\n                    return (\n                        <div key={item.id} className=\"group flex flex-col\">\n                            <div className=\"flex items-center justify-between gap-2 text-sm\">\n                                <div className=\"flex items-center gap-2 sm:gap-2.5\">\n                                    <div\n                                        className={cn(\n                                            \"bg-muted flex size-8 items-center justify-center rounded-md border\",\n                                            {\n                                                \"bg-destructive/10 border-destructive/20 text-destructive\": isCritical,\n                                            },\n                                        )}>\n                                        <item.icon className=\"size-4\" />\n                                    </div>\n                                    <div className=\"flex flex-col gap-0.5\">\n                                        <span className=\"font-medium max-sm:text-xs\">{item.name}</span>\n                                        {item.resetIn && (\n                                            <span className=\"text-muted-foreground text-xs -mt-0.5\">\n                                                Resets in {item.resetIn}\n                                            </span>\n                                        )}\n                                    </div>\n                                </div>\n\n                                <div className=\"flex flex-col items-end gap-1 text-end\">\n                                    <p className=\"font-mono text-[10px] tracking-tight sm:text-xs\">\n                                        {item.used.toLocaleString()}{\" \"}\n                                        <span className=\"text-muted-foreground\">\n                                            / {item.limit.toLocaleString()} {item.unit}\n                                        </span>\n                                    </p>\n                                    <Progress\n                                        aria-label={`Usage progress for ${item.name}`}\n                                        value={percentage}\n                                        className={cn(\n                                            \"bg-muted w-28 **:data-[slot=progress-indicator]:bg-green-600 *:data-[slot=progress-track]:h-1\",\n                                            {\n                                                \"**:data-[slot=progress-indicator]:bg-destructive\": isCritical,\n                                            },\n                                        )}></Progress>\n                                </div>\n                            </div>\n                        </div>\n                    );\n                })}\n                <Button variant=\"outline\" size=\"sm\" className=\"mt-2 w-fit self-center\">\n                    Manage Plan & Limits\n                </Button>\n            </CardContent>\n        </Card>\n    );\n};\n"
    },
    {
      "path": "components/templates/free-dashboard/layouts/page-title.tsx",
      "type": "registry:block",
      "content": "import { Link } from \"@tanstack/react-router\";\nimport { Fragment, type ReactNode } from \"react\";\n\nimport {\n    Breadcrumb,\n    BreadcrumbItem,\n    BreadcrumbLink,\n    BreadcrumbList,\n    BreadcrumbPage,\n    BreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\n\ntype Props = {\n    title: string;\n    endContent?: ReactNode;\n    links?: {\n        label: string;\n        href: string;\n    }[];\n};\n\nexport const PageTitle = ({ title, endContent, links }: Props) => {\n    const filteredLinks = links?.filter((link) => link.label.toLowerCase() !== title.trim().toLowerCase());\n    const isRootSameAsTitle = title.trim().toLowerCase() === \"admin\";\n\n    return (\n        <div className=\"flex items-center justify-between\">\n            <p className=\"text-lg font-medium sm:text-xl\">{title}</p>\n            {endContent || (\n                <Breadcrumb className=\"max-sm:hidden\">\n                    <BreadcrumbList>\n                        {!isRootSameAsTitle && (\n                            <>\n                                <BreadcrumbItem>\n                                    <BreadcrumbLink\n                                        render={<Link to=\"/preview/templates/free-dashboard\">Admin</Link>}></BreadcrumbLink>\n                                </BreadcrumbItem>\n                                <BreadcrumbSeparator />\n                            </>\n                        )}\n                        {filteredLinks?.map((link, index) => (\n                            <Fragment key={index}>\n                                <BreadcrumbItem>\n                                    <BreadcrumbLink render={<Link to={link.href}>{link.label}</Link>}></BreadcrumbLink>\n                                </BreadcrumbItem>\n                                <BreadcrumbSeparator />\n                            </Fragment>\n                        ))}\n                        <BreadcrumbItem>\n                            <BreadcrumbPage>{title}</BreadcrumbPage>\n                        </BreadcrumbItem>\n                    </BreadcrumbList>\n                </Breadcrumb>\n            )}\n        </div>\n    );\n};\n"
    },
    {
      "path": "components/templates/free-dashboard/dashboards/sales.tsx",
      "type": "registry:block",
      "content": "import { Analytics7 } from \"@/components/blocks/app/analytics/analytics-7\";\nimport { Chart4 } from \"@/components/paceui/charts/channel-sales\";\nimport { Chart3 } from \"@/components/paceui/charts/financial-performance\";\nimport { Stat2, type Stat2Props } from \"@/components/blocks/dashboard/stat/stat-2\";\nimport { Table3 } from \"@/components/blocks/dashboard/table/table-3\";\nimport { Promo1 } from \"@/components/blocks/layout/promo/promo-1\";\nimport { PageTitle } from \"@/components/templates/free-dashboard/layouts/page-title\";\n\nexport const stats: Stat2Props[] = [\n    {\n        title: \"Gross Revenue\",\n        value: \"$7,142,480\",\n        trendValue: 12.5,\n        footerLabel: \"Record high\",\n        footerSubtext: \"vs. $6,300,368 last month\",\n    },\n    {\n        title: \"Total Orders\",\n        value: \"1,248\",\n        trendValue: 5.2,\n        footerLabel: \"Increased volume\",\n        footerSubtext: \"Successful holiday promotion\",\n    },\n    {\n        title: \"Avg. Order Value\",\n        value: \"$114.16\",\n        trendValue: -2.1,\n        footerLabel: \"Minor decrease\",\n        footerSubtext: \"Due to high volume of small items\",\n    },\n    {\n        title: \"Customer LTV\",\n        value: \"$892.00\",\n        trendValue: 8.4,\n        footerLabel: \"Strong retention\",\n        footerSubtext: \"Upgraded subscription tiers\",\n    },\n];\n\nexport const SalesDashboard = () => {\n    return (\n        <div>\n            <PageTitle title=\"Sales Performance\" />\n\n            <div className=\"mt-4 grid gap-4 sm:mt-5 sm:gap-5 xl:grid-cols-4\">\n                {stats.map((stat, index) => (\n                    <Stat2 {...stat} key={index} />\n                ))}\n            </div>\n            <div className=\"mt-4 grid grid-cols-1 gap-4 sm:mt-5 sm:gap-5 xl:grid-cols-7\">\n                <div className=\"xl:col-span-4\">\n                    <Chart3 />\n                </div>\n                <div className=\"xl:col-span-3\">\n                    <Table3 />\n                </div>\n            </div>\n            <div className=\"mt-4 grid grid-cols-1 gap-4 sm:mt-5 sm:gap-5 lg:grid-cols-2 2xl:grid-cols-3\">\n                <Chart4 />\n                <Analytics7 />\n                <Promo1 />\n            </div>\n        </div>\n    );\n};\n"
    },
    {
      "path": "components/blocks/app/analytics/analytics-7.tsx",
      "type": "registry:block",
      "content": "import { useState } from \"react\";\n\nimport { CalendarDays, CheckIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils.ts\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport {\n    DropdownMenu,\n    DropdownMenuContent,\n    DropdownMenuItem,\n    DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Progress } from \"@/components/ui/progress\";\n\ntype TimeRangeKey = \"7d\" | \"30d\" | \"90d\" | \"year\";\n\ninterface TimeRangeOption {\n    value: TimeRangeKey;\n    label: string;\n}\n\nconst timeRanges: TimeRangeOption[] = [\n    { value: \"7d\", label: \"This Week\" },\n    { value: \"30d\", label: \"This Month\" },\n    { value: \"90d\", label: \"Last 3 Months\" },\n    { value: \"year\", label: \"Year to Date\" },\n];\n\nconst platformConfig: Record<string, { label: string; imageUrl: string; className?: string }> = {\n    google: {\n        label: \"Google\",\n        imageUrl: \"https://cdn.paceui.com/brand-logos/google-icon.svg\",\n    },\n    github: {\n        label: \"GitHub\",\n        imageUrl: \"https://cdn.paceui.com/brand-logos/github.svg\",\n        className: \"dark:invert\",\n    },\n    linkedin: {\n        label: \"LinkedIn\",\n        imageUrl: \"https://cdn.paceui.com/brand-logos/linkedin.svg\",\n    },\n    x: {\n        label: \"X\",\n        imageUrl: \"https://cdn.paceui.com/brand-logos/x.svg\",\n        className: \"dark:invert size-4.5\",\n    },\n};\n\nconst apiData = [\n    { source: \"google\", visitors: 12450, revenue: 45200, percent: 78 },\n    { source: \"github\", visitors: 8300, revenue: 28500, percent: 62 },\n    { source: \"linkedin\", visitors: 4100, revenue: 12100, percent: 45 },\n    { source: \"x\", visitors: 2400, revenue: 8400, percent: 25 },\n];\n\nexport const Analytics7 = () => {\n    const [range, setRange] = useState<TimeRangeKey>(\"30d\");\n\n    const selectedLabel = timeRanges.find((r) => r.value === range)?.label;\n\n    return (\n        <Card>\n            <CardHeader>\n                <CardTitle>Traffic Sources</CardTitle>\n                <CardDescription>Revenue contribution from each traffic source</CardDescription>\n                <CardAction>\n                    <DropdownMenu>\n                        <DropdownMenuTrigger\n                            render={\n                                <Button variant=\"outline\" size=\"sm\" className=\"gap-2 max-md:size-8\">\n                                    <CalendarDays className=\"text-muted-foreground size-4\" />\n                                    <span className=\"max-md:hidden\">{selectedLabel}</span>\n                                </Button>\n                            }\n                        />\n                        <DropdownMenuContent align=\"end\" className=\"w-44\">\n                            {timeRanges.map((item) => (\n                                <DropdownMenuItem\n                                    key={item.value}\n                                    onClick={() => setRange(item.value)}\n                                    className=\"justify-between\">\n                                    {item.label}\n                                    {range === item.value && <CheckIcon className=\"size-4\" />}\n                                </DropdownMenuItem>\n                            ))}\n                        </DropdownMenuContent>\n                    </DropdownMenu>\n                </CardAction>\n            </CardHeader>\n\n            <CardContent className=\"flex flex-col gap-2.5\">\n                {apiData.map((item) => {\n                    const platform = platformConfig[item.source];\n\n                    return (\n                        <div key={item.source} className=\"group flex flex-col gap-3\">\n                            <div className=\"flex items-center justify-between\">\n                                <div className=\"flex items-center gap-3\">\n                                    <div className=\"bg-muted flex size-9 items-center justify-center rounded-md p-1\">\n                                        <img\n                                            src={platform.imageUrl}\n                                            alt={`${platform.label} logo`}\n                                            className={cn(\"size-6\", platform.className)}\n                                            loading=\"lazy\"\n                                        />\n                                    </div>\n                                    <div>\n                                        <p className=\"text-base font-medium\">{platform.label}</p>\n                                        <p className=\"text-muted-foreground text-xs\">\n                                            {item.visitors.toLocaleString()} visitors\n                                        </p>\n                                    </div>\n                                </div>\n                                <div className=\"text-end\">\n                                    <p className=\"text-base font-medium\">\n                                        ${item.revenue.toLocaleString()}\n                                        <span className=\"text-muted-foreground ms-1 text-xs\">({item.percent}%)</span>\n                                    </p>\n                                    <div className=\"mt-1 flex items-center gap-2.5\">\n                                        <Progress\n                                            aria-label={`Progress for ${platform.label}`}\n                                            value={item.percent}\n                                            className=\"bg-muted **:data-[slot=progress-indicator]:bg-primary/70 h-1 w-30 *:data-[slot=progress-track]:h-1\"\n                                        />\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                    );\n                })}\n            </CardContent>\n        </Card>\n    );\n};\n"
    },
    {
      "path": "components/paceui/charts/channel-sales.tsx",
      "type": "registry:block",
      "content": "import { useMemo } from \"react\";\n\nimport { Label, Pie, PieChart } from \"recharts\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { type ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent } from \"@/components/ui/chart\";\n\nexport interface ChannelSalesItem {\n    title: string;\n    visitors: number;\n    fill: string;\n}\n\nexport interface ChannelSalesProps {\n    data?: ChannelSalesItem[];\n    className?: string;\n}\n\nconst chartData: ChannelSalesItem[] = [\n    { title: \"Direct\", visitors: 5200, fill: \"var(--chart-1)\" },\n    { title: \"Social\", visitors: 3800, fill: \"var(--chart-2)\" },\n    { title: \"Organic\", visitors: 2500, fill: \"var(--chart-3)\" },\n];\n\nconst chartConfig: ChartConfig = {\n    direct: {\n        label: \"Direct\",\n        color: \"var(--chart-1)\",\n    },\n    social: {\n        label: \"Social\",\n        color: \"var(--chart-2)\",\n    },\n    organic: {\n        label: \"Organic\",\n        color: \"var(--chart-3)\",\n    },\n};\n\nexport const ChannelSales = ({ data = chartData, className }: ChannelSalesProps = {}) => {\n    const totalVisitors = useMemo(() => data.reduce((acc, curr) => acc + curr.visitors, 0), [data]);\n\n    return (\n        <Card className={cn(\"flex flex-col\", className)}>\n            <CardHeader className=\"items-center\">\n                <CardTitle>Sales by Channel</CardTitle>\n                <CardDescription>Distribution of sales across acquisition channels</CardDescription>\n            </CardHeader>\n            <CardContent className=\"flex-1\">\n                <ChartContainer config={chartConfig} className=\"mx-auto -mt-2 aspect-square max-h-60 min-h-48\">\n                    <PieChart>\n                        <ChartTooltip cursor={false} content={<ChartTooltipContent hideLabel />} />\n                        <Pie\n                            data={data}\n                            dataKey=\"visitors\"\n                            nameKey=\"title\"\n                            innerRadius={84}\n                            outerRadius={100}\n                            startAngle={180}\n                            endAngle={0}\n                            paddingAngle={4}\n                            cornerRadius={4}>\n                            <Label\n                                content={({ viewBox }) => {\n                                    if (viewBox && \"cx\" in viewBox && \"cy\" in viewBox) {\n                                        return (\n                                            <text\n                                                x={viewBox.cx}\n                                                y={viewBox.cy}\n                                                textAnchor=\"middle\"\n                                                dominantBaseline=\"middle\">\n                                                <tspan\n                                                    x={viewBox.cx}\n                                                    y={(viewBox.cy || 0) - 40}\n                                                    className=\"fill-muted-foreground text-sm\">\n                                                    Total Sales\n                                                </tspan>\n                                                <tspan\n                                                    x={viewBox.cx}\n                                                    y={(viewBox.cy || 0) - 8}\n                                                    className=\"fill-foreground text-3xl font-semibold\">\n                                                    {totalVisitors.toLocaleString()}\n                                                </tspan>\n                                            </text>\n                                        );\n                                    }\n                                }}\n                            />\n                        </Pie>\n                    </PieChart>\n                </ChartContainer>\n            </CardContent>\n            <CardFooter className=\"relative -mt-26 flex-col gap-2 text-sm\">\n                <div className=\"grid w-full grid-cols-3 gap-2\">\n                    {chartData.map((item, index) => (\n                        <div key={index} className=\"flex flex-col items-center justify-center text-center\">\n                            <div className=\"mb-1 flex items-center gap-1.5\">\n                                <div className=\"size-1.5 rounded-full\" style={{ backgroundColor: item.fill }} />\n                                <span className=\"max-w-15 truncate text-xs\">{item.title}</span>\n                            </div>\n                            <span className=\"text-lg font-semibold\">{item.visitors.toLocaleString()}</span>\n                        </div>\n                    ))}\n                </div>\n            </CardFooter>\n        </Card>\n    );\n};\n\nexport { ChannelSales as Chart4 };\n"
    },
    {
      "path": "components/paceui/charts/financial-performance.tsx",
      "type": "registry:block",
      "content": "import { memo, useEffect, useMemo, useRef, useState } from \"react\";\n\nimport NumberFlow, { type Format, NumberFlowGroup } from \"@number-flow/react\";\nimport {\n    ArrowDownToLineIcon,\n    FileJsonIcon,\n    MoreHorizontalIcon,\n    RefreshCwIcon,\n    SettingsIcon,\n    Share2Icon,\n} from \"lucide-react\";\nimport { type Variants, motion, useInView } from \"motion/react\";\nimport { Bar, BarChart, CartesianGrid, XAxis, YAxis } from \"recharts\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { type ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent } from \"@/components/ui/chart\";\nimport {\n    DropdownMenu,\n    DropdownMenuContent,\n    DropdownMenuGroup,\n    DropdownMenuItem,\n    DropdownMenuLabel,\n    DropdownMenuSeparator,\n    DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Separator } from \"@/components/ui/separator\";\n\nexport type FinancialPerformanceItem = {\n    date: string;\n    item1: number;\n    item2: number;\n};\n\nexport interface FinancialPerformanceProps {\n    data?: FinancialPerformanceItem[];\n    className?: string;\n}\n\ninterface CustomBarProps {\n    x?: number;\n    y?: number;\n    width?: number;\n    height?: number;\n    fill?: string;\n    index?: number;\n    className?: string;\n    strokeWidth?: number;\n    radius?: number | [number, number, number, number];\n    seriesKey?: string;\n    seriesOffset?: number;\n    hasEnteredRef?: { current: boolean };\n    fromBarsRef?: { current: Record<string, Record<number, { y: number; height: number }>> };\n    currentBarsRef?: { current: Record<string, Record<number, { y: number; height: number }>> };\n    onMouseEnter?: (e: React.MouseEvent<SVGRectElement>) => void;\n    onMouseLeave?: (e: React.MouseEvent<SVGRectElement>) => void;\n    onClick?: (e: React.MouseEvent<SVGRectElement>) => void;\n}\n\nconst generateData = (): FinancialPerformanceItem[] => {\n    return Array.from({ length: 20 }, (_, i) => {\n        const date = new Date();\n        date.setMonth(date.getMonth() - 1);\n        date.setDate(date.getDate() + i);\n\n        return {\n            date: date.toISOString().split(\"T\")[0],\n            item1: Math.floor(Math.random() * 500) + 50,\n            item2: Math.floor(Math.random() * 500) + 50,\n        };\n    });\n};\n\nconst chartConfig: ChartConfig = {\n    visitors: {\n        label: \"Visitors\",\n    },\n    item1: {\n        label: \"Item 1\",\n        color: \"var(--chart-2)\",\n    },\n    item2: {\n        label: \"Item 2\",\n        color: \"var(--chart-1)\",\n    },\n};\n\nconst EASE: [number, number, number, number] = [0.22, 1, 0.36, 1];\n\nconst ROTATE_SPRING = { type: \"spring\", stiffness: 450, damping: 22 } as const;\n\nconst NUMBER_FLOW_TIMING = {\n    duration: 900,\n    easing: \"cubic-bezier(0.16, 1, 0.3, 1)\",\n} as const;\n\nconst CURRENCY_FORMAT: Format = {\n    style: \"currency\",\n    currency: \"USD\",\n    maximumFractionDigits: 0,\n};\n\nconst PERCENT_FORMAT: Format = {\n    style: \"percent\",\n    minimumFractionDigits: 1,\n    maximumFractionDigits: 1,\n    signDisplay: \"always\",\n};\n\nconst rootVariants: Variants = {\n    hidden: {},\n    show: {\n        transition: {\n            delayChildren: 0.05,\n        },\n    },\n};\n\nconst itemVariants: Variants = {\n    hidden: { opacity: 0, y: 12, filter: \"blur(4px)\" },\n    show: (delayIndex: number = 0) => ({\n        opacity: 1,\n        y: 0,\n        filter: \"blur(0px)\",\n        transition: {\n            duration: 0.45,\n            delay: delayIndex * 0.07,\n            ease: EASE,\n        },\n    }),\n};\n\nconst actionItemVariants: Variants = {\n    hidden: { opacity: 0, scale: 0.85, y: -4 },\n    show: (delayIndex: number = 0) => ({\n        opacity: 1,\n        scale: 1,\n        y: 0,\n        transition: {\n            duration: 0.4,\n            delay: delayIndex * 0.07,\n            ease: EASE,\n        },\n    }),\n};\n\nconst separatorVariants: Variants = {\n    hidden: { opacity: 0, scaleY: 0 },\n    show: (delayIndex: number = 0) => ({\n        opacity: 1,\n        scaleY: 1,\n        transition: {\n            duration: 0.35,\n            delay: delayIndex * 0.07,\n            ease: EASE,\n        },\n    }),\n};\n\nconst chartPanelVariants: Variants = {\n    hidden: { opacity: 0, y: 24, filter: \"blur(6px)\" },\n    show: (delayIndex: number = 0) => ({\n        opacity: 1,\n        y: 0,\n        filter: \"blur(0px)\",\n        transition: {\n            duration: 0.7,\n            delay: delayIndex * 0.07,\n            ease: EASE,\n        },\n    }),\n};\n\nconst RollingNumber = memo(function RollingNumber({\n    value,\n    format,\n    initialDelay = 0,\n    refreshDelay = 0,\n    started = false,\n    className,\n}: {\n    value: number;\n    format?: Format;\n    initialDelay?: number;\n    refreshDelay?: number;\n    started?: boolean;\n    className?: string;\n}) {\n    const [val, setVal] = useState(0);\n    const hasInitializedRef = useRef(false);\n\n    useEffect(() => {\n        if (!started) return;\n        if (!hasInitializedRef.current) {\n            hasInitializedRef.current = true;\n            const t = setTimeout(() => {\n                setVal(value);\n            }, initialDelay);\n            return () => clearTimeout(t);\n        }\n        const t = setTimeout(() => {\n            setVal(value);\n        }, refreshDelay);\n        return () => clearTimeout(t);\n    }, [started, value, initialDelay, refreshDelay]);\n\n    return (\n        <NumberFlow\n            value={val}\n            format={format}\n            transformTiming={NUMBER_FLOW_TIMING}\n            spinTiming={NUMBER_FLOW_TIMING}\n            className={className}\n        />\n    );\n});\n\nconst CustomBar = memo(function CustomBar({\n    x = 0,\n    y = 0,\n    width = 0,\n    height = 0,\n    fill,\n    index = 0,\n    className = \"stroke-background\",\n    strokeWidth = 3,\n    radius = 6,\n    seriesKey = \"item1\",\n    seriesOffset = 0,\n    hasEnteredRef,\n    fromBarsRef,\n    currentBarsRef,\n    onMouseEnter,\n    onMouseLeave,\n    onClick,\n}: CustomBarProps) {\n    if (width <= 0 || height <= 0) {\n        return null;\n    }\n\n    const from = fromBarsRef?.current?.[seriesKey]?.[index];\n    const isEntrance = !hasEnteredRef?.current;\n\n    const fromY = isEntrance ? y + height : from ? from.y : y;\n    const fromH = isEntrance ? 0 : from ? from.height : height;\n    const delay = isEntrance ? 0.7 + index * 0.035 + seriesOffset : 0;\n    const duration = isEntrance ? 0.45 : 0.5;\n    const cornerRadius = typeof radius === \"number\" ? radius : 6;\n\n    useEffect(() => {\n        if (currentBarsRef?.current) {\n            if (!currentBarsRef.current[seriesKey]) {\n                currentBarsRef.current[seriesKey] = {};\n            }\n            currentBarsRef.current[seriesKey][index] = { y, height };\n        }\n    }, [index, seriesKey, y, height, currentBarsRef]);\n\n    return (\n        <motion.rect\n            x={x}\n            initial={{ y: fromY, height: fromH, opacity: isEntrance ? 0 : 1 }}\n            animate={{ y, height, opacity: 1 }}\n            transition={{\n                delay,\n                duration,\n                ease: EASE,\n            }}\n            width={width}\n            rx={cornerRadius}\n            ry={cornerRadius}\n            fill={fill}\n            className={className}\n            strokeWidth={strokeWidth}\n            onMouseEnter={onMouseEnter}\n            onMouseLeave={onMouseLeave}\n            onClick={onClick}\n        />\n    );\n});\n\nexport const FinancialPerformance = ({ data, className }: FinancialPerformanceProps = {}) => {\n    const cardRef = useRef<HTMLDivElement>(null);\n    const play = useInView(cardRef, { once: true, amount: 0.25 });\n\n    const [chartData, setChartData] = useState<FinancialPerformanceItem[]>(() => data ?? generateData());\n    const [refreshRotation, setRefreshRotation] = useState(0);\n    const [refreshCount, setRefreshCount] = useState(0);\n\n    const hasEnteredRef = useRef(false);\n    const currentBarsRef = useRef<Record<string, Record<number, { y: number; height: number }>>>({\n        item1: {},\n        item2: {},\n    });\n    const fromBarsRef = useRef<Record<string, Record<number, { y: number; height: number }>>>({\n        item1: {},\n        item2: {},\n    });\n\n    useEffect(() => {\n        const t = setTimeout(() => {\n            hasEnteredRef.current = true;\n        }, 1800);\n        return () => clearTimeout(t);\n    }, []);\n\n    useEffect(() => {\n        if (data) {\n            fromBarsRef.current = {\n                item1: { ...currentBarsRef.current.item1 },\n                item2: { ...currentBarsRef.current.item2 },\n            };\n            setRefreshCount((prev) => prev + 1);\n            setChartData(data);\n        }\n    }, [data]);\n\n    const handleRefresh = () => {\n        hasEnteredRef.current = true;\n        fromBarsRef.current = {\n            item1: { ...currentBarsRef.current.item1 },\n            item2: { ...currentBarsRef.current.item2 },\n        };\n        setRefreshRotation((prev) => prev + 360);\n        setRefreshCount((prev) => prev + 1);\n        setChartData(generateData());\n    };\n\n    const stats = useMemo(() => {\n        const total = chartData.reduce((acc, curr) => acc + curr.item1 + curr.item2, 0);\n        const avg = chartData.length > 0 ? Math.round(total / (chartData.length * 2.5)) : 248;\n        const rate = chartData.length > 0 ? ((total % 35) + 55) / 1000 : 0.072;\n        return {\n            revenue: total || 12345,\n            avgOrder: avg || 248,\n            conversion: rate,\n        };\n    }, [chartData]);\n\n    return (\n        <Card className={cn(\"@container/card max-md:py-4!\", className)}>\n            <motion.div\n                ref={cardRef}\n                initial=\"hidden\"\n                animate={play ? \"show\" : \"hidden\"}\n                variants={rootVariants}\n                className=\"flex size-full flex-col\">\n                <CardHeader className=\"max-md:px-4\">\n                    <motion.div custom={0} variants={itemVariants}>\n                        <CardTitle>Financial Performance</CardTitle>\n                    </motion.div>\n                    <motion.div custom={1} variants={itemVariants}>\n                        <CardDescription>Real-time insights for the last 30 days</CardDescription>\n                    </motion.div>\n                    <CardAction className=\"flex items-center gap-2\">\n                        <motion.div custom={2} variants={actionItemVariants} className=\"max-sm:hidden\">\n                            <Button\n                                variant=\"outline\"\n                                size=\"icon-sm\"\n                                aria-label=\"Refresh\"\n                                onClick={handleRefresh}>\n                                <motion.span animate={{ rotate: refreshRotation }} transition={ROTATE_SPRING}>\n                                    <RefreshCwIcon />\n                                </motion.span>\n                            </Button>\n                        </motion.div>\n                        <motion.div custom={3} variants={actionItemVariants} className=\"max-sm:hidden\">\n                            <Button variant=\"outline\" size=\"icon-sm\" aria-label=\"Download\">\n                                <ArrowDownToLineIcon />\n                            </Button>\n                        </motion.div>\n                        <motion.div custom={4} variants={actionItemVariants}>\n                            <DropdownMenu>\n                                <DropdownMenuTrigger\n                                    render={\n                                        <Button variant=\"outline\" size=\"icon-sm\" aria-label=\"Open menu\">\n                                            <MoreHorizontalIcon />\n                                            <span className=\"sr-only\">Open menu</span>\n                                        </Button>\n                                    }\n                                />\n                                <DropdownMenuContent align=\"end\" className=\"w-40\">\n                                    <DropdownMenuGroup>\n                                        <DropdownMenuLabel>Options</DropdownMenuLabel>\n                                        <DropdownMenuItem>\n                                            <SettingsIcon />\n                                            <span>Configure</span>\n                                        </DropdownMenuItem>\n                                        <DropdownMenuItem onClick={handleRefresh}>\n                                            <RefreshCwIcon />\n                                            <span>Refresh Data</span>\n                                        </DropdownMenuItem>\n                                        <DropdownMenuSeparator />\n                                        <DropdownMenuItem>\n                                            <ArrowDownToLineIcon />\n                                            <span>Export as PNG</span>\n                                        </DropdownMenuItem>\n                                        <DropdownMenuItem>\n                                            <FileJsonIcon />\n                                            <span>Export CSV</span>\n                                        </DropdownMenuItem>\n                                        <DropdownMenuItem>\n                                            <Share2Icon />\n                                            <span>Share Chart</span>\n                                        </DropdownMenuItem>\n                                    </DropdownMenuGroup>\n                                </DropdownMenuContent>\n                            </DropdownMenu>\n                        </motion.div>\n                    </CardAction>\n                    <NumberFlowGroup>\n                        <div className=\"col-span-full mt-4 flex items-center gap-6\">\n                            <motion.div custom={5} variants={itemVariants} className=\"min-w-24 space-y-1.5 sm:min-w-28\">\n                                <p className=\"text-muted-foreground text-sm font-medium\">Revenue</p>\n                                <p className=\"text-lg leading-none font-semibold sm:text-2xl tabular-nums\">\n                                    <RollingNumber\n                                        value={stats.revenue}\n                                        format={CURRENCY_FORMAT}\n                                        initialDelay={350}\n                                        refreshDelay={60}\n                                        started={play}\n                                    />\n                                </p>\n                            </motion.div>\n                            <motion.div custom={6} variants={separatorVariants}>\n                                <Separator orientation=\"vertical\" className=\"h-10\" />\n                            </motion.div>\n                            <motion.div custom={7} variants={itemVariants} className=\"min-w-20 space-y-1.5 sm:min-w-24\">\n                                <p className=\"text-muted-foreground text-sm font-medium whitespace-nowrap\">Avg. Order</p>\n                                <p className=\"text-lg leading-none font-semibold sm:text-2xl tabular-nums\">\n                                    <RollingNumber\n                                        value={stats.avgOrder}\n                                        format={CURRENCY_FORMAT}\n                                        initialDelay={500}\n                                        refreshDelay={180}\n                                        started={play}\n                                    />\n                                </p>\n                            </motion.div>\n                            <motion.div custom={8} variants={separatorVariants} className=\"max-sm:hidden\">\n                                <Separator orientation=\"vertical\" className=\"h-10\" />\n                            </motion.div>\n                            <motion.div custom={9} variants={itemVariants} className=\"min-w-20 space-y-1.5 sm:min-w-24 max-sm:hidden\">\n                                <p className=\"text-muted-foreground text-sm font-medium\">Conversion</p>\n                                <p className=\"text-lg leading-none font-semibold sm:text-2xl tabular-nums\">\n                                    <RollingNumber\n                                        value={stats.conversion}\n                                        format={PERCENT_FORMAT}\n                                        initialDelay={650}\n                                        refreshDelay={300}\n                                        started={play}\n                                    />\n                                </p>\n                            </motion.div>\n                        </div>\n                    </NumberFlowGroup>\n                </CardHeader>\n                <CardContent className=\"px-2 pt-4 sm:px-6 sm:pt-6\">\n                    <motion.div custom={10} variants={chartPanelVariants} className=\"w-full\">\n                        <ChartContainer config={chartConfig} className=\"aspect-auto h-65 w-full\">\n                            <BarChart data={chartData}>\n                                <CartesianGrid vertical={false} />\n                                <XAxis\n                                    dataKey=\"date\"\n                                    tickLine={false}\n                                    axisLine={false}\n                                    tickMargin={8}\n                                    minTickGap={32}\n                                    tickFormatter={(value) => {\n                                        const date = new Date(value);\n                                        return date.toLocaleDateString(\"en-US\", {\n                                            month: \"short\",\n                                            day: \"numeric\",\n                                        });\n                                    }}\n                                />\n                                <YAxis\n                                    domain={[0, 1200]}\n                                    tickLine={false}\n                                    axisLine={false}\n                                    tickMargin={4}\n                                    width={35}\n                                    className=\"text-sm sm:text-xs\"\n                                    tickFormatter={(value) => `${value}`}\n                                />\n                                <ChartTooltip\n                                    cursor={false}\n                                    content={\n                                        <ChartTooltipContent\n                                            className=\"rounded-md shadow-none\"\n                                            labelFormatter={(value) => {\n                                                return new Date(value as string | number).toLocaleDateString(\"en-US\", {\n                                                    month: \"short\",\n                                                    day: \"numeric\",\n                                                });\n                                            }}\n                                            indicator=\"dot\"\n                                        />\n                                    }\n                                />\n                                <Bar\n                                    dataKey=\"item1\"\n                                    stackId=\"a\"\n                                    fill=\"var(--color-item1)\"\n                                    radius={6}\n                                    className=\"stroke-background\"\n                                    strokeWidth={3}\n                                    isAnimationActive={false}\n                                    shape={(props) => (\n                                        <CustomBar\n                                            {...props}\n                                            seriesKey=\"item1\"\n                                            seriesOffset={0}\n                                            hasEnteredRef={hasEnteredRef}\n                                            fromBarsRef={fromBarsRef}\n                                            currentBarsRef={currentBarsRef}\n                                        />\n                                    )}\n                                />\n                                <Bar\n                                    dataKey=\"item2\"\n                                    stackId=\"a\"\n                                    fill=\"var(--color-item2)\"\n                                    radius={6}\n                                    className=\"stroke-background\"\n                                    strokeWidth={3}\n                                    isAnimationActive={false}\n                                    shape={(props) => (\n                                        <CustomBar\n                                            {...props}\n                                            seriesKey=\"item2\"\n                                            seriesOffset={0.015}\n                                            hasEnteredRef={hasEnteredRef}\n                                            fromBarsRef={fromBarsRef}\n                                            currentBarsRef={currentBarsRef}\n                                        />\n                                    )}\n                                />\n                            </BarChart>\n                        </ChartContainer>\n                    </motion.div>\n                </CardContent>\n            </motion.div>\n        </Card>\n    );\n};\n\nexport { FinancialPerformance as Chart3 };\n"
    },
    {
      "path": "components/blocks/dashboard/stat/stat-2.tsx",
      "type": "registry:block",
      "content": "import { MinusIcon, TrendingDownIcon, TrendingUpIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Badge } from \"@/components/ui/badge\";\nimport { Card, CardAction, CardDescription, CardFooter, CardHeader, CardTitle } from \"@/components/ui/card\";\n\nexport type Stat2Props = {\n    title: string;\n    value: string | number;\n    trendValue: number;\n    footerLabel: string;\n    footerSubtext: string;\n};\n\nexport const Stat2 = ({ title, value, trendValue, footerLabel, footerSubtext }: Stat2Props) => {\n    const isPositive = trendValue > 0;\n    const isNeutral = trendValue === 0;\n\n    const Icon = isNeutral ? MinusIcon : isPositive ? TrendingUpIcon : TrendingDownIcon;\n\n    const trendClass = isNeutral\n        ? \"text-foreground bg-muted\"\n        : isPositive\n          ? \"text-green-500 border-green-500/20 bg-green-500/10\"\n          : \"text-destructive border-destructive/20 bg-destructive/10\";\n\n    const formattedTrend = isNeutral ? \"0%\" : `${isPositive ? \"+\" : \"\"}${trendValue}%`;\n\n    return (\n        <Card className=\"@container/card w-full max-sm:py-4\">\n            <CardHeader>\n                <CardDescription className=\"font-medium\">{title}</CardDescription>\n                <CardTitle className=\"text-2xl font-semibold @[600px]/card:text-4xl @[800px]/card:text-5xl\">\n                    {value}\n                </CardTitle>\n                <CardAction>\n                    <Badge variant=\"outline\" className={cn(\"gap-1 px-1.5 py-0.5\", trendClass)}>\n                        <Icon className=\"size-3\" />\n                        {formattedTrend}\n                    </Badge>\n                </CardAction>\n            </CardHeader>\n\n            <CardFooter className=\"flex-col items-start gap-1 text-sm max-sm:px-4\">\n                <div className=\"line-clamp-1 flex items-center gap-1.5 font-medium\">\n                    <span className={isNeutral ? \"\" : isPositive ? \"text-green-500\" : \"text-destructive\"}>\n                        {footerLabel}\n                    </span>\n                    <Icon\n                        className={cn(\n                            \"size-3.5\",\n                            isNeutral ? \"text-muted-foreground\" : isPositive ? \"text-green-500\" : \"text-destructive\",\n                        )}\n                    />\n                </div>\n                <div className=\"text-muted-foreground text-xs\">{footerSubtext}</div>\n            </CardFooter>\n        </Card>\n    );\n};\n"
    },
    {
      "path": "components/blocks/dashboard/table/table-3.tsx",
      "type": "registry:block",
      "content": "import {\n    Edit2Icon,\n    FileDownIcon,\n    ListFilterIcon,\n    MoreHorizontalIcon,\n    NotepadTextIcon,\n    WarehouseIcon,\n} from \"lucide-react\";\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport {\n    DropdownMenu,\n    DropdownMenuContent,\n    DropdownMenuGroup,\n    DropdownMenuItem,\n    DropdownMenuLabel,\n    DropdownMenuSeparator,\n    DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from \"@/components/ui/table\";\n\ninterface Product {\n    id: string;\n    name: string;\n    sku: string;\n    category: string;\n    image: string;\n    price: number;\n    sales: number;\n    revenue: number;\n    status: \"in-stock\" | \"low-stock\" | \"out-of-stock\";\n}\n\nconst products: Product[] = [\n    {\n        id: \"PROD-001\",\n        name: \"Wireless Noise-Canceling Headphones\",\n        sku: \"WLNCH\",\n        category: \"Electronics\",\n        image: \"https://picsum.photos/id/14/80/80\",\n        price: 299,\n        sales: 1240,\n        revenue: 370760,\n        status: \"in-stock\",\n    },\n    {\n        id: \"PROD-002\",\n        name: \"Ergonomic Office Chair\",\n        sku: \"ERGOC\",\n        category: \"Furniture\",\n        image: \"https://picsum.photos/id/431/80/80\",\n        price: 150.0,\n        sales: 850,\n        revenue: 127500,\n        status: \"low-stock\",\n    },\n    {\n        id: \"PROD-003\",\n        name: \"Mechanical Gaming Keyboard\",\n        sku: \"MECHGK\",\n        category: \"Electronics\",\n        image: \"https://picsum.photos/id/409/80/80\",\n        price: 89.99,\n        sales: 600,\n        revenue: 53994,\n        status: \"in-stock\",\n    },\n    {\n        id: \"PROD-004\",\n        name: \"Smartphone Stand\",\n        sku: \"SPST\",\n        category: \"Accessories\",\n        image: \"https://picsum.photos/id/265/80/80\",\n        price: 19.99,\n        sales: 450,\n        revenue: 8995,\n        status: \"out-of-stock\",\n    },\n    {\n        id: \"PROD-005\",\n        name: \"4K Monitor 27-inch\",\n        sku: \"Moni-4K\",\n        category: \"Electronics\",\n        image: \"https://picsum.photos/id/96/80/80\",\n        price: 399,\n        sales: 320,\n        revenue: 127680,\n        status: \"in-stock\",\n    },\n    {\n        id: \"PROD-006\",\n        name: \"Smart Home Security Camera\",\n        sku: \"SH-CAM-01\",\n        category: \"Smart Home\",\n        image: \"https://picsum.photos/id/91/80/80\",\n        price: 89.99,\n        sales: 1100,\n        revenue: 98989,\n        status: \"low-stock\",\n    },\n];\n\nconst formatCurrency = (value: number) =>\n    new Intl.NumberFormat(\"en-US\", {\n        style: \"currency\",\n        currency: \"USD\",\n        maximumFractionDigits: 0,\n    }).format(value);\n\nexport const Table3 = () => {\n    return (\n        <Card className=\"w-full pb-3\">\n            <CardHeader className=\"max-md:px-4\">\n                <CardTitle>Top Selling Products</CardTitle>\n                <CardDescription>Your highest performing products for this month.</CardDescription>\n                <CardAction>\n                    <div className=\"flex items-center gap-2\">\n                        <Button variant=\"outline\" size=\"icon-sm\" aria-label=\"Filter\" className=\"max-md:hidden\">\n                            <ListFilterIcon className=\"size-3.5\" />\n                        </Button>\n                        <DropdownMenu>\n                            <DropdownMenuTrigger\n                                render={\n                                    <Button size=\"icon-sm\" variant=\"outline\" aria-label=\"Menu\">\n                                        <MoreHorizontalIcon className=\"size-4\" />\n                                    </Button>\n                                }\n                            />\n                            <DropdownMenuContent align=\"end\" className=\"w-44\">\n                                <DropdownMenuGroup>\n                                    <DropdownMenuLabel>Actions</DropdownMenuLabel>\n                                    <DropdownMenuItem>\n                                        <NotepadTextIcon className=\"size-4\" />\n                                        View Report\n                                    </DropdownMenuItem>\n                                    <DropdownMenuItem>\n                                        <WarehouseIcon className=\"size-4\" />\n                                        Manage Inventory\n                                    </DropdownMenuItem>\n                                    <DropdownMenuSeparator />\n                                    <DropdownMenuItem>\n                                        <FileDownIcon className=\"size-4\" />\n                                        Export as CSV\n                                    </DropdownMenuItem>\n                                </DropdownMenuGroup>\n                            </DropdownMenuContent>\n                        </DropdownMenu>\n                    </div>\n                </CardAction>\n            </CardHeader>\n            <CardContent className=\"max-md:px-4\">\n                <Table>\n                    <TableHeader>\n                        <TableRow className=\"bg-muted/60\">\n                            <TableHead className=\"w-12\">Image</TableHead>\n                            <TableHead>Name</TableHead>\n                            <TableHead>Category</TableHead>\n                            <TableHead>Status</TableHead>\n                            <TableHead>Revenue</TableHead>\n                            <TableHead className=\"text-right\">Actions</TableHead>\n                        </TableRow>\n                    </TableHeader>\n                    <TableBody>\n                        {products.map((product) => (\n                            <TableRow key={product.id}>\n                                <TableCell>\n                                    <Avatar className=\"h-9 w-9\">\n                                        <AvatarImage src={product.image} alt={product.name} />\n                                        <AvatarFallback>{product.name.slice(0, 2)}</AvatarFallback>\n                                    </Avatar>\n                                </TableCell>\n\n                                <TableCell>\n                                    <div className=\"flex w-32 flex-col\">\n                                        <p className=\"truncate font-medium\">{product.name}</p>\n                                        <p className=\"text-muted-foreground text-xs\">{product.sku}</p>\n                                    </div>\n                                </TableCell>\n\n                                <TableCell>{product.category}</TableCell>\n\n                                <TableCell>\n                                    <Badge\n                                        variant={\n                                            product.status === \"out-of-stock\"\n                                                ? \"destructive\"\n                                                : product.status === \"low-stock\"\n                                                  ? \"default\"\n                                                  : \"secondary\"\n                                        }\n                                        className=\"whitespace-nowrap capitalize\">\n                                        {product.status.replaceAll(\"-\", \" \")}\n                                    </Badge>\n                                </TableCell>\n\n                                <TableCell>\n                                    <div className=\"flex flex-col\">\n                                        <p className=\"font-medium\">{formatCurrency(product.revenue)}</p>\n                                        <p className=\"text-muted-foreground text-xs\">\n                                            {product.sales.toLocaleString()} sold\n                                        </p>\n                                    </div>\n                                </TableCell>\n\n                                <TableCell className=\"text-right\">\n                                    <Button variant=\"ghost\" size=\"icon-sm\">\n                                        <Edit2Icon className=\"size-3.5\" />\n                                        <span className=\"sr-only\">Edit</span>\n                                    </Button>\n                                </TableCell>\n                            </TableRow>\n                        ))}\n                    </TableBody>\n                </Table>\n            </CardContent>\n        </Card>\n    );\n};\n"
    },
    {
      "path": "components/blocks/layout/promo/promo-1.tsx",
      "type": "registry:block",
      "content": "import { ArrowRightIcon, CheckCircle2Icon, LockIcon, ZapIcon } from \"lucide-react\";\n\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\n\nexport const Promo1 = () => {\n    return (\n        <Card className=\"relative w-full\">\n            <div className=\"bg-foreground/10 ring-foreground/5 absolute inset-s-2 top-2 flex size-9 items-center justify-center rounded-full ring-6 md:inset-s-4 md:top-4\">\n                <LockIcon className=\"size-4.5\" />\n            </div>\n            <CardHeader className=\"relative flex flex-col items-center gap-2 text-center\">\n                <Badge variant=\"secondary\">Pro Feature</Badge>\n                <CardTitle>Unlock Advanced Analytics</CardTitle>\n                <CardDescription className=\"mx-auto max-w-sm\">\n                    Gain deeper insights into customer behavior and retention trends.\n                </CardDescription>\n            </CardHeader>\n\n            <CardContent className=\"text-muted-foreground flex h-full flex-col items-center justify-center gap-1\">\n                <div className=\"flex items-center gap-2\">\n                    <CheckCircle2Icon className=\"h-4 w-4 text-green-500\" />\n                    <span>Unlimited historical data</span>\n                </div>\n                <div className=\"flex items-center gap-2\">\n                    <CheckCircle2Icon className=\"h-4 w-4 text-green-500\" />\n                    <span>Export reports to CSV/PDF</span>\n                </div>\n                <div className=\"flex items-center gap-2\">\n                    <CheckCircle2Icon className=\"h-4 w-4 text-green-500\" />\n                    <span>AI-powered forecasting</span>\n                </div>\n                <div className=\"mt-auto pt-3\">\n                    <Button className=\"gap-2\">\n                        <ZapIcon className=\"size-4\" />\n                        Upgrade to Pro\n                        <ArrowRightIcon className=\"size-4 opacity-75\" />\n                    </Button>\n                </div>\n            </CardContent>\n        </Card>\n    );\n};\n"
    },
    {
      "path": "components/templates/free-dashboard/layouts/footer.tsx",
      "type": "registry:block",
      "content": "export const Footer = () => {\n    return (\n        <div className=\"flex flex-wrap items-center justify-between gap-3\">\n            <p className=\"max-sm:text-center max-sm:text-sm\">\n                Built by{\" \"}\n                <a\n                    className=\"hover:text-primary font-medium hover:underline\"\n                    href=\"https://x.com/withden_\"\n                    target=\"_blank\">\n                    Denish\n                </a>{\" \"}\n                at{\" \"}\n                <a className=\"hover:text-primary font-medium hover:underline\" href=\"https://paceui.com\" target=\"_blank\">\n                    PaceUI\n                </a>\n            </p>\n            <div className=\"flex items-center gap-4 text-sm\">\n                <a href=\"#\" className=\"not-hover:text-muted-foreground\">\n                    About\n                </a>\n                <a href=\"#\" className=\"not-hover:text-muted-foreground\">\n                    Contact\n                </a>\n                <a href=\"#\" className=\"not-hover:text-muted-foreground\">\n                    Support\n                </a>\n            </div>\n        </div>\n    );\n};\n"
    },
    {
      "path": "components/templates/free-dashboard/layouts/index.tsx",
      "type": "registry:block",
      "content": "import type { CSSProperties, ReactNode } from \"react\";\n\nimport { Footer } from \"@/components/templates/free-dashboard/layouts/footer\";\nimport { DemoAdminSidebar } from \"@/components/templates/free-dashboard/layouts/sidebar\";\nimport { Topbar } from \"@/components/templates/free-dashboard/layouts/topbar\";\nimport { SidebarInset, SidebarProvider } from \"@/components/ui/sidebar\";\n\nexport const AdminLayout = ({ children }: { children: ReactNode }) => {\n    return (\n        <SidebarProvider\n            style={\n                {\n                    \"--sidebar-width\": \"250px\",\n                } as CSSProperties\n            }>\n            <DemoAdminSidebar />\n            <SidebarInset>\n                <Topbar />\n                <div className=\"flex flex-1 flex-col p-4 sm:p-5\">{children}</div>\n                <div className=\"mb-3 px-6\">\n                    <Footer />\n                </div>\n            </SidebarInset>\n        </SidebarProvider>\n    );\n};\n"
    },
    {
      "path": "components/templates/free-dashboard/layouts/sidebar.tsx",
      "type": "registry:block",
      "content": "import { Link } from \"@tanstack/react-router\";\n\nimport {\n    BadgeCheckIcon,\n    BellIcon,\n    ChevronsUpDownIcon,\n    CreditCardIcon,\n    LogOutIcon,\n    Settings2Icon,\n    UserIcon,\n} from \"lucide-react\";\n\nimport { demoAdminMenuItems } from \"@/components/templates/free-dashboard/layouts/items\";\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\";\nimport {\n    DropdownMenu,\n    DropdownMenuContent,\n    DropdownMenuGroup,\n    DropdownMenuItem,\n    DropdownMenuSeparator,\n    DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport {\n    Sidebar,\n    SidebarContent,\n    SidebarFooter,\n    SidebarHeader,\n    SidebarMenu,\n    SidebarMenuButton,\n    SidebarMenuItem,\n} from \"@/components/ui/sidebar\";\n\nimport { NavItem } from \"./nav-item\";\n\nexport const DemoAdminSidebar = () => {\n    return (\n        <Sidebar>\n            <SidebarHeader className=\"flex-row items-center gap-2.5 p-4\">\n                <Link to=\"/\" className=\"flex items-center gap-2.5\">\n                    <div className=\"bg-primary text-primary-foreground flex size-7.5 items-center justify-center rounded-md text-xl font-medium\">\n                        <Settings2Icon className=\"size-4.5\" />\n                    </div>\n                    <p className=\"text-xl font-semibold\">Admin</p>\n                </Link>\n            </SidebarHeader>\n            <SidebarContent>\n                <SidebarMenu className=\"mt-2 mb-2 gap-0.5 px-2\">\n                    {demoAdminMenuItems.map((item, index) => (\n                        <NavItem item={item} key={index} />\n                    ))}\n                </SidebarMenu>\n            </SidebarContent>\n            <SidebarFooter className=\"border-t p-1\">\n                <SidebarMenu>\n                    <SidebarMenuItem>\n                        <DropdownMenu>\n                            <DropdownMenuTrigger\n                                render={\n                                    <SidebarMenuButton\n                                        size=\"lg\"\n                                        className=\"data-open:bg-sidebar-accent data-open:text-sidebar-accent-foreground\">\n                                        <Avatar className=\"size-8\">\n                                            <AvatarImage\n                                                src=\"https://images.unsplash.com/photo-1599566150163-29194dcabd9c?w=80&h=80&fit=crop&crop=face\"\n                                                alt=\"John Doe\"\n                                            />\n                                            <AvatarFallback>JD</AvatarFallback>\n                                        </Avatar>\n                                        <div className=\"grid flex-1 text-left text-sm leading-tight\">\n                                            <span className=\"truncate font-semibold\">John Doe</span>\n                                            <span className=\"text-muted-foreground truncate text-xs\">\n                                                john@example.com\n                                            </span>\n                                        </div>\n                                        <ChevronsUpDownIcon className=\"ms-auto size-4\" />\n                                    </SidebarMenuButton>\n                                }\n                            />\n                            <DropdownMenuContent\n                                className=\"w-(--anchor-width) min-w-56 rounded-lg\"\n                                side=\"top\"\n                                align=\"start\"\n                                sideOffset={4}>\n                                <div className=\"flex items-center gap-2.5 p-2 text-left text-sm\">\n                                    <Avatar className=\"size-8\">\n                                        <AvatarImage\n                                            src=\"https://images.unsplash.com/photo-1599566150163-29194dcabd9c?w=80&h=80&fit=crop&crop=face\"\n                                            alt=\"John Doe\"\n                                        />\n                                        <AvatarFallback>JD</AvatarFallback>\n                                    </Avatar>\n                                    <div className=\"grid flex-1 text-left text-sm leading-tight\">\n                                        <span className=\"truncate font-semibold\">John Doe</span>\n                                        <span className=\"text-muted-foreground truncate text-xs\">john@example.com</span>\n                                    </div>\n                                </div>\n                                <DropdownMenuSeparator />\n                                <DropdownMenuGroup>\n                                    <DropdownMenuItem>\n                                        <UserIcon />\n                                        <span>Profile</span>\n                                    </DropdownMenuItem>\n                                    <DropdownMenuItem>\n                                        <BadgeCheckIcon />\n                                        <span>Account</span>\n                                    </DropdownMenuItem>\n                                    <DropdownMenuItem>\n                                        <CreditCardIcon />\n                                        <span>Billing</span>\n                                    </DropdownMenuItem>\n                                    <DropdownMenuItem>\n                                        <BellIcon />\n                                        <span>Notifications</span>\n                                    </DropdownMenuItem>\n                                </DropdownMenuGroup>\n                                <DropdownMenuSeparator />\n                                <DropdownMenuItem variant=\"destructive\">\n                                    <LogOutIcon />\n                                    <span>Sign Out</span>\n                                </DropdownMenuItem>\n                            </DropdownMenuContent>\n                        </DropdownMenu>\n                    </SidebarMenuItem>\n                </SidebarMenu>\n            </SidebarFooter>\n        </Sidebar>\n    );\n};\n"
    },
    {
      "path": "components/templates/free-dashboard/layouts/items.ts",
      "type": "registry:block",
      "content": "import {\n    BrainCircuitIcon,\n    CalendarIcon,\n    ChartAreaIcon,\n    CoinsIcon,\n    DatabaseIcon,\n    FileTextIcon,\n    GraduationCapIcon,\n    HospitalIcon,\n    LayoutGridIcon,\n    type LucideIcon,\n    MailIcon,\n    MessageSquareIcon,\n    Settings2Icon,\n    ShieldUserIcon,\n    ShoppingCartIcon,\n    SquareStackIcon,\n    TableIcon,\n    TrendingUpIcon,\n    UserCheckIcon,\n    UsersIcon,\n} from \"lucide-react\";\n\nexport type MenuItem = {\n    label: string;\n    isTitle?: boolean;\n    icon?: LucideIcon;\n    href?: string;\n    items?: MenuItem[];\n    external?: boolean;\n    tag?: \"coming-soon\" | \"new\" | \"trend\" | \"pro\";\n};\n\nexport const prefix = \"/preview/templates/free-dashboard\";\nexport const proPrefix = \"/preview/templates/ultimate-dashboard\";\n\nexport const demoAdminMenuItems: MenuItem[] = [\n    {\n        label: \"Dashboards\",\n        isTitle: true,\n    },\n    {\n        label: \"Sales\",\n        icon: TrendingUpIcon,\n        href: prefix,\n    },\n    {\n        label: \"Log\",\n        icon: FileTextIcon,\n        href: `${prefix}/dashboards/logs`,\n    },\n    {\n        label: \"Hospital\",\n        icon: HospitalIcon,\n        href: `${prefix}/dashboards/hospital`,\n        tag: \"new\",\n    },\n    {\n        label: \"Customer\",\n        icon: UserCheckIcon,\n        href: `${proPrefix}/dashboards/customers`,\n        tag: \"pro\",\n    },\n    {\n        label: \"Order\",\n        icon: ShoppingCartIcon,\n        href: `${proPrefix}/dashboards/orders`,\n        tag: \"pro\",\n    },\n    {\n        label: \"AI Tokens\",\n        icon: BrainCircuitIcon,\n        href: `${proPrefix}/dashboards/ai`,\n        tag: \"pro\",\n    },\n    {\n        label: \"Education\",\n        icon: GraduationCapIcon,\n        href: `${proPrefix}/dashboards/education`,\n        tag: \"pro\",\n    },\n    {\n        label: \"Crypto\",\n        icon: CoinsIcon,\n        href: `${proPrefix}/dashboards/crypto`,\n        tag: \"pro\",\n    },\n    {\n        label: \"Database\",\n        icon: DatabaseIcon,\n        href: `${proPrefix}/dashboards/database`,\n        tag: \"pro\",\n    },\n\n    {\n        label: \"Skeleton\",\n        icon: CalendarIcon,\n        href: `${proPrefix}/dashboards/skeleton`,\n        tag: \"pro\",\n    },\n    {\n        label: \"Apps\",\n        isTitle: true,\n    },\n    {\n        label: \"Email\",\n        icon: MailIcon,\n        href: `${proPrefix}/apps/email`,\n        tag: \"pro\",\n    },\n    {\n        label: \"Chat\",\n        icon: MessageSquareIcon,\n        href: `${proPrefix}/apps/chat`,\n        tag: \"pro\",\n    },\n    {\n        label: \"Calendar\",\n        icon: CalendarIcon,\n        href: `${proPrefix}/apps/calendar`,\n        tag: \"pro\",\n    },\n    {\n        label: \"Users\",\n        icon: UsersIcon,\n        tag: \"pro\",\n        items: [\n            { label: \"List\", href: `${proPrefix}/apps/users` },\n            { label: \"Create\", href: `${proPrefix}/apps/users/create` },\n        ],\n    },\n    {\n        label: \"Page\",\n        isTitle: true,\n    },\n    {\n        label: \"Settings\",\n        icon: Settings2Icon,\n        href: `${proPrefix}/settings`,\n        tag: \"pro\",\n        items: [\n            { label: \"My profile\", href: `${proPrefix}/settings/profile` },\n            { label: \"Plan\", href: `${proPrefix}/settings/plan` },\n            { label: \"Billing\", href: `${proPrefix}/settings/billing` },\n            { label: \"Notifications\", href: `${proPrefix}/settings/notifications` },\n            { label: \"Password\", href: `${proPrefix}/settings/password` },\n            {\n                label: \"Account security\",\n                href: `${proPrefix}/settings/account-security`,\n            },\n            { label: \"API\", href: `${proPrefix}/settings/api` },\n        ],\n    },\n    {\n        label: \"Authentication\",\n        icon: ShieldUserIcon,\n        tag: \"pro\",\n        items: [\n            {\n                label: \"Variant 1\",\n                items: [\n                    { label: \"Login\", href: `${proPrefix}/auth-1/login`, external: true },\n                    { label: \"Register\", href: `${proPrefix}/auth-1/register`, external: true },\n                    {\n                        label: \"Forgot Password\",\n                        href: `${proPrefix}/auth-1/forgot-password`,\n\n                        external: true,\n                    },\n                    { label: \"Reset Password\", href: `${proPrefix}/auth-1/reset-password`, external: true },\n                    { label: \"Verify Email\", href: `${proPrefix}/auth-1/verify-email`, external: true },\n                    { label: \"2 FA\", href: `${proPrefix}/auth-1/2-factor-authentication`, external: true },\n                ],\n            },\n            {\n                label: \"Variant 2\",\n                items: [\n                    { label: \"Login\", href: `${proPrefix}/auth-2/login`, external: true },\n                    { label: \"Register\", href: `${proPrefix}/auth-2/register`, external: true },\n                    {\n                        label: \"Forgot Password\",\n                        href: `${proPrefix}/auth-2/forgot-password`,\n\n                        external: true,\n                    },\n                    { label: \"Reset Password\", href: `${proPrefix}/auth-2/reset-password`, external: true },\n                    { label: \"Verify Email\", href: `${proPrefix}/auth-2/verify-email`, external: true },\n                    { label: \"2 FA\", href: `${proPrefix}/auth-2/2-factor-authentication`, external: true },\n                ],\n            },\n            {\n                label: \"Variant 3\",\n                items: [\n                    { label: \"Login\", href: `${proPrefix}/auth-3/login`, external: true },\n                    { label: \"Register\", href: `${proPrefix}/auth-3/register`, external: true },\n                    {\n                        label: \"Forgot Password\",\n                        href: `${proPrefix}/auth-3/forgot-password`,\n\n                        external: true,\n                    },\n                    { label: \"Reset Password\", href: `${proPrefix}/auth-3/reset-password`, external: true },\n                    { label: \"Verify Email\", href: `${proPrefix}/auth-3/verify-email`, external: true },\n                    { label: \"2 FA\", href: `${proPrefix}/auth-3/2-factor-authentication`, external: true },\n                ],\n            },\n        ],\n    },\n    {\n        label: \"Components\",\n        isTitle: true,\n    },\n    {\n        label: \"Charts\",\n        icon: ChartAreaIcon,\n        href: \"/components/charts/api-traffic\",\n        external: true,\n    },\n    {\n        label: \"Stats\",\n        icon: TrendingUpIcon,\n        href: \"/blocks/dashboard/stats\",\n        external: true,\n    },\n    {\n        label: \"Widgets\",\n        icon: LayoutGridIcon,\n        href: \"/blocks/dashboard/widgets\",\n        external: true,\n    },\n    {\n        label: \"Data Table\",\n        icon: TableIcon,\n        href: \"/blocks/dashboard/tables\",\n        external: true,\n    },\n    {\n        label: \"Other\",\n        isTitle: true,\n    },\n    {\n        label: \"Menu Levels\",\n        icon: SquareStackIcon,\n        items: [\n            {\n                label: \"Level 1a\",\n                items: [\n                    { label: \"Level 2a\", href: \"#\" },\n                    { label: \"Level 2b\", href: \"#\" },\n                ],\n            },\n            {\n                label: \"Level 1b\",\n                href: \"#\",\n            },\n        ],\n    },\n] as const;\n"
    },
    {
      "path": "components/templates/free-dashboard/layouts/nav-item.tsx",
      "type": "registry:block",
      "content": "import { Link, useLocation } from \"@tanstack/react-router\";\nimport { useEffect, useState } from \"react\";\n\nimport { ChevronRightIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from \"@/components/ui/collapsible\";\nimport { SidebarMenuButton, SidebarMenuItem, SidebarMenuSub } from \"@/components/ui/sidebar\";\n\nimport type { MenuItem } from \"./items\";\n\nconst Tag = ({ tag }: { tag?: MenuItem[\"tag\"] }) => {\n    if (tag == \"coming-soon\")\n        return (\n            <div\n                title=\"Coming Soon\"\n                className=\"bg-foreground/20 group-hover/sub-item:bg-foreground/30 size-1.5 rounded-full transition-all delay-100 duration-300 group-hover/sub-item:w-3\"\n            />\n        );\n    if (tag == \"new\")\n        return (\n            <div\n                title=\"New\"\n                className=\"bg-primary/60 group-hover/sub-item:bg-primary size-1.5 rounded-full transition-all delay-100 duration-300 group-hover/sub-item:w-3\"\n            />\n        );\n    if (tag == \"trend\")\n        return (\n            <div\n                title=\"Trending\"\n                className=\"size-1.5 rounded-full bg-red-500/60 transition-all delay-100 duration-300 group-hover/sub-item:w-3 group-hover/sub-item:bg-red-500\"\n            />\n        );\n    if (tag == \"pro\")\n        return (\n            <div title=\"Pro\" className=\"bg-secondary rounded-md px-1.5 py-px text-xs\">\n                Pro\n            </div>\n        );\n    return null;\n};\n\nconst TagItems = ({ tag }: { tag?: MenuItem[\"tag\"] }) => {\n    if (!tag) return null;\n    return (\n        <div className=\"inline-flex\">\n            <Tag tag={tag} />\n        </div>\n    );\n};\n\nexport const NavItem = ({ item }: { item: MenuItem }) => {\n    const [active, setActive] = useState(false);\n    const { href } = useLocation();\n\n    useEffect(() => {\n        setActive(\n            (item.href && href == item.href) ||\n                item.items?.find((subItem) => subItem.href && href == subItem.href) != null,\n        );\n    }, [href]);\n\n    if (item.isTitle)\n        return (\n            <SidebarMenuItem className=\"text-foreground/60 mb-1 px-2 text-xs font-semibold tracking-wide uppercase not-first:mt-4\">\n                {item.label}\n            </SidebarMenuItem>\n        );\n\n    if (!item.items) {\n        return (\n            <SidebarMenuItem className=\"group/sub-item px-0\">\n                <SidebarMenuButton\n                    isActive={active}\n                    className={cn(\"h-8 px-2.5 py-2\", {\n                        \"font-medium\": active,\n                        \"bg-transparent! opacity-80\": !item.href,\n                    })}\n                    render={\n                        <Link to={item.href} target={item.external ? \"_blank\" : undefined}>\n                            {item.icon && <item.icon />}\n                            <p className=\"grow\">{item.label}</p>\n                            <TagItems tag={item.tag} />\n                        </Link>\n                    }></SidebarMenuButton>\n            </SidebarMenuItem>\n        );\n    }\n\n    return (\n        <Collapsible\n            key={item.label}\n            open={active}\n            onOpenChange={setActive}\n            render={\n                <SidebarMenuItem className=\"px-0.5\">\n                    <CollapsibleTrigger\n                        render={\n                            <SidebarMenuButton\n                                tooltip={item.label}\n                                className={cn(\"group/sub-item\", { \"font-medium\": active })}>\n                                {item.icon && <item.icon />}\n                                <span>{item.label}</span>\n                                <div className=\"ms-auto flex items-center gap-2\">\n                                    <TagItems tag={item.tag} />\n                                    <ChevronRightIcon className=\"transition-transform duration-200 group-data-open/menu-item:rotate-90\" />\n                                </div>\n                            </SidebarMenuButton>\n                        }></CollapsibleTrigger>\n                    <CollapsibleContent>\n                        <SidebarMenuSub className=\"group/menu-sub me-0 gap-0.5 ps-2 pe-0\">\n                            {item.items?.map((subItem, index) => (\n                                <NavItem item={subItem} key={index} />\n                            ))}\n                        </SidebarMenuSub>\n                    </CollapsibleContent>\n                </SidebarMenuItem>\n            }\n            className=\"group/collapsible\"></Collapsible>\n    );\n};\n"
    },
    {
      "path": "components/templates/free-dashboard/layouts/topbar.tsx",
      "type": "registry:block",
      "content": "import { useLocation } from \"@tanstack/react-router\";\nimport { useEffect } from \"react\";\n\nimport { SearchIcon } from \"lucide-react\";\n\nimport { Notification1 } from \"@/components/blocks/layout/notification/notification-1\";\nimport { Profile1 } from \"@/components/blocks/layout/profile/profile-1\";\nimport { Widget1 } from \"@/components/blocks/layout/widget/widget-1\";\nimport { Widget2 } from \"@/components/blocks/layout/widget/widget-2\";\nimport { Button } from \"@/components/ui/button\";\nimport { SidebarTrigger, useSidebar } from \"@/components/ui/sidebar\";\n\nexport const Topbar = () => {\n    const { pathname } = useLocation();\n    const { setOpenMobile } = useSidebar();\n\n    useEffect(() => {\n        setOpenMobile(false);\n    }, [pathname]);\n\n    return (\n        <header className=\"bg-background/80 sticky top-0 z-50 flex min-h-14 items-center justify-between border-b backdrop-blur-sm\">\n            <div className=\"flex items-center gap-2 px-4\">\n                <SidebarTrigger />\n                <div>\n                    <Button variant=\"outline\" size=\"sm\" className=\"w-48 justify-between shadow-none max-md:hidden\">\n                        <span className=\"text-muted-foreground font-normal\">Search...</span>\n\n                        <div className=\"flex items-center gap-1\">\n                            <kbd className=\"bg-background flex h-5 items-center justify-center rounded-lg border px-1\">\n                                <span className=\"pt-px text-[0.625rem] leading-none\">Pro</span>\n                            </kbd>\n                        </div>\n                    </Button>\n                    <Button variant=\"ghost\" size=\"icon-sm\" className=\"md:hidden\" aria-label=\"Search\">\n                        <SearchIcon className=\"size-4.5\" />\n                    </Button>\n                </div>\n            </div>\n            <div className=\"flex items-center gap-1.5 px-4\">\n                <Widget1 />\n                <Widget2 />\n                <Notification1 />\n                <div className=\"bg-border ms-3 h-6.5 w-px max-sm:hidden\" />\n                <div className=\"flex items-center gap-1\">\n                    <Profile1 />\n                </div>\n            </div>\n        </header>\n    );\n};\n"
    },
    {
      "path": "components/blocks/layout/notification/notification-1.tsx",
      "type": "registry:block",
      "content": "import { useState } from \"react\";\n\nimport { BellIcon, XIcon } from \"lucide-react\";\n\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/ui/popover\";\n\nexport const Notification1 = () => {\n    const [open, setOpen] = useState(false);\n    return (\n        <Popover open={open} onOpenChange={setOpen}>\n            <PopoverTrigger\n                render={\n                    <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Notifications\" className=\"relative\">\n                        <BellIcon className=\"size-4.5\" />\n                        <Badge\n                            variant=\"destructive\"\n                            className=\"absolute -inset-e-1 -top-1 flex size-4.5 items-center justify-center rounded-full p-0 text-[0.625rem]\">\n                            3\n                        </Badge>\n                    </Button>\n                }></PopoverTrigger>\n            <PopoverContent className=\"w-80 gap-0 space-y-0 p-0 shadow-none\" align=\"end\">\n                <div className=\"flex items-center justify-between border-b px-4 py-1.5\">\n                    <h4 className=\"text-base font-medium\">Notifications</h4>\n                    <Button variant=\"ghost\" size=\"icon-sm\">\n                        <XIcon />\n                    </Button>\n                </div>\n                <div>\n                    <div className=\"space-y-1 p-2\">\n                        <div className=\"hover:bg-muted cursor-pointer rounded-md px-3 py-1.5 transition-colors\">\n                            <p className=\"text-sm font-medium\">New message received</p>\n                            <p className=\"text-muted-foreground text-xs\">2 minutes ago</p>\n                        </div>\n                        <div className=\"hover:bg-muted cursor-pointer rounded-md px-3 py-1.5 transition-colors\">\n                            <p className=\"text-sm font-medium\">Your report is ready</p>\n                            <p className=\"text-muted-foreground text-xs\">1 hour ago</p>\n                        </div>\n                        <div className=\"hover:bg-muted cursor-pointer rounded-md px-3 py-1.5 transition-colors\">\n                            <p className=\"text-sm font-medium\">System update completed</p>\n                            <p className=\"text-muted-foreground text-xs\">3 hours ago</p>\n                        </div>\n                    </div>\n                </div>\n                <div className=\"border-t p-0.5\">\n                    <Button variant=\"ghost\" className=\"w-full\">\n                        View all notifications\n                    </Button>\n                </div>\n            </PopoverContent>\n        </Popover>\n    );\n};\n"
    },
    {
      "path": "components/blocks/layout/profile/profile-1.tsx",
      "type": "registry:block",
      "content": "import { BadgeCheckIcon, BellIcon, CreditCardIcon, LogOutIcon, UserIcon } from \"lucide-react\";\n\nimport { Avatar, AvatarFallback } from \"@/components/ui/avatar\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n    DropdownMenu,\n    DropdownMenuContent,\n    DropdownMenuGroup,\n    DropdownMenuItem,\n    DropdownMenuSeparator,\n    DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\n\nexport const Profile1 = () => {\n    return (\n        <DropdownMenu>\n            <DropdownMenuTrigger\n                render={\n                    <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Profile\">\n                        <Avatar size=\"sm\">\n                            <AvatarFallback>\n                                <UserIcon />\n                            </AvatarFallback>\n                        </Avatar>\n                    </Button>\n                }></DropdownMenuTrigger>\n            <DropdownMenuContent align=\"end\" className=\"w-56 shadow-none\">\n                <div className=\"flex items-center gap-3 px-2.5 py-2\">\n                    <Avatar>\n                        <AvatarFallback>\n                            <UserIcon />\n                        </AvatarFallback>\n                    </Avatar>\n                    <div className=\"flex flex-col\">\n                        <p className=\"text-sm font-medium\">John Doe</p>\n                        <p className=\"text-muted-foreground text-xs\">john.doe@example.com</p>\n                    </div>\n                </div>\n                <DropdownMenuSeparator />\n                <DropdownMenuGroup>\n                    <DropdownMenuItem>\n                        <BadgeCheckIcon />\n                        Account\n                    </DropdownMenuItem>\n                    <DropdownMenuItem>\n                        <CreditCardIcon />\n                        Billing\n                    </DropdownMenuItem>\n                    <DropdownMenuItem>\n                        <BellIcon />\n                        Notifications\n                    </DropdownMenuItem>\n                </DropdownMenuGroup>\n                <DropdownMenuSeparator />\n                <DropdownMenuItem>\n                    <LogOutIcon />\n                    Sign Out\n                </DropdownMenuItem>\n            </DropdownMenuContent>\n        </DropdownMenu>\n    );\n};\n"
    },
    {
      "path": "components/blocks/layout/widget/widget-1.tsx",
      "type": "registry:block",
      "content": "import { useState } from \"react\";\n\nimport { Check, Copy, Gift, Share, Users, Zap } from \"lucide-react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { Card } from \"@/components/ui/card\";\nimport {\n    Dialog,\n    DialogContent,\n    DialogDescription,\n    DialogHeader,\n    DialogTitle,\n    DialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { Input } from \"@/components/ui/input\";\n\nexport const Widget1 = () => {\n    const [isReferDialogOpen, setIsReferDialogOpen] = useState(false);\n\n    return (\n        <Dialog open={isReferDialogOpen} onOpenChange={setIsReferDialogOpen}>\n            <DialogTrigger\n                render={\n                    <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Refer a Friend\">\n                        <Gift className=\"size-4.5\" />\n                    </Button>\n                }\n            />\n            <DialogContent className=\"max-w-[calc(100%-2.5rem)] max-h-[calc(100dvh-3rem)] overflow-y-auto gap-4 p-4 sm:max-w-md sm:gap-5 sm:p-6\">\n                <DialogHeader className=\"flex flex-col items-center gap-2 text-center sm:gap-2.5\">\n                    <div className=\"bg-muted flex size-11 items-center justify-center rounded-full\">\n                        <Gift className=\"text-primary size-5.5\" />\n                    </div>\n                    <div className=\"flex flex-col gap-1\">\n                        <DialogTitle className=\"text-lg font-medium sm:text-xl\">Refer a Friend & Get Rewarded</DialogTitle>\n                        <DialogDescription className=\"text-xs sm:text-sm\">\n                            Share the love and both of you will receive 2 months of free premium access\n                        </DialogDescription>\n                    </div>\n                </DialogHeader>\n\n                <div className=\"flex flex-col gap-4 sm:gap-4.5\">\n                    <div className=\"flex flex-col gap-2.5\">\n                        <h4 className=\"text-xs font-medium uppercase tracking-wider text-muted-foreground\">Why refer?</h4>\n                        <div className=\"flex flex-col gap-2\">\n                            <div className=\"flex items-start gap-2.5\">\n                                <div className=\"bg-muted mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-md\">\n                                    <Zap className=\"text-primary size-3.5\" />\n                                </div>\n                                <div>\n                                    <p className=\"text-sm font-medium leading-none\">2 Months Free Premium</p>\n                                    <p className=\"text-muted-foreground mt-1 text-xs\">\n                                        Get instant access to all premium features\n                                    </p>\n                                </div>\n                            </div>\n                            <div className=\"flex items-start gap-2.5\">\n                                <div className=\"bg-muted mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-md\">\n                                    <Users className=\"text-primary size-3.5\" />\n                                </div>\n                                <div>\n                                    <p className=\"text-sm font-medium leading-none\">Help Your Friends</p>\n                                    <p className=\"text-muted-foreground mt-1 text-xs\">\n                                        They get 2 months free too when they sign up\n                                    </p>\n                                </div>\n                            </div>\n                            <div className=\"flex items-start gap-2.5\">\n                                <div className=\"bg-muted mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-md\">\n                                    <Check className=\"text-primary size-3.5\" />\n                                </div>\n                                <div>\n                                    <p className=\"text-sm font-medium leading-none\">Unlimited Referrals</p>\n                                    <p className=\"text-muted-foreground mt-1 text-xs\">\n                                        No limit on how many friends you can refer\n                                    </p>\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n\n                    <div className=\"flex flex-col gap-2\">\n                        <h4 className=\"text-xs font-medium uppercase tracking-wider text-muted-foreground\">How it works</h4>\n                        <div className=\"flex flex-col gap-1.5\">\n                            <div className=\"flex items-center gap-2.5\">\n                                <div className=\"bg-muted flex size-5 shrink-0 items-center justify-center rounded-full text-xs font-medium\">\n                                    1\n                                </div>\n                                <p className=\"text-xs sm:text-sm\">Copy your unique referral link below</p>\n                            </div>\n                            <div className=\"flex items-center gap-2.5\">\n                                <div className=\"bg-muted flex size-5 shrink-0 items-center justify-center rounded-full text-xs font-medium\">\n                                    2\n                                </div>\n                                <p className=\"text-xs sm:text-sm\">Share it with friends via email or social media</p>\n                            </div>\n                            <div className=\"flex items-center gap-2.5\">\n                                <div className=\"bg-muted flex size-5 shrink-0 items-center justify-center rounded-full text-xs font-medium\">\n                                    3\n                                </div>\n                                <p className=\"text-xs sm:text-sm\">Both get 2 months free when they sign up!</p>\n                            </div>\n                        </div>\n                    </div>\n\n                    <Card className=\"bg-muted/50 flex flex-col gap-1.5 p-3\">\n                        <label className=\"text-xs font-medium\">Your Referral Link</label>\n                        <div className=\"flex gap-2\">\n                            <Input\n                                readOnly\n                                value=\"https://app.example.com/ref/ABC123XYZ\"\n                                className=\"bg-background h-8 text-xs shadow-none\"\n                            />\n                            <Button variant=\"outline\" size=\"icon-sm\" className=\"shrink-0 shadow-none\" aria-label=\"Copy referral link\">\n                                <Copy className=\"size-3.5\" />\n                            </Button>\n                        </div>\n                    </Card>\n\n                    <div className=\"flex gap-2\">\n                        <Button size=\"sm\" className=\"flex-1 gap-1.5 shadow-none\" onClick={() => setIsReferDialogOpen(false)}>\n                            <Share className=\"size-3.5\" />\n                            Share Link\n                        </Button>\n                        <Button variant=\"outline\" size=\"sm\" className=\"flex-1 shadow-none\" onClick={() => setIsReferDialogOpen(false)}>\n                            Close\n                        </Button>\n                    </div>\n                </div>\n            </DialogContent>\n        </Dialog>\n    );\n};\n"
    },
    {
      "path": "components/blocks/layout/widget/widget-2.tsx",
      "type": "registry:block",
      "content": "import { useState } from \"react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport {\n    DropdownMenu,\n    DropdownMenuContent,\n    DropdownMenuItem,\n    DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\n\nconst countries = [\n    { code: \"US\", name: \"United States\", flag: \"https://flagcdn.com/w40/us.png\" },\n    { code: \"GB\", name: \"United Kingdom\", flag: \"https://flagcdn.com/w40/gb.png\" },\n    { code: \"DE\", name: \"Germany\", flag: \"https://flagcdn.com/w40/de.png\" },\n    { code: \"FR\", name: \"France\", flag: \"https://flagcdn.com/w40/fr.png\" },\n    { code: \"ES\", name: \"Spain\", flag: \"https://flagcdn.com/w40/es.png\" },\n    { code: \"IT\", name: \"Italy\", flag: \"https://flagcdn.com/w40/it.png\" },\n    { code: \"CA\", name: \"Canada\", flag: \"https://flagcdn.com/w40/ca.png\" },\n    { code: \"AU\", name: \"Australia\", flag: \"https://flagcdn.com/w40/au.png\" },\n];\n\nexport const Widget2 = () => {\n    const [selectedCountry, setSelectedCountry] = useState(\"US\");\n\n    return (\n        <DropdownMenu>\n            <DropdownMenuTrigger\n                render={\n                    <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Select country\">\n                        <img\n                            src={countries.find((c) => c.code === selectedCountry)?.flag}\n                            alt={countries.find((c) => c.code === selectedCountry)?.name ?? \"Country flag\"}\n                            className=\"h-3.5 w-5 object-cover\"\n                        />\n                    </Button>\n                }></DropdownMenuTrigger>\n            <DropdownMenuContent align=\"end\" className=\"w-48 shadow-none\">\n                {countries.map((country) => (\n                    <DropdownMenuItem\n                        key={country.code}\n                        onClick={() => setSelectedCountry(country.code)}\n                        className=\"cursor-pointer\">\n                        <img src={country.flag} alt={country.name} className=\"me-2 h-4 w-6 object-cover\" />\n                        <span>{country.name}</span>\n                    </DropdownMenuItem>\n                ))}\n            </DropdownMenuContent>\n        </DropdownMenu>\n    );\n};\n"
    },
    {
      "path": "components/templates/free-dashboard/dashboards/hospital/index.tsx",
      "type": "registry:block",
      "content": "import { FlaskConicalIcon, ReceiptTextIcon, StethoscopeIcon, UsersIcon } from \"lucide-react\";\n\nimport { PageTitle } from \"../../layouts/page-title\";\nimport { AppointmentsTable } from \"./components/appointments-table\";\nimport { IncomeChart } from \"./components/income-chart\";\nimport { PatientInsightsChart } from \"./components/patient-insights-chart\";\nimport { PatientSummaryChart } from \"./components/patient-summary-chart\";\nimport { StatCard, type StatCardProps } from \"./components/stat-card\";\n\nconst hospitalStats: StatCardProps[] = [\n    {\n        title: \"Total Invoices\",\n        value: \"1,287\",\n        trendValue: \"+2.14%\",\n        direction: \"up\",\n        icon: ReceiptTextIcon,\n    },\n    {\n        title: \"Total Patients\",\n        value: \"965\",\n        trendValue: \"+3.78%\",\n        direction: \"up\",\n        icon: UsersIcon,\n    },\n    {\n        title: \"Lab Reports\",\n        value: \"128\",\n        trendValue: \"-1.56%\",\n        direction: \"down\",\n        icon: FlaskConicalIcon,\n    },\n    {\n        title: \"Surgeries\",\n        value: \"315\",\n        trendValue: \"+1.64%\",\n        direction: \"up\",\n        icon: StethoscopeIcon,\n    },\n];\n\nexport const HospitalDashboard = () => {\n    return (\n        <div className=\"space-y-4 sm:space-y-5\">\n            <PageTitle title=\"Hospital Analytics\" />\n\n            <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-5 xl:grid-cols-4\">\n                {hospitalStats.map((stat, index) => (\n                    <StatCard key={index} {...stat} />\n                ))}\n            </div>\n\n            <div className=\"grid grid-cols-1 gap-4 sm:gap-5 xl:grid-cols-12\">\n                <div className=\"xl:col-span-7\">\n                    <PatientSummaryChart />\n                </div>\n                <div className=\"xl:col-span-5\">\n                    <IncomeChart />\n                </div>\n            </div>\n\n            <div className=\"grid grid-cols-1 gap-4 sm:gap-5 xl:grid-cols-12\">\n                <div className=\"xl:col-span-8\">\n                    <AppointmentsTable />\n                </div>\n                <div className=\"xl:col-span-4\">\n                    <PatientInsightsChart />\n                </div>\n            </div>\n        </div>\n    );\n};\n\nexport default HospitalDashboard;\n"
    },
    {
      "path": "components/templates/free-dashboard/dashboards/hospital/components/appointments-table.tsx",
      "type": "registry:block",
      "content": "import { CalendarDaysIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from \"@/components/ui/table\";\n\nexport type AppointmentStatus = \"in-consultation\" | \"in-progress\" | \"needs-followup\" | \"scheduled\" | \"waiting\";\n\nexport type AppointmentItem = {\n    id: string;\n    patientNo: string;\n    treatment: string;\n    time: string;\n    status: AppointmentStatus;\n    statusLabel: string;\n    assignee: {\n        name: string;\n        avatar?: string;\n        initials: string;\n    }[];\n    location: string;\n};\n\nexport type TimeGroup = {\n    hour: string;\n    items: AppointmentItem[];\n};\n\nconst appointmentsData: TimeGroup[] = [\n    {\n        hour: \"10 AM\",\n        items: [\n            {\n                id: \"apt-1\",\n                patientNo: \"#21\",\n                treatment: \"Cardiology Consultation\",\n                time: \"10:00 AM\",\n                status: \"in-consultation\",\n                statusLabel: \"In Consultation\",\n                assignee: [\n                    {\n                        name: \"Dr. Alina Patel\",\n                        avatar: \"https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=100&auto=format&fit=crop&q=60\",\n                        initials: \"AP\",\n                    },\n                ],\n                location: \"Cardio Ward 302\",\n            },\n            {\n                id: \"apt-2\",\n                patientNo: \"#20\",\n                treatment: \"MRI Brain Scanning\",\n                time: \"10:30 AM\",\n                status: \"in-progress\",\n                statusLabel: \"In Progress\",\n                assignee: [\n                    {\n                        name: \"Dr. Michael Smith\",\n                        avatar: \"https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=100&auto=format&fit=crop&q=60\",\n                        initials: \"MS\",\n                    },\n                    {\n                        name: \"Dr. Sarah Connor\",\n                        avatar: \"https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100&auto=format&fit=crop&q=60\",\n                        initials: \"SC\",\n                    },\n                    {\n                        name: \"Dr. Alex Ray\",\n                        avatar: \"https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=100&auto=format&fit=crop&q=60\",\n                        initials: \"AR\",\n                    },\n                ],\n                location: \"Radiology Unit B\",\n            },\n        ],\n    },\n    {\n        hour: \"11 AM\",\n        items: [\n            {\n                id: \"apt-3\",\n                patientNo: \"#19\",\n                treatment: \"Orthopedic Follow-Up\",\n                time: \"11:00 AM\",\n                status: \"needs-followup\",\n                statusLabel: \"Needs Follow Up\",\n                assignee: [\n                    {\n                        name: \"Dr. Oliver Jackson\",\n                        avatar: \"https://images.unsplash.com/photo-1539571696357-5a69c17a67c6?w=100&auto=format&fit=crop&q=60\",\n                        initials: \"OJ\",\n                    },\n                ],\n                location: \"Ortho Clinic 105\",\n            },\n            {\n                id: \"apt-4\",\n                patientNo: \"#18\",\n                treatment: \"Appendectomy Surgery\",\n                time: \"11:15 AM\",\n                status: \"scheduled\",\n                statusLabel: \"Scheduled\",\n                assignee: [\n                    {\n                        name: \"Dr. Benjamin Garcia\",\n                        avatar: \"https://images.unsplash.com/photo-1522075469751-3a6694fb2f61?w=100&auto=format&fit=crop&q=60\",\n                        initials: \"BG\",\n                    },\n                ],\n                location: \"Operation Theater 3\",\n            },\n            {\n                id: \"apt-5\",\n                patientNo: \"#17\",\n                treatment: \"Pediatric Health Check\",\n                time: \"11:45 AM\",\n                status: \"waiting\",\n                statusLabel: \"Waiting\",\n                assignee: [\n                    {\n                        name: \"Dr. Michael Smith\",\n                        avatar: \"https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=100&auto=format&fit=crop&q=60\",\n                        initials: \"MS\",\n                    },\n                ],\n                location: \"Pediatrics OPD\",\n            },\n        ],\n    },\n    {\n        hour: \"12 PM\",\n        items: [\n            {\n                id: \"apt-6\",\n                patientNo: \"#32\",\n                treatment: \"Post-Op Wound Care\",\n                time: \"12:00 PM\",\n                status: \"in-consultation\",\n                statusLabel: \"In Consultation\",\n                assignee: [\n                    {\n                        name: \"Dr. Alina Patel\",\n                        avatar: \"https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=100&auto=format&fit=crop&q=60\",\n                        initials: \"AP\",\n                    },\n                ],\n                location: \"Recovery Room 4\",\n            },\n            {\n                id: \"apt-7\",\n                patientNo: \"#24\",\n                treatment: \"Echocardiogram Screening\",\n                time: \"12:30 PM\",\n                status: \"in-progress\",\n                statusLabel: \"In Progress\",\n                assignee: [\n                    {\n                        name: \"Dr. Oliver Jackson\",\n                        avatar: \"https://images.unsplash.com/photo-1539571696357-5a69c17a67c6?w=100&auto=format&fit=crop&q=60\",\n                        initials: \"OJ\",\n                    },\n                    {\n                        name: \"Dr. Benjamin Garcia\",\n                        avatar: \"https://images.unsplash.com/photo-1522075469751-3a6694fb2f61?w=100&auto=format&fit=crop&q=60\",\n                        initials: \"BG\",\n                    },\n                ],\n                location: \"Cardio Lab 2\",\n            },\n        ],\n    },\n    {\n        hour: \"01 PM\",\n        items: [\n            {\n                id: \"apt-8\",\n                patientNo: \"#22\",\n                treatment: \"Neurology Evaluation\",\n                time: \"01:00 PM\",\n                status: \"in-consultation\",\n                statusLabel: \"In Consultation\",\n                assignee: [\n                    {\n                        name: \"Dr. Alina Patel\",\n                        avatar: \"https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=100&auto=format&fit=crop&q=60\",\n                        initials: \"AP\",\n                    },\n                ],\n                location: \"Neuro Clinic 204\",\n            },\n        ],\n    },\n];\n\nconst getStatusBadge = (status: AppointmentStatus, label: string) => {\n    const config = {\n        \"in-consultation\": { color: \"text-amber-500\", dot: \"bg-amber-500\" },\n        \"in-progress\": { color: \"text-purple-500\", dot: \"bg-purple-500\" },\n        \"needs-followup\": { color: \"text-blue-500\", dot: \"bg-blue-500\" },\n        scheduled: {\n            color: \"text-yellow-600 dark:text-yellow-400\",\n            dot: \"bg-yellow-500\",\n        },\n        waiting: { color: \"text-rose-500\", dot: \"bg-rose-500\" },\n    }[status];\n\n    return (\n        <div className=\"flex items-center gap-1.5 text-xs font-medium\">\n            <span className={cn(\"size-2 rounded-full\", config.dot)} />\n            <span className={config.color}>{label}</span>\n        </div>\n    );\n};\n\nexport const AppointmentsTable = () => {\n    return (\n        <Card className=\"pb-0\">\n            <CardHeader>\n                <div className=\"flex items-center gap-3\">\n                    <div className=\"rounded-md border p-2\">\n                        <CalendarDaysIcon className=\"size-4.5\" />\n                    </div>\n                    <div className=\"flex flex-col gap-0.5\">\n                        <CardTitle>Today&apos;s Appointments</CardTitle>\n                        <CardDescription className=\"text-xs leading-none\">\n                            Scheduled visits and consultations\n                        </CardDescription>\n                    </div>\n                </div>\n                <CardAction>\n                    <Button variant=\"outline\" size=\"sm\" className=\"gap-1.5\">\n                        <CalendarDaysIcon className=\"text-muted-foreground size-3.5\" />\n                        Today\n                    </Button>\n                </CardAction>\n            </CardHeader>\n\n            <CardContent className=\"px-0\">\n                <Table>\n                    <TableHeader>\n                        <TableRow className=\"border-border/60 bg-muted/40 hover:bg-muted/40\">\n                            <TableHead className=\"text-muted-foreground w-24 px-4 text-xs font-medium\">\n                                Time Block\n                            </TableHead>\n                            <TableHead className=\"text-muted-foreground text-xs font-medium\">Treatment</TableHead>\n                            <TableHead className=\"text-muted-foreground text-xs font-medium\">Time</TableHead>\n                            <TableHead className=\"text-muted-foreground text-xs font-medium\">Status</TableHead>\n                            <TableHead className=\"text-muted-foreground text-xs font-medium\">Assigned Doctor</TableHead>\n                            <TableHead className=\"text-muted-foreground text-xs font-medium\">Location</TableHead>\n                            <TableHead className=\"text-muted-foreground pr-4 text-right text-xs font-medium\">\n                                Patient ID\n                            </TableHead>\n                        </TableRow>\n                    </TableHeader>\n                    <TableBody>\n                        {appointmentsData.map((group) =>\n                            group.items.map((item, idx) => (\n                                <TableRow key={item.id} className=\"hover:bg-muted/30\">\n                                    {idx === 0 ? (\n                                        <TableCell\n                                            rowSpan={group.items.length}\n                                            className=\"border-border/50 border-r px-4 align-top text-sm font-medium\">\n                                            <div className=\"sticky top-2 pt-1\">{group.hour}</div>\n                                        </TableCell>\n                                    ) : null}\n\n                                    <TableCell className=\"text-xs font-medium\">{item.treatment}</TableCell>\n\n                                    <TableCell className=\"text-muted-foreground font-mono text-xs\">\n                                        {item.time}\n                                    </TableCell>\n\n                                    <TableCell>{getStatusBadge(item.status, item.statusLabel)}</TableCell>\n\n                                    <TableCell>\n                                        <div className=\"flex items-center gap-2\">\n                                            {item.assignee.length === 1 ? (\n                                                <>\n                                                    <Avatar className=\"size-6\">\n                                                        {item.assignee[0].avatar && (\n                                                            <AvatarImage\n                                                                src={item.assignee[0].avatar}\n                                                                alt={item.assignee[0].name}\n                                                            />\n                                                        )}\n                                                        <AvatarFallback className=\"text-[10px]\">\n                                                            {item.assignee[0].initials}\n                                                        </AvatarFallback>\n                                                    </Avatar>\n                                                    <span className=\"text-xs font-medium\">{item.assignee[0].name}</span>\n                                                </>\n                                            ) : (\n                                                <div className=\"flex items-center -space-x-1.5 overflow-visible\">\n                                                    {item.assignee.slice(0, 2).map((doctor, dIdx) => (\n                                                        <Avatar\n                                                            key={dIdx}\n                                                            className=\"border-background ring-border/50 size-6 border ring-1\">\n                                                            {doctor.avatar && (\n                                                                <AvatarImage src={doctor.avatar} alt={doctor.name} />\n                                                            )}\n                                                            <AvatarFallback className=\"text-[10px]\">\n                                                                {doctor.initials}\n                                                            </AvatarFallback>\n                                                        </Avatar>\n                                                    ))}\n                                                    {item.assignee.length > 2 && (\n                                                        <div className=\"border-background bg-muted text-muted-foreground flex size-6 items-center justify-center rounded-full border text-[10px] font-medium\">\n                                                            +{item.assignee.length - 2}\n                                                        </div>\n                                                    )}\n                                                </div>\n                                            )}\n                                        </div>\n                                    </TableCell>\n\n                                    <TableCell className=\"text-muted-foreground text-xs\">{item.location}</TableCell>\n\n                                    <TableCell className=\"pr-4 text-right\">\n                                        <span className=\"cursor-pointer font-mono text-xs font-medium hover:underline\">\n                                            {item.patientNo}\n                                        </span>\n                                    </TableCell>\n                                </TableRow>\n                            )),\n                        )}\n                    </TableBody>\n                </Table>\n            </CardContent>\n        </Card>\n    );\n};\n"
    },
    {
      "path": "components/templates/free-dashboard/dashboards/hospital/components/income-chart.tsx",
      "type": "registry:block",
      "content": "import { useEffect, useState } from \"react\";\n\nimport { DollarSignIcon } from \"lucide-react\";\nimport { Area, AreaChart, CartesianGrid, XAxis, YAxis } from \"recharts\";\n\nimport { useIsMobile } from \"@/hooks/use-mobile\";\nimport { cn } from \"@/lib/utils\";\n\nimport { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { type ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent } from \"@/components/ui/chart\";\n\nexport type IncomeData = {\n    date: string;\n    earnings: number;\n    cost: number;\n};\n\nconst rawIncomeData: IncomeData[] = Array.from({ length: 90 }, (_, i) => {\n    const d = new Date();\n    d.setDate(d.getDate() - (89 - i));\n    return {\n        date: d.toISOString().slice(0, 10),\n        earnings: Math.floor(Math.random() * 600) + 900,\n        cost: Math.floor(Math.random() * 400) + 350,\n    };\n});\n\nconst chartConfig: ChartConfig = {\n    earnings: {\n        label: \"Earnings\",\n        color: \"var(--chart-1)\",\n    },\n    cost: {\n        label: \"Cost\",\n        color: \"var(--chart-2)\",\n    },\n};\n\nexport const IncomeChart = () => {\n    const isMobile = useIsMobile();\n    const [period, setPeriod] = useState<\"week\" | \"month\" | \"year\">(\"week\");\n\n    useEffect(() => {\n        if (isMobile) {\n            setPeriod(\"week\");\n        }\n    }, [isMobile]);\n\n    const filteredData = rawIncomeData.slice(period === \"week\" ? -7 : period === \"month\" ? -30 : -90);\n\n    return (\n        <Card>\n            <CardHeader>\n                <div className=\"flex items-center gap-3\">\n                    <div className=\"rounded-md border p-2\">\n                        <DollarSignIcon className=\"size-4.5\" />\n                    </div>\n                    <div className=\"flex flex-col gap-0.5\">\n                        <CardTitle>Hospital Income</CardTitle>\n                        <CardDescription className=\"text-xs leading-none\">Earnings vs Operating Cost</CardDescription>\n                    </div>\n                </div>\n                <CardAction>\n                    <div className=\"bg-muted/40 inline-flex rounded-md border p-0.5 text-xs\">\n                        {([\"week\", \"month\", \"year\"] as const).map((t) => (\n                            <button\n                                key={t}\n                                type=\"button\"\n                                onClick={() => setPeriod(t)}\n                                className={cn(\n                                    \"rounded-md px-2.5 py-1 font-medium capitalize transition-colors\",\n                                    period === t\n                                        ? \"bg-background text-foreground shadow-xs\"\n                                        : \"text-muted-foreground hover:text-foreground\",\n                                )}>\n                                {t}\n                            </button>\n                        ))}\n                    </div>\n                </CardAction>\n            </CardHeader>\n\n            <CardContent className=\"flex-1 px-3 pt-2 sm:px-4\">\n                <ChartContainer config={chartConfig} className=\"aspect-auto h-68\">\n                    <AreaChart data={filteredData} margin={{ top: 10, right: 10, left: -20, bottom: 0 }}>\n                        <defs>\n                            <linearGradient id=\"fillEarnings\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n                                <stop offset=\"5%\" stopColor=\"var(--color-earnings)\" stopOpacity={0.4} />\n                                <stop offset=\"95%\" stopColor=\"var(--color-earnings)\" stopOpacity={0.05} />\n                            </linearGradient>\n                            <linearGradient id=\"fillCost\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n                                <stop offset=\"5%\" stopColor=\"var(--color-cost)\" stopOpacity={0.4} />\n                                <stop offset=\"95%\" stopColor=\"var(--color-cost)\" stopOpacity={0.05} />\n                            </linearGradient>\n                        </defs>\n                        <CartesianGrid vertical={false} strokeDasharray=\"3 3\" />\n                        <XAxis\n                            dataKey=\"date\"\n                            tickLine={false}\n                            axisLine={false}\n                            tickMargin={8}\n                            minTickGap={16}\n                            tickFormatter={(value) =>\n                                new Date(value).toLocaleDateString(\"en-US\", {\n                                    month: \"short\",\n                                    day: \"numeric\",\n                                })\n                            }\n                        />\n                        <YAxis\n                            tickLine={false}\n                            axisLine={false}\n                            tickMargin={8}\n                            ticks={[0, 400, 800, 1200, 1600]}\n                            tickFormatter={(val) => (val >= 1000 ? `$${val / 1000}k` : `$${val}`)}\n                            domain={[0, 1600]}\n                        />\n                        <ChartTooltip\n                            content={\n                                <ChartTooltipContent\n                                    className=\"shadow-xs\"\n                                    labelFormatter={(value) =>\n                                        new Date(value as string).toLocaleDateString(\"en-US\", {\n                                            month: \"long\",\n                                            day: \"numeric\",\n                                            year: \"numeric\",\n                                        })\n                                    }\n                                    indicator=\"dot\"\n                                />\n                            }\n                        />\n                        <Area\n                            dataKey=\"earnings\"\n                            type=\"monotone\"\n                            fill=\"url(#fillEarnings)\"\n                            stroke=\"var(--color-earnings)\"\n                            strokeWidth={2}\n                        />\n                        <Area\n                            dataKey=\"cost\"\n                            type=\"monotone\"\n                            fill=\"url(#fillCost)\"\n                            stroke=\"var(--color-cost)\"\n                            strokeWidth={2}\n                        />\n                    </AreaChart>\n                </ChartContainer>\n\n                <div className=\"text-muted-foreground mt-3 flex items-center justify-center gap-6 text-xs\">\n                    <div className=\"flex items-center gap-2\">\n                        <span className=\"bg-chart-1 size-2.5 rounded-full\" />\n                        <span>Earnings</span>\n                    </div>\n                    <div className=\"flex items-center gap-2\">\n                        <span className=\"bg-chart-2 size-2.5 rounded-full\" />\n                        <span>Cost</span>\n                    </div>\n                </div>\n            </CardContent>\n        </Card>\n    );\n};\n"
    },
    {
      "path": "components/templates/free-dashboard/dashboards/hospital/components/patient-insights-chart.tsx",
      "type": "registry:block",
      "content": "import { MoreVerticalIcon, PieChartIcon } from \"lucide-react\";\nimport { Pie, PieChart, ResponsiveContainer, Tooltip } from \"recharts\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport {\n    DropdownMenu,\n    DropdownMenuContent,\n    DropdownMenuItem,\n    DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\n\nexport type PatientInsightSegment = {\n    name: string;\n    value: number;\n    fill: string;\n};\n\nconst insightsData: PatientInsightSegment[] = [\n    { name: \"Critical Care\", value: 480, fill: \"var(--chart-1)\" },\n    { name: \"General Healthcare\", value: 360, fill: \"var(--chart-2)\" },\n    { name: \"Internal Healthcare\", value: 240, fill: \"var(--chart-3)\" },\n    { name: \"Additional Medical Services\", value: 188, fill: \"var(--chart-5)\" },\n];\n\nexport const PatientInsightsChart = () => {\n    return (\n        <Card>\n            <CardHeader>\n                <div className=\"flex items-center gap-3\">\n                    <div className=\"rounded-md border p-2\">\n                        <PieChartIcon className=\"size-4.5\" />\n                    </div>\n                    <div className=\"flex flex-col gap-0.5\">\n                        <CardTitle>Patient Insights</CardTitle>\n                        <CardDescription className=\"text-xs leading-none\">Distribution by department</CardDescription>\n                    </div>\n                </div>\n                <CardAction>\n                    <DropdownMenu>\n                        <DropdownMenuTrigger\n                            render={\n                                <Button variant=\"ghost\" size=\"icon-xs\" className=\"text-muted-foreground\">\n                                    <MoreVerticalIcon className=\"size-4\" />\n                                    <span className=\"sr-only\">More options</span>\n                                </Button>\n                            }\n                        />\n                        <DropdownMenuContent align=\"end\" className=\"w-36\">\n                            <DropdownMenuItem>View Report</DropdownMenuItem>\n                            <DropdownMenuItem>Export Data</DropdownMenuItem>\n                        </DropdownMenuContent>\n                    </DropdownMenu>\n                </CardAction>\n            </CardHeader>\n\n            <CardContent>\n                <div className=\"relative mx-auto flex h-59 w-full items-center justify-center\">\n                    <ResponsiveContainer width=\"100%\" height=\"100%\" initialDimension={{ width: 320, height: 200 }}>\n                        <PieChart>\n                            <Tooltip\n                                wrapperClassName=\"shadow-none\"\n                                content={({ active, payload }) => {\n                                    if (active && payload && payload.length) {\n                                        const data = payload[0];\n                                        return (\n                                            <div className=\"bg-popover rounded-md border p-2 text-xs shadow-none\">\n                                                <p className=\"text-foreground font-medium\">{data.name}</p>\n                                                <p className=\"text-muted-foreground\">{data.value} patients</p>\n                                            </div>\n                                        );\n                                    }\n                                    return null;\n                                }}\n                            />\n                            <Pie\n                                data={insightsData}\n                                dataKey=\"value\"\n                                nameKey=\"name\"\n                                innerRadius={62}\n                                outerRadius={84}\n                                paddingAngle={3}\n                                stroke=\"none\"\n                            />\n                        </PieChart>\n                    </ResponsiveContainer>\n\n                    <div className=\"pointer-events-none absolute inset-0 flex flex-col items-center justify-center text-center\">\n                        <span className=\"text-muted-foreground text-xs font-medium\">Overall</span>\n                        <span className=\"mt-1 text-xl font-semibold sm:text-2xl\">1,268</span>\n                        <span className=\"text-muted-foreground mt-1 text-xs\">This Week</span>\n                    </div>\n                </div>\n\n                <div className=\"mt-4.5 space-y-3 text-xs\">\n                    {insightsData.map((item) => (\n                        <div key={item.name} className=\"flex items-center justify-between\">\n                            <div className=\"flex items-center gap-2\">\n                                <span className=\"size-2.5 rounded-full\" style={{ backgroundColor: item.fill }} />\n                                <span className=\"text-muted-foreground\">{item.name}</span>\n                            </div>\n                            <span className=\"text-foreground font-medium\">{item.value}</span>\n                        </div>\n                    ))}\n                </div>\n            </CardContent>\n        </Card>\n    );\n};\n"
    },
    {
      "path": "components/templates/free-dashboard/dashboards/hospital/components/patient-summary-chart.tsx",
      "type": "registry:block",
      "content": "import { useEffect, useState } from \"react\";\n\nimport { UsersIcon } from \"lucide-react\";\nimport { Bar, BarChart, CartesianGrid, XAxis, YAxis } from \"recharts\";\n\nimport { useIsMobile } from \"@/hooks/use-mobile\";\n\nimport { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { type ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent } from \"@/components/ui/chart\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"@/components/ui/select\";\n\nexport type PatientSummaryData = {\n    date: string;\n    child: number;\n    adult: number;\n    elderly: number;\n};\n\nconst rawChartData: PatientSummaryData[] = Array.from({ length: 90 }, (_, i) => {\n    const d = new Date();\n    d.setDate(d.getDate() - (89 - i));\n    return {\n        date: d.toISOString().slice(0, 10),\n        child: Math.floor(Math.random() * 80) + 40,\n        adult: Math.floor(Math.random() * 70) + 30,\n        elderly: Math.floor(Math.random() * 25) + 5,\n    };\n});\n\nconst chartConfig: ChartConfig = {\n    child: {\n        label: \"Child\",\n        color: \"var(--chart-1)\",\n    },\n    adult: {\n        label: \"Adult\",\n        color: \"var(--chart-3)\",\n    },\n    elderly: {\n        label: \"Elderly\",\n        color: \"var(--chart-5)\",\n    },\n};\n\nexport const PatientSummaryChart = () => {\n    const isMobile = useIsMobile();\n    const [timeRange, setTimeRange] = useState<string | null>(\"15d\");\n\n    useEffect(() => {\n        if (isMobile) {\n            setTimeRange(\"7d\");\n        }\n    }, [isMobile]);\n\n    const filteredData = rawChartData.slice(timeRange === \"7d\" ? -7 : timeRange === \"15d\" ? -15 : -30);\n\n    return (\n        <Card>\n            <CardHeader>\n                <div className=\"flex items-center gap-3\">\n                    <div className=\"rounded-md border p-2\">\n                        <UsersIcon className=\"size-4.5\" />\n                    </div>\n                    <div className=\"flex flex-col gap-0.5\">\n                        <CardTitle>Patient Summary</CardTitle>\n                        <CardDescription className=\"text-xs leading-none\">\n                            Admissions by age demographic\n                        </CardDescription>\n                    </div>\n                </div>\n                <CardAction>\n                    <Select value={timeRange ?? \"7d\"} onValueChange={setTimeRange}>\n                        <SelectTrigger\n                            className=\"h-8 w-28 text-xs shadow-none\"\n                            size=\"sm\"\n                            aria-label=\"Select time range\">\n                            <SelectValue placeholder=\"Last 7 days\" />\n                        </SelectTrigger>\n                        <SelectContent className=\"rounded-md\">\n                            <SelectItem value=\"7d\">Last 7 days</SelectItem>\n                            <SelectItem value=\"15d\">Last 15 days</SelectItem>\n                            <SelectItem value=\"30d\">Last 30 days</SelectItem>\n                        </SelectContent>\n                    </Select>\n                </CardAction>\n            </CardHeader>\n\n            <CardContent className=\"flex-1 px-3 pt-2 sm:px-4\">\n                <ChartContainer config={chartConfig} className=\"aspect-auto h-68\">\n                    <BarChart data={filteredData} margin={{ top: 10, right: 10, left: -20, bottom: 0 }} barGap={3}>\n                        <CartesianGrid vertical={false} strokeDasharray=\"3 3\" />\n                        <XAxis\n                            dataKey=\"date\"\n                            tickLine={false}\n                            axisLine={false}\n                            tickMargin={8}\n                            minTickGap={16}\n                            tickFormatter={(value) =>\n                                new Date(value).toLocaleDateString(\"en-US\", {\n                                    month: \"short\",\n                                    day: \"numeric\",\n                                })\n                            }\n                        />\n                        <YAxis\n                            tickLine={false}\n                            axisLine={false}\n                            tickMargin={8}\n                            ticks={[0, 40, 80, 120, 160]}\n                            domain={[0, 160]}\n                        />\n                        <ChartTooltip\n                            cursor={{ fill: \"rgba(0, 0, 0, 0.04)\" }}\n                            content={\n                                <ChartTooltipContent\n                                    className=\"shadow-xs\"\n                                    labelFormatter={(value) =>\n                                        new Date(value as string).toLocaleDateString(\"en-US\", {\n                                            month: \"long\",\n                                            day: \"numeric\",\n                                            year: \"numeric\",\n                                        })\n                                    }\n                                    indicator=\"dot\"\n                                />\n                            }\n                        />\n                        <Bar\n                            dataKey=\"child\"\n                            fill=\"var(--color-child)\"\n                            radius={[4, 4, 0, 0]}\n                            maxBarSize={timeRange === \"7d\" ? 14 : timeRange === \"15d\" ? 10 : 8}\n                        />\n                        <Bar\n                            dataKey=\"adult\"\n                            fill=\"var(--color-adult)\"\n                            radius={[4, 4, 0, 0]}\n                            maxBarSize={timeRange === \"7d\" ? 14 : timeRange === \"15d\" ? 10 : 8}\n                        />\n                        <Bar\n                            dataKey=\"elderly\"\n                            fill=\"var(--color-elderly)\"\n                            radius={[4, 4, 0, 0]}\n                            maxBarSize={timeRange === \"7d\" ? 14 : timeRange === \"15d\" ? 10 : 8}\n                        />\n                    </BarChart>\n                </ChartContainer>\n\n                <div className=\"text-muted-foreground mt-3 flex items-center justify-center gap-6 text-xs\">\n                    <div className=\"flex items-center gap-2\">\n                        <span className=\"bg-chart-1 size-2.5 rounded-full\" />\n                        <span>Child</span>\n                    </div>\n                    <div className=\"flex items-center gap-2\">\n                        <span className=\"bg-chart-3 size-2.5 rounded-full\" />\n                        <span>Adult</span>\n                    </div>\n                    <div className=\"flex items-center gap-2\">\n                        <span className=\"bg-chart-5 size-2.5 rounded-full\" />\n                        <span>Elderly</span>\n                    </div>\n                </div>\n            </CardContent>\n        </Card>\n    );\n};\n"
    },
    {
      "path": "components/templates/free-dashboard/dashboards/hospital/components/stat-card.tsx",
      "type": "registry:block",
      "content": "import {\n    DownloadIcon,\n    EyeIcon,\n    type LucideIcon,\n    MinusIcon,\n    MoreVerticalIcon,\n    RefreshCwIcon,\n    TrendingDownIcon,\n    TrendingUpIcon,\n} from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardTitle } from \"@/components/ui/card\";\nimport {\n    DropdownMenu,\n    DropdownMenuContent,\n    DropdownMenuGroup,\n    DropdownMenuItem,\n    DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\n\nexport type StatCardMenuItem = {\n    label: string;\n    icon?: LucideIcon;\n    onClick?: () => void;\n};\n\nexport type StatCardProps = {\n    title: string;\n    value: string | number;\n    trendValue: string | number;\n    direction?: \"up\" | \"down\" | \"neutral\";\n    icon?: LucideIcon;\n    menuItems?: StatCardMenuItem[];\n};\n\nexport const StatCard = ({\n    title,\n    value,\n    trendValue,\n    direction = \"up\",\n    icon: Icon,\n    menuItems = [\n        { label: \"View Details\", icon: EyeIcon },\n        { label: \"Export Data\", icon: DownloadIcon },\n        { label: \"Refresh\", icon: RefreshCwIcon },\n    ],\n}: StatCardProps) => {\n    const isUp = direction === \"up\";\n    const isDown = direction === \"down\";\n    const TrendIcon = isUp ? TrendingUpIcon : isDown ? TrendingDownIcon : MinusIcon;\n\n    const badgeClass = isUp\n        ? \"bg-emerald-100/80 text-emerald-600 dark:bg-emerald-950/60 dark:text-emerald-400\"\n        : isDown\n          ? \"bg-rose-100/80 text-rose-600 dark:bg-rose-950/60 dark:text-rose-400\"\n          : \"bg-muted text-muted-foreground\";\n\n    return (\n        <Card className=\"p-3 sm:p-4\">\n            <div className=\"flex items-center justify-between\">\n                <div className=\"flex items-center gap-2.5\">\n                    {Icon && (\n                        <div className=\"bg-card flex size-9 items-center justify-center rounded-md border\">\n                            <Icon className=\"size-4.5\" />\n                        </div>\n                    )}\n                    <CardTitle>{title}</CardTitle>\n                </div>\n\n                <DropdownMenu>\n                    <DropdownMenuTrigger\n                        render={\n                            <Button variant=\"ghost\" size=\"icon-sm\">\n                                <MoreVerticalIcon className=\"size-3.5\" />\n                                <span className=\"sr-only\">Open menu</span>\n                            </Button>\n                        }\n                    />\n                    <DropdownMenuContent align=\"end\" className=\"w-36\">\n                        <DropdownMenuGroup>\n                            {menuItems.map((item, index) => {\n                                const ItemIcon = item.icon;\n                                return (\n                                    <DropdownMenuItem key={index} onClick={item.onClick}>\n                                        {ItemIcon && <ItemIcon className=\"size-4\" />}\n                                        <span>{item.label}</span>\n                                    </DropdownMenuItem>\n                                );\n                            })}\n                        </DropdownMenuGroup>\n                    </DropdownMenuContent>\n                </DropdownMenu>\n            </div>\n\n            <CardContent className=\"bg-muted/60 flex items-center justify-between rounded-md px-3.5 py-3\">\n                <span className=\"text-2xl font-medium sm:text-3xl\">{value}</span>\n                <span\n                    className={cn(\n                        \"inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-medium\",\n                        badgeClass,\n                    )}>\n                    <TrendIcon className=\"size-3.5\" />\n                    <span>{trendValue}</span>\n                </span>\n            </CardContent>\n        </Card>\n    );\n};\n"
    }
  ],
  "mcp": {
    "description": "Provides fully structured layout, responsive UI sections, and integrated interactive features. This premium admin dashboard template delivers responsive layouts, diverse charts, and advanced tables for your web applications. Relies on motion. Use this when creating complete application structures or high-fidelity page prototypes.",
    "tags": [
      "template",
      "dashboard"
    ]
  }
}