"use client"; import * as React from "react"; import * as Dialog from "@radix-ui/react-dialog"; import { AnimatePresence, motion } from "framer-motion"; import { X } from "lucide-react"; import { cn } from "@/lib/utils"; import { useMotionOK } from "@/lib/motion"; /** * A real modal, on Radix, which was already a dependency and never imported. * That matters beyond tidiness: it brings focus trapping, restore-on-close, * Escape, scroll locking and aria wiring that hand-rolled inline confirms * (the previous pattern) do not have. * * Presents as a bottom sheet on phones and a centred panel from `sm:` up. */ export function Sheet({ open, onOpenChange, title, description, children, footer, className, }: { open: boolean; onOpenChange: (v: boolean) => void; title: React.ReactNode; description?: React.ReactNode; children?: React.ReactNode; footer?: React.ReactNode; className?: string; }) { const ok = useMotionOK(); // Radix locks scrolling by injecting a