"use client"; import * as React from "react"; import { Command as CommandPrimitive } from "cmdk"; import { LoaderIcon, SearchIcon } from "lucide-react"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "@/components/ui/dialog"; import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "@/components/ui/sheet"; import { useMediaQuery } from "@app/hooks/useMediaQuery"; import { cn } from "@app/lib/cn"; const desktop = "(min-width: 768px)"; const commandSurfaceClassName = "transition duration-150 mt-0 [&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"; function Command({ className, ...props }: React.ComponentProps) { return ( ); } function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true, commandProps, ...props }: React.ComponentProps & { title?: string; description?: string; className?: string; showCloseButton?: boolean; commandProps?: React.ComponentProps; }) { const isDesktop = useMediaQuery(desktop); const command = ( {children} ); if (!isDesktop) { return ( event.preventDefault()} > {title} {description} {command} ); } return ( {title} {description} {command} ); } function CommandInput({ className, isLoading, trailing, ...props }: React.ComponentProps & { isLoading?: boolean; trailing?: React.ReactNode; }) { return (
{isLoading ? ( ) : ( )} {trailing ?
{trailing}
: null}
); } function CommandList({ className, ...props }: React.ComponentProps) { return ( ); } function CommandEmpty({ className, ...props }: React.ComponentProps) { return ( ); } function CommandGroup({ className, ...props }: React.ComponentProps) { return ( ); } function CommandSeparator({ className, ...props }: React.ComponentProps) { return ( ); } function CommandItem({ className, ...props }: React.ComponentProps) { return ( ); } function CommandShortcut({ className, ...props }: React.ComponentProps<"span">) { return ( ); } export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator };