import React, { forwardRef } from 'react'; import { useWatch } from 'react-hook-form'; import type { Control } from 'react-hook-form'; import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '~/components/ui'; import { SendIcon } from '~/components/svg'; import { useLocalize } from '~/hooks'; import { cn } from '~/utils'; type SendButtonProps = { disabled: boolean; control: Control<{ text: string }>; }; const SubmitButton = React.memo( forwardRef((props: { disabled: boolean }, ref: React.ForwardedRef) => { const localize = useLocalize(); return ( {localize('com_nav_send_message')} ); }), ); const SendButton = React.memo( forwardRef((props: SendButtonProps, ref: React.ForwardedRef) => { const data = useWatch({ control: props.control }); return ; }), ); export default SendButton;