'use client'; interface TooltipProps { message: string; position?: 'top' | 'bottom' | 'left' | 'right'; } /** * Tooltip component for showing disabled reason on hover */ export function Tooltip({ message, position = 'top' }: TooltipProps) { const positionClasses = { top: 'bottom-full mb-2', bottom: 'top-full mt-2', left: 'right-full mr-2', right: 'left-full ml-2', }; const arrowClasses = { top: 'top-full -mt-1 left-1/2 -ml-1', bottom: 'bottom-full -mb-1 left-1/2 -ml-1 rotate-180', left: 'left-full -ml-1 top-1/2 -mt-1 -rotate-90', right: 'right-full -mr-1 top-1/2 -mt-1 rotate-90', }; return (
{message}
); } interface ToastProps { message: string; } /** * Toast notification component for showing disabled reason on click (mobile-friendly) */ export function Toast({ message }: ToastProps) { return (

{message}

); } interface DisabledFeedbackProps { showTooltip: boolean; showToast: boolean; message: string | null; tooltipPosition?: 'top' | 'bottom' | 'left' | 'right'; } /** * Combined component for showing disabled feedback (tooltip + toast) * Use with useDisabledFeedback hook */ export function DisabledFeedback({ showTooltip, showToast, message, tooltipPosition = 'top', }: DisabledFeedbackProps) { if (!message) return null; return ( <> {showTooltip && } {showToast && } ); }