"use client"; import { Button, Tooltip, TooltipContent, TooltipTrigger } from "@/components"; import { useSharedContext } from "@/contexts"; import { ModuleWithPermissions } from "@/permissions"; import { cn, useIsMobile } from "@/utils"; import { InfoIcon } from "lucide-react"; import { ReactNode } from "react"; /** * Shared height floor for the card's top row. Applied BOTH here and to the * `details` panel header in RoundPageContainer, so the two line up across the * card's top edge. Expressed in px on purpose: the app scales its root * font-size (14px), so a rem value would drift between the two rows. */ export const HEADER_ROW_MIN_H = "min-h-[53px]"; type RoundPageContainerTitleProps = { module?: ModuleWithPermissions; details?: ReactNode; /** Names what the toggle reveals, so the control is not an unlabelled icon. */ detailsTitle?: ReactNode; /** Overrides the default info glyph — see `RoundPageContainer.detailsIcon`. */ detailsIcon?: ReactNode; showDetails: boolean; setShowDetails: (show: boolean) => void; fullWidth?: boolean; }; export function RoundPageContainerTitle({ module, details, detailsTitle, detailsIcon, showDetails, setShowDetails, }: RoundPageContainerTitleProps) { const { title } = useSharedContext(); const isMobile = useIsMobile(); return (