"use client"; import type { ReactNode } from "react"; import { CircleHelp } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Label } from "@/components/ui/label"; import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; type AdminFieldLabelProps = { htmlFor: string; children: ReactNode; helpText?: string; helpAriaLabel?: string; className?: string; }; type AdminHelpIconProps = { helpText: string; helpAriaLabel: string; helpId: string; }; type AdminHelpTextProps = AdminHelpIconProps & { children: ReactNode; className?: string; }; export function AdminHelpIcon({ helpText, helpAriaLabel, helpId, }: AdminHelpIconProps): React.ReactElement { return ( } >

{helpText}

); } export function AdminHelpText({ children, helpText, helpAriaLabel, helpId, className, }: AdminHelpTextProps): React.ReactElement { return ( {children} ); } export function AdminFieldLabel({ htmlFor, children, helpText, helpAriaLabel, className, }: AdminFieldLabelProps): React.ReactElement { if (!helpText) { return ( ); } return (
); }