src/shared/constants/Icons.tsx
import { typescriptSafeObjectDotKeys } from "@/shared/lib/objects";
export const SystemIcons = {
ShoppingCart: `<path d="M10 21a1 1 0 11-2 0 1 1 0 012 0zM21 21a1 1 0 11-2 0 1 1 0 012 0zM1 1h4l2.68 13.39c.188.925.995 1.61 1.962 1.61h.04-.002H19.438a2 2 0 001.959-1.597l.002-.013 1.6-8.39h-17" />`,
Activity: `<path d="M22 12h-4l-3 9L9 3l-3 9H2" />`,
ShoppingBag: `<path d="M6 2L3 6v14a2 2 0 002 2v0h14a2 2 0 002-2v0V6l-3-4zM3 6h18" /><path d="M16 10a4 4 0 01-8 0v0" />`,
Users: `<path d="M17 21v-2a4 4 0 00-4-4v0H5a4 4 0 00-4 4v2M13 7a4 4 0 11-8 0 4 4 0 018 0zM23 21v-2a4.002 4.002 0 00-2.972-3.864L20 15.13M16 3.13c1.743.457 3.008 2.018 3.008 3.875s-1.265 3.418-2.98 3.869L16 10.88" />`,
Award: `<path d="M19 8A7 7 0 115 8a7 7 0 0114 0z" /><path d="M8.21 13.89L7 23l5-3 5 3-1.21-9.12" />`,
Download: `<path d="M21 15v4a2 2 0 01-2 2v0H5a2 2 0 01-2-2v0-4M7 10l5 5 5-5M12 15V3" />`,
Upload: `<polyline points="16 16 12 12 8 16" /><line x1="12" x2="12" y1="12" y2="21" /><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3" /><polyline points="16 16 12 12 8 16" />`,
Mail: `<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" /><path d="M22 6l-10 7L2 6" />`,
Star: `<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" />`,
Clock: `<path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10z" /><path d="M12 6v6l4 2" />`,
BarChart: `<path d="M12 20V10M18 20V4M6 20v-4" />`,
CodeAlt: `<polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2" /><line x1="12" x2="12" y1="22" y2="15.5" /><polyline points="22 8.5 12 15.5 2 8.5" /><polyline points="2 15.5 12 8.5 22 15.5" /><line x1="12" x2="12" y1="2" y2="8.5" />`,
Close: `<line x1="18" x2="6" y1="6" y2="18" /><line x1="6" x2="18" y1="6" y2="18" />`,
Square: `<rect height="18" rx="2" ry="2" width="18" x="3" y="3" />`,
Bell: `<path d="M18 8A6 6 0 106 8v0c0 7-3 9-3 9h18s-3-2-3-9M13.73 21a2.002 2.002 0 01-3.455.009L10.27 21" />`,
Box: ` <path d="M21 16V8a2 2 0 00-.991-1.725L20 6.27l-7-4c-.287-.168-.632-.268-1-.268s-.713.099-1.009.273L11 2.27l-7 4A2.003 2.003 0 003 8v8a2 2 0 00.991 1.725L4 17.73l7 4c.287.168.632.268 1 .268s.713-.099 1.009-.273L13 21.73l7-4A2.003 2.003 0 0021 16v0z" /><path d="M3.27 6.96L12 12.01l8.73-5.05M12 22.08V12" />`,
Calendar: `<path d="M5 4h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V6a2 2 0 012-2zM16 2v4M8 2v4M3 10h18" />`,
CheckSquare: `<path d="M9 11l3 3L22 4" /><path d="M21 12v7a2 2 0 01-2 2v0H5a2 2 0 01-2-2v0V5a2 2 0 012-2v0h11" />`,
CreditCard: `<path d="M3 4h18a2 2 0 012 2v12a2 2 0 01-2 2H3a2 2 0 01-2-2V6a2 2 0 012-2zM1 10h22" />`,
Database: `<path d="M21 5c0 1.657-4.029 3-9 3S3 6.657 3 5s4.029-3 9-3 9 1.343 9 3zM21 12c0 1.66-4 3-9 3s-9-1.34-9-3" /><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5" />`,
DollarSign: `<path d="M12 1v22M17 5H9.5a3.5 3.5 0 100 7v0h5a3.5 3.5 0 110 7v0H6" />`,
Type: `<polyline points="4 7 4 4 20 4 20 7" /><line x1="9" x2="15" y1="20" y2="20" /><line x1="12" x2="12" y1="4" y2="20" />`,
Lock: `<path d="M5 11h14a2 2 0 012 2v7a2 2 0 01-2 2H5a2 2 0 01-2-2v-7a2 2 0 012-2zM7 11V7a5 5 0 0110 0v4" />`,
Search: `<circle cx="11" cy="11" r="8" /><line x1="21" x2="16.65" y1="21" y2="16.65" />`,
File: `<path d="M13 2H6a2 2 0 00-2 2v16a2 2 0 002 2v0h12a2 2 0 002-2v0V9z" /><path d="M13 2v7h7" />`,
Folder: `<path d="M22 19a2 2 0 01-2 2v0H4a2 2 0 01-2-2v0V5a2 2 0 012-2v0h5l2 3h9a2 2 0 012 2v0z" />`,
Gift: `<path d="M20 12v10H4V12M2 7h20v5H2V7zM12 22V7M12 7H7.5a2.5 2.5 0 110-5v0C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 100-5v0C13 2 12 7 12 7z" />`,
Globe: ` <path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10zM2 12h20" /><path d="M12 2a15.235 15.235 0 014 9.983V12a15.254 15.254 0 01-4.01 10.011l.01-.012a15.235 15.235 0 01-4-9.983v-.017a15.254 15.254 0 014.01-10.011L12 2z" />`,
Heart: `<path d="M20.84 4.61c-.995-.996-2.371-1.612-3.89-1.612s-2.895.616-3.89 1.612L12 5.67l-1.06-1.06a5.501 5.501 0 00-7.78 7.78L12 21.23l8.84-8.84c.996-.995 1.612-2.371 1.612-3.89s-.616-2.895-1.612-3.89h0z" />`,
Home: `<path d="M3 9l9-7 9 7v11a2 2 0 01-2 2v0H5a2 2 0 01-2-2v0z" /><path d="M9 22V12h6v10" /><path d="M9 22V12h6v10" />`,
Image: `<path d="M5 3h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2z" /><path d="M10 8.5a1.5 1.5 0 11-3.001-.001A1.5 1.5 0 0110 8.5zM21 15l-5-5L5 21" />`,
Flow: `<path d="M21 18a3 3 0 11-6 0 3 3 0 016 0zM9 6a3 3 0 11-6 0 3 3 0 016 0z" /><path d="M13 6h3a2 2 0 012 2v7M6 9v12" />`,
Info: `<path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10zM12 16v-4M12 8h.01" />`,
Link: `<path d="M10 13a4.998 4.998 0 007.54.54l3-3a5 5 0 00-7.071-7.069l.001-.001-1.72 1.71" /><path d="M14 11a4.998 4.998 0 00-7.54-.54l-3 3a5 5 0 007.071 7.069l-.001.001 1.71-1.71" />`,
LinkAlt: `<path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3" /><line x1="8" x2="16" y1="12" y2="12" />`,
Map: `<path d="M1 6v16l7-4 8 4 7-4V2l-7 4-8-4-7 4zM8 2v16M16 6v16" />`,
Monitor: `<path d="M4 3h16a2 2 0 012 2v10a2 2 0 01-2 2H4a2 2 0 01-2-2V5a2 2 0 012-2zM8 21h8M12 17v4" />`,
Phone: `<path d="M22 16.92v3.008a2 2 0 01-2.188 1.991l.008.001c-3.245-.362-6.177-1.457-8.705-3.116l.075.046a19.647 19.647 0 01-5.953-5.923l-.047-.077a19.54 19.54 0 01-3.062-8.582L2.12 4.18A2 2 0 014.11 2h3.02a2 2 0 011.979 1.709l.001.011c.141 1.05.386 1.998.73 2.898l-.03-.088a1.994 1.994 0 01-.45 2.11L8.09 9.91a16.126 16.126 0 005.923 5.959l.077.041 1.27-1.27a1.994 1.994 0 012.123-.445l-.014-.005c.812.314 1.76.559 2.744.693l.066.007A2.003 2.003 0 0122 16.87l-.001.052v-.003z" />`,
PieChart: `<path d="M21.21 15.89c-1.559 3.618-5.094 6.105-9.21 6.105-5.523 0-10-4.477-10-10 0-4.076 2.439-7.583 5.937-9.14l.064-.025" /><path d="M22 12c0-5.523-4.477-10-10-10v10z" />`,
Shield: `<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />`,
Server: `<path d="M4 2h16a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2V4a2 2 0 012-2zM4 14h16a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4a2 2 0 012-2zM6 6h.01M6 18h.01" />`,
Smartphone: `<path d="M7 2h10a2 2 0 012 2v16a2 2 0 01-2 2H7a2 2 0 01-2-2V4a2 2 0 012-2zM12 18h.01" />`,
Truck: `<path d="M1 3h15v13H1V3zM16 8h4l3 3v5h-7V8z" /><path d="M8 18.5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zM21 18.5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z" />`,
Tv: `<path d="M4 7h16a2 2 0 012 2v11a2 2 0 01-2 2H4a2 2 0 01-2-2V9a2 2 0 012-2zM17 2l-5 5-5-5" />`,
Plus: `<line x1="12" x2="12" y1="5" y2="19" /> <line x1="5" x2="19" y1="12" y2="12" />`,
UserPlus: `<path d="M16 21v-2a4 4 0 00-4-4v0H5a4 4 0 00-4 4v2M12.5 7a4 4 0 11-8 0 4 4 0 018 0zM20 8v6M23 11h-6" />`,
UserCheck: `<path d="M16 21v-2a4 4 0 00-4-4v0H5a4 4 0 00-4 4v2M12.5 7a4 4 0 11-8 0 4 4 0 018 0zM17 11l2 2 4-4" />`,
Wifi: `<path d="M5 12.55c1.893-1.585 4.354-2.548 7.04-2.548s5.147.963 7.057 2.562l-.017-.014M1.42 9C4.225 6.518 7.936 5.003 12 5.003s7.775 1.515 10.597 4.012L22.58 9M8.53 16.11c.966-.693 2.172-1.109 3.475-1.109s2.509.415 3.493 1.121l-.018-.012M12 20h.01" />`,
Zap: `<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />`,
ZapOff: `<polyline points="12.41 6.75 13 2 10.57 4.92" /><polyline points="18.57 12.91 21 10 15.66 10" /><polyline points="8 8 3 14 12 14 11 22 16 16" /><line x1="1" x2="23" y1="1" y2="23" />`,
Edit: `<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />`,
Github: ` <path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" />`,
User: `<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4" />`,
Twitter: `<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z" />`,
Discord: `<path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037c-1.687.29-3.33.8-4.885 1.515a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.083.083 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.077.077 0 0 0 .084-.028c.462-.63.874-1.295 1.227-1.994a.076.076 0 0 0-.042-.106 13.107 13.107 0 0 1-1.872-.892.078.078 0 0 1-.038-.062.077.077 0 0 1 .03-.066c.126-.094.252-.192.372-.292a.075.075 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.076.076 0 0 1 .03.065.078.078 0 0 1-.036.063c-.599.349-1.225.647-1.873.89a.076.076 0 0 0-.05.076c.001.012.004.022.009.032.36.698.772 1.362 1.225 1.993a.077.077 0 0 0 .084.028 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03ZM8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418Zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z" />`,
Settings: `<circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>`,
List: `<line x1="8" x2="21" y1="6" y2="6" /><line x1="8" x2="21" y1="12" y2="12" /><line x1="8" x2="21" y1="18" y2="18" /><line x1="3" x2="3.01" y1="6" y2="6" /><line x1="3" x2="3.01" y1="12" y2="12" /><line x1="3" x2="3.01" y1="18" y2="18" />`,
Table: `<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18" />`,
Help: `<circle cx="12" cy="12" r="10" /> <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /><line x1="12" x2="12.01" y1="17" y2="17" />`,
Save: `<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" /><polyline points="17 21 17 13 7 13 7 21" /><polyline points="7 3 7 8 15 8" />`,
Check: `<polyline points="20 6 9 17 4 12" />`,
Ban: ` <circle cx="12" cy="12" r="10" /><line x1="4.93" x2="19.07" y1="4.93" y2="19.07" />`,
Left: `<polyline points="15 18 9 12 15 6" />`,
Right: `<polyline points="9 18 15 12 9 6" />`,
Bookmark: `<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" />`,
Book: `<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20" /><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z" />`,
Terminal: `<polyline points="4 17 10 11 4 5" /><line x1="12" x2="20" y1="19" y2="19" />`,
Eye: `<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" />`,
Columns: `<path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18" />`,
Thrash: `<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><line x1="10" x2="10" y1="11" y2="17" /><line x1="14" x2="14" y1="11" y2="17" />`,
Copy: `<rect height="13" rx="2" ry="2" width="13" x="9" y="9" />
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
`,
EyeOff: `<path d="M17.94 17.94A9.995 9.995 0 0112.009 20H12c-7 0-11-8-11-8a18.605 18.605 0 015.017-5.908l.043-.032M9.9 4.24A8.865 8.865 0 0111.979 4h.023-.001c7 0 11 8 11 8a18.62 18.62 0 01-2.182 3.217l.022-.027m-6.721-1.07a3 3 0 11-4.242-4.238l.002-.002M1 1l22 22" />`,
Layers: `<polygon points="12 2 2 7 12 12 22 7 12 2" /><polyline points="2 17 12 22 22 17" /><polyline points="2 12 12 17 22 12" /></svg>`,
Package: `<line x1="16.5" x2="7.5" y1="9.4" y2="4.21" /><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" /><polyline points="3.27 6.96 12 12.01 20.73 6.96" /><line x1="12" x2="12" y1="22.08" y2="12" />`,
Play: `<polygon points="5 3 19 12 5 21 5 3" />`,
Unlock: `<rect height="11" rx="2" ry="2" width="18" x="3" y="11" /> <path d="M7 11V7a5 5 0 0 1 9.9-1" />`,
Filter: `<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />`,
LogIn: `<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" /><polyline points="10 17 15 12 10 7" /><line x1="15" x2="3" y1="12" y2="12" />`,
LogOut: `<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /><polyline points="16 17 21 12 16 7" /><line x1="21" x2="9" y1="12" y2="12" />`,
Code: `<polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" />`,
Export: `<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" /><polyline points="16 6 12 2 8 6" /><line x1="12" x2="12" y1="2" y2="15" />`,
Repeat: ` <polyline points="17 1 21 5 17 9" /><path d="M3 11V9a4 4 0 0 1 4-4h14" /><polyline points="7 23 3 19 7 15" /><path d="M21 13v2a4 4 0 0 1-4 4H3" />`,
ToggleLeft: `<rect height="14" rx="7" ry="7" width="22" x="1" y="5" /><circle cx="8" cy="12" r="3" />`,
ToggleRight: `<rect height="14" rx="7" ry="7" width="22" x="1" y="5" /><circle cx="16" cy="12" r="3" />`,
PaperClip: `<path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48" />`,
Share: `<circle cx="18" cy="5" r="3" /><circle cx="6" cy="12" r="3" /><circle cx="18" cy="19" r="3" /><line x1="8.59" x2="15.42" y1="13.51" y2="17.49" /><line x1="15.41" x2="8.59" y1="6.51" y2="10.49" />`,
Sliders: `<line x1="4" x2="4" y1="21" y2="14" /><line x1="4" x2="4" y1="10" y2="3" /><line x1="12" x2="12" y1="21" y2="12" /><line x1="12" x2="12" y1="8" y2="3" /><line x1="20" x2="20" y1="21" y2="16" /><line x1="20" x2="20" y1="12" y2="3" /><line x1="1" x2="7" y1="14" y2="14" /><line x1="9" x2="15" y1="8" y2="8" /><line x1="17" x2="23" y1="16" y2="16" />`,
};
export type SystemIconsKeys = keyof typeof SystemIcons | "none";
export const SystemIconsList = typescriptSafeObjectDotKeys(SystemIcons).sort(
(a, b) => a.localeCompare(b)
) as unknown as SystemIconsKeys[];
export const systemIconToSVG = (icon: string, strokeWidth = 2) => {
let iconPath = SystemIcons[icon];
if (!iconPath) {
return icon;
}
const svgProps = `fill="none" stroke-linejoin="round" stroke-linecap="round" stroke-width="${strokeWidth}" stroke="currentColor"`;
iconPath = iconPath.replaceAll(`<path `, `<path ${svgProps} `);
iconPath = iconPath.replaceAll(`<rect `, `<rect ${svgProps} `);
iconPath = iconPath.replaceAll(`<circle `, `<circle ${svgProps} `);
iconPath = iconPath.replaceAll(`<polygon `, `<polygon ${svgProps} `);
iconPath = iconPath.replaceAll(`<line `, `<line ${svgProps} `);
iconPath = iconPath.replaceAll(`<polyline `, `<polyline ${svgProps} `);
return `<svg
fill="currentColor"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
${iconPath}
</svg>`;
};