"use client"; import { X, type LucideIcon } from "lucide-react"; import { useTranslation } from "react-i18next"; /** * Shared header for the fullscreen context pickers (History, Books, Memory, * My Agents, Persona, Question Bank). Every picker used to hand-roll the same * three-line header: an all-caps, wide-tracked "eyebrow" kind label, a title, * and a subtitle. * * That eyebrow is a Latin-typography idiom — `uppercase` + `tracking-[0.14em]` * reads as refined on English, but on CJK it just spreads the glyphs apart and * looks loose/unkempt (uppercase is a no-op for Han characters). So this * component drops the eyebrow entirely and conveys the "kind" through a tinted * icon chip instead: cleaner, script-agnostic, and consistent across pickers. */ export default function PickerHeader({ icon: Icon, titleId, title, subtitle, onClose, trailing, }: { icon: LucideIcon; /** id wired to the dialog's `aria-labelledby`. */ titleId: string; /** Already-translated title string. */ title: string; /** Already-translated subtitle string. */ subtitle: string; onClose: () => void; /** Optional control rendered between the title block and the close button. */ trailing?: React.ReactNode; }) { const { t } = useTranslation(); return (

{title}

{subtitle}

{trailing}
); }