'use client'; import Modal from '@/components/Modal'; import { TbPhotoShare } from 'react-icons/tb'; import { clsx } from 'clsx/lite'; import { BiCopy } from 'react-icons/bi'; import { ReactNode } from 'react'; import { shortenUrl } from '@/utility/url'; import { toastSuccess } from '@/toast'; import { PiXLogo } from 'react-icons/pi'; import { SHOW_SOCIAL } from '@/site/config'; import { generateXPostText } from '@/utility/social'; export default function ShareModal({ title, pathShare, pathClose, socialText, children, }: { title?: string pathShare: string pathClose: string socialText: string children: ReactNode }) { const renderIcon = ( icon: JSX.Element, action: () => void, embedded?: boolean, ) =>