import React, { useState } from 'react'; import { TranslateIcon, CodeIcon, CopySimpleIcon } from '@phosphor-icons/react'; import { useToast } from '../hooks/useToast'; const TextTransformer = () => { const [inputText, setInputText] = useState(''); const { addToast } = useToast(); const toLeet = (text) => { const leetMap = { a: '4', b: '8', e: '3', g: '6', l: '1', o: '0', s: '5', t: '7', z: '2', A: '4', B: '8', E: '3', G: '6', L: '1', O: '0', S: '5', T: '7', Z: '2', }; return text .split('') .map((char) => leetMap[char] || char) .join(''); }; const transformedText = toLeet(inputText); const copyToClipboard = (text) => { if (!text) return; navigator.clipboard.writeText(text).then(() => { addToast({ title: 'Copied', message: 'Payload stored in clipboard.', duration: 2000, }); }); }; return (