import { archiveRestore, arrowDownLeft, arrowDownWideNarrow, arrowRight, arrowRightLeft, arrowUpDown, clipboardList, cornerRightUp, dices, fileArchive, folderClosed, image, laptop2, panelRight, penSquare, pencilRuler, pipette, play, refreshCcw, save, settings, trash, wand2, webcam, // @ts-ignore } from 'lucide-static'; const replaceIcon = (button: HTMLButtonElement, emoji: string[], svg: string) => { if (!button?.textContent || !svg) return; for (const e of emoji) { if (button?.textContent?.includes(e)) { button.innerHTML = svg .replace(`width="24"`, `width="16"`) .replace(`height="24"`, `height="16"`); } } }; export default () => { console.time('๐Ÿคฏ [svgIcon] replace'); for (const button of document.querySelectorAll('button')) { replaceIcon(button, ['๐Ÿ–Œ๏ธ'], penSquare); replaceIcon(button, ['๐Ÿ—ƒ๏ธ'], fileArchive); replaceIcon(button, ['๐Ÿ–ผ๏ธ'], pipette); replaceIcon(button, ['๐ŸŽจ๏ธ'], image); replaceIcon(button, ['๐Ÿ“‚'], folderClosed); replaceIcon(button, ['๐Ÿ”„', '๐Ÿ”', 'โ™ป๏ธ'], refreshCcw); replaceIcon(button, ['โ†™๏ธ'], arrowDownLeft); replaceIcon(button, ['โคด'], cornerRightUp); replaceIcon(button, ['โ†•๏ธ'], arrowDownWideNarrow); replaceIcon(button, ['๐Ÿ—‘๏ธ'], trash); replaceIcon(button, ['๐Ÿ“‹'], clipboardList); replaceIcon(button, ['๐Ÿ’พ'], save); replaceIcon(button, ['๐ŸŽฒ๏ธ'], dices); replaceIcon(button, ['๐Ÿช„'], wand2); replaceIcon(button, ['โš™๏ธ'], settings); replaceIcon(button, ['โžก๏ธ'], arrowRight); replaceIcon(button, ['โ‡…'], arrowUpDown); replaceIcon(button, ['โ‡„'], arrowRightLeft); replaceIcon(button, ['๐ŸŽด'], panelRight); replaceIcon(button, ['๐ŸŒ€'], archiveRestore); replaceIcon(button, ['๐Ÿ’ฅ'], play); replaceIcon(button, ['๐Ÿ“ท'], webcam); replaceIcon(button, ['๐Ÿ“'], laptop2); replaceIcon(button, ['๐Ÿ“'], pencilRuler); } console.timeEnd('๐Ÿคฏ [svgIcon] replace'); };