import React from "react";
import DeleteIcon from "@mui/icons-material/Delete";
import SendIcon from "@mui/icons-material/Send";
import FileCopyIcon from "@mui/icons-material/FileCopy";
import DownloadIcon from "@mui/icons-material/Download";
import PersonIcon from "@mui/icons-material/Person";
import EditIcon from "@mui/icons-material/Edit";
import AddNoteIcon from "@mui/icons-material/PlaylistAdd";
import ClickIcon from "@mui/icons-material/AdsClick";
import ApproveIcon from "@mui/icons-material/TaskAltOutlined";
import RejectIcon from "@mui/icons-material/ClearTwoTone";
import BackIcon from "@mui/icons-material/ReplyTwoTone";
import BackIcon2 from "@mui/icons-material/ArrowBackIosNewTwoTone";
import SearchIcon from "@mui/icons-material/Search";
import SummarizeOutlinedIcon from "@mui/icons-material/SummarizeOutlined";
import RemoveRedEyeOutlinedIcon from "@mui/icons-material/RemoveRedEyeOutlined";
import NotificationImportantOutlinedIcon from "@mui/icons-material/NotificationImportantOutlined";
import RefreshOutlinedIcon from "@mui/icons-material/RefreshOutlined";
import ErrorOutlineOutlinedIcon from "@mui/icons-material/ErrorOutlineOutlined";
import PendingActionsOutlinedIcon from "@mui/icons-material/PendingActionsOutlined";
import PauseIcon from "@mui/icons-material/Pause";
import PlayArrowIcon from "@mui/icons-material/PlayArrow";
import CloseIcon from "@mui/icons-material/Close";
import ReplayIcon from "@mui/icons-material/Replay";
import ContentCopyIcon from "@mui/icons-material/ContentCopy";
import AlarmIcon from "@mui/icons-material/Alarm";
import LockIcon from "@mui/icons-material/Lock";
import DraftsIcon from "@mui/icons-material/Drafts";
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
import PermPhoneMsgIcon from "@mui/icons-material/PermPhoneMsg";
import ContentPasteIcon from "@mui/icons-material/ContentPaste";
import Add from "../assets/TableIcons/Add";
import Download from "../assets/TableIcons/Download";
import AuditTrail from "../assets/TableIcons/AuditTrail";
import View from "../assets/View";
import Edit from "../assets/TableIcons/Edit";
import Maximize from "../assets/ArrayComponentIcons/Maximize";
import Minimize from "../assets/ArrayComponentIcons/Minimize";
import Subtract from "../assets/ArrayComponentIcons/Subtract";
import Bin from "../assets/Bin";
import Export from "../assets/TableIcons/Export";
import Paste from "../assets/TableIcons/Paste";
import DownloadAll from "../assets/DownloadAll";
import CalendarTodayIcon from '@mui/icons-material/CalendarToday';
export function ButtonIcon(
  iconName: string,
  data: any,
  additionalIcons: Record<string, any> = {}
) {
  switch (iconName) {
    case "AlarmIcon":
      return <AlarmIcon sx={{ ...data?.iconStyle }} />;
    case "ClickIcon":
      return <ClickIcon sx={{ ...data?.iconStyle }} />;
    case "ContentCopyIcon":
      return <ContentCopyIcon sx={{ ...data?.iconStyle }} />;
    case "FileCopyIcon":
      return <FileCopyIcon sx={{ ...data?.iconStyle }} />;
    case "PauseIcon":
      return <PauseIcon sx={{ ...data?.iconStyle }} />;
    case "PlayIcon":
      return <PlayArrowIcon sx={{ ...data?.iconStyle }} />;
    case "CloseIcon":
      return <CloseIcon sx={{ ...data?.iconStyle }} />;
    case "ReplayIcon":
      return <ReplayIcon sx={{ ...data?.iconStyle }} />;
    case "DeleteIcon":
      return <DeleteIcon sx={{ ...data?.iconStyle }} />;
    case "SendIcon":
      return <SendIcon sx={{ ...data?.iconStyle }} />;
    case "AddIcon":
      return <AddNoteIcon sx={{ ...data?.iconStyle }} />;
    case "EditIcon":
      return <EditIcon sx={{ ...data?.iconStyle }} />;
    case "ApproveIcon":
      return <ApproveIcon sx={{ ...data?.iconStyle }} />;
    case "RejectIcon":
      return <RejectIcon sx={{ ...data?.iconStyle }} />;
    case "BackIcon":
      return <BackIcon sx={{ ...data?.iconStyle }} />;
    case "PendingIcon":
      return <PendingActionsOutlinedIcon sx={{ ...data?.iconStyle }} />;
    case "BackIcon2":
      return <BackIcon2 sx={{ ...data?.iconStyle }} />;
    case "ViewIcon":
      return <RemoveRedEyeOutlinedIcon sx={{ ...data?.iconStyle }} />;
    case "NotificationIcon":
      return <NotificationImportantOutlinedIcon sx={{ ...data?.iconStyle }} />;
    case "PersonIcon":
      return <PersonIcon sx={{ ...data?.iconStyle }} />;
    case "ReportIcon":
      return <SummarizeOutlinedIcon sx={{ ...data?.iconStyle }} />;
    case "ErrorIcon":
      return (
        <ErrorOutlineOutlinedIcon color="error" sx={{ ...data?.iconStyle }} />
      );
    case "RefreshIcon":
      return <RefreshOutlinedIcon sx={{ ...data?.iconStyle }} />;
    case "DownloadIcon":
      return <DownloadIcon sx={{ ...data?.iconStyle }} />;
    case "SearchIcon":
      return <SearchIcon sx={{ ...data?.iconStyle }} />;
    case "LockIcon":
      return <LockIcon sx={{ ...data?.iconStyle }} />;
    case "DraftsIcon":
      return <DraftsIcon sx={{ ...data?.iconStyle }} />;
    case "PermPhoneMsgIcon":
      return <PermPhoneMsgIcon sx={{ ...data?.iconStyle }} />;
    case "PasteIcon":
      return <ContentPasteIcon sx={{ ...data?.iconStyle }} />;
    case "Calendar":
      return <CalendarTodayIcon sx={{ ...data?.iconStyle }} />;
    case "PrevIcon":
      return (
        <svg
          fill="inherit"
          version="1.1"
          id="Layer_1"
          xmlns="http://www.w3.org/2000/svg"
          x="0px"
          y="0px"
          viewBox="0 0 473.654 473.654"
          enableBackground="new 0 0 473.654 473.654"
        >
          <circle cx="236.827" cy="236.827" r="236.827" />
          <path
            fill="#FFFFFF"
            d="M338.465,207.969c-43.487,0-86.975,0-130.459,0c11.08-11.08,22.161-22.161,33.241-33.245
	c25.56-25.56-14.259-65.084-39.883-39.456c-27.011,27.011-54.018,54.022-81.029,81.033c-10.841,10.841-10.549,28.907,0.213,39.669
	c27.011,27.007,54.018,54.018,81.029,81.025c25.56,25.56,65.084-14.259,39.456-39.883c-11.013-11.013-22.026-22.026-33.039-33.035
	c43.357,0,86.713,0,130.066,0C374.283,264.077,374.604,207.969,338.465,207.969z"
          />
        </svg>
      );
    case "VerifiedIcon":
      return (
        <svg
          id="Layer_1"
          height="inherit"
          viewBox="0 0 512 512"
          width="inherit"
          xmlns="http://www.w3.org/2000/svg"
          data-name="Layer 1"
        >
          <g id="VERIFIED">
            <path
              fill={data?.iconStyle?.color1}
              d="m490.11 205.16q-15.94-15.43-31.94-31.09-.45-21.69-1.13-43.36c-.6-19.35-9-37.81-23.31-52.15s-32.87-22.65-52.24-23.26q-21.72-.67-43.44-1.12-15.66-15.94-31.05-31.84c-13.89-14.22-31.87-22.17-51-22.16s-37.12 8-50.92 22.16q-15.47 15.93-31.15 31.91-21.72.44-43.43 1.12c-39.88 1.36-74.2 35.63-75.56 75.4q-.67 21.69-1.13 43.36-16 15.65-31.94 31.08c-14.19 13.79-22.16 31.79-22.16 50.79s7.92 37 22.16 50.84q15.94 15.42 32 31.05.43 21.69 1.12 43.39c.61 19.38 9 37.79 23.3 52.15s32.85 22.65 52.25 23.25q21.72.69 43.44 1.13 15.66 15.93 31.11 31.82c13.83 14.22 31.83 22.17 51 22.16s37.12-7.94 51-22.15q15.45-15.92 31.12-31.88 21.72-.45 43.43-1.13c39.87-1.35 74.19-35.62 75.55-75.4q.68-21.67 1.12-43.34 16-15.66 31.95-31.09c14.19-13.78 22.16-31.76 22.16-50.83s-8.1-36.97-22.31-50.81z"
            />
            <path
              fill={data?.iconStyle?.color2}
              d="m338.05 54.18q-15.66-15.94-31.05-31.84c-13.89-14.22-31.87-22.17-51-22.16s-37.12 8-50.92 22.16q-15.47 15.93-31.15 31.91-21.72.44-43.43 1.12c-39.88 1.36-74.2 35.63-75.56 75.4q-.67 21.69-1.13 43.36-16 15.65-31.94 31.08c-14.19 13.79-22.16 31.79-22.16 50.79s7.92 37 22.16 50.84q15.94 15.42 32 31.05.38 18.74 1 37.48a280.33 280.33 0 0 0 53.39 5.12c153.9 0 278.66-124.76 278.66-278.66a280.42 280.42 0 0 0 -3.92-46.45l-1.46-.08q-21.77-.67-43.49-1.12z"
            />
            <path
              d="m383.44 223.57c-43.18 44.87-87.05 90.74-130.19 136.24a37.56 37.56 0 0 1 -27.25 11.78h-.17a38.25 38.25 0 0 1 -27.3-11.72q-34.6-35.73-69.42-71.2a37.36 37.36 0 0 1 .76-53.43 38.37 38.37 0 0 1 54 .67q20.69 21.21 41.43 42.54c34.25-35.89 68.67-72 102.55-107.54 14.38-15.13 38.37-15.38 53.79-.78s16.29 38.39 1.8 53.44z"
              fill="#fff"
            />
          </g>
        </svg>
      );
    case "ExceptionIcon":
      return (
        <svg
          version="1.0"
          xmlns="http://www.w3.org/2000/svg"
          width="24px"
          height="24px"
          viewBox="0 0 512.000000 512.000000"
          preserveAspectRatio="xMidYMid meet"
        >
          <g
            transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
            fill="inherit"
            stroke="none"
          >
            <path
              d="M1910 4709 c-879 -101 -1542 -868 -1507 -1744 18 -447 186 -833 497
         -1145 516 -515 1298 -646 1946 -325 l109 54 515 -513 c309 -308 533 -524 560
         -539 100 -56 234 -73 341 -41 203 60 337 274 302 480 -24 138 -19 132 -586
         701 l-520 521 45 89 c428 832 96 1857 -740 2286 -290 149 -639 213 -962 176z
         m480 -219 c192 -39 383 -118 537 -221 100 -66 120 -83 222 -182 218 -214 356
         -467 422 -777 33 -152 33 -429 0 -580 -29 -136 -72 -263 -128 -375 -391 -779
         -1345 -1065 -2097 -629 -121 70 -219 149 -331 265 -198 207 -324 447 -386 739
         -32 151 -32 429 0 580 43 202 116 377 229 550 70 106 288 327 390 394 213 141
         438 226 674 256 116 14 348 5 468 -20z"
            />
            <path
              d="M2013 3903 c-23 -8 -58 -31 -78 -51 -34 -35 -678 -1093 -716 -1177
         -23 -50 -25 -142 -3 -193 19 -47 67 -97 119 -125 37 -21 54 -22 248 -22 l209
         0 30 34 c26 29 30 39 25 75 -4 27 -15 49 -32 63 -25 22 -34 23 -201 23 -102 0
         -183 4 -195 10 -10 6 -19 21 -19 33 0 26 659 1126 684 1142 11 7 21 7 32 0 25
         -16 684 -1116 684 -1142 0 -12 -9 -27 -19 -33 -12 -6 -93 -10 -195 -10 -167 0
         -176 -1 -201 -23 -17 -14 -28 -36 -32 -63 -5 -36 -1 -46 25 -75 l30 -34 209 0
         c194 0 211 1 248 22 52 28 100 78 119 125 22 51 20 143 -3 193 -38 84 -682
         1142 -716 1177 -61 63 -162 83 -252 51z"
            />
            <path
              d="M2064 3441 c-12 -5 -31 -22 -43 -37 -21 -26 -21 -35 -21 -366 0 -274
         3 -344 14 -367 35 -66 137 -66 172 0 11 23 14 93 14 368 l0 341 -27 30 c-30
         32 -75 45 -109 31z"
            />
            <path
              d="M2047 2479 c-22 -13 -47 -61 -47 -93 0 -14 13 -40 29 -58 24 -27 36
         -33 71 -33 35 0 47 6 71 33 16 18 29 44 29 58 0 33 -25 81 -49 94 -25 13 -81
         12 -104 -1z"
            />
          </g>
        </svg>
      );
    case "TableAddIcon":
      return <Add />;
    case "TableDownloadIcon":
      return <Download />;
    case "AuditTrailIcon":
      return <AuditTrail />;
    case "View":
      return <View />;
    case "TableEditIcon":
      return <Edit />;
    case "Maximize":
      return <Maximize />;
    case "Minimize":
      return <Minimize />;
    case "Subtract":
      return <Subtract />;
    case "Bin":
      return <Bin />;
    case "Export":
      return <Export />;
    case "TablePaste":
      return <Paste />;
    case "DownloadAllIcon":
      return <DownloadAll />;
    case "CloneIcon":
      return (
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width="24"
          height="24"
          viewBox="0 0 27.929 34"
        >
          <path
            id="paste"
            d="M31.929,12.929V33.571A2.428,2.428,0,0,1,29.5,36H14.929A2.428,2.428,0,0,1,12.5,33.571V18.288a2.429,2.429,0,0,1,.712-1.717l5.36-5.36a2.429,2.429,0,0,1,1.717-.712H29.5a2.429,2.429,0,0,1,2.429,2.429ZM18.571,26.286h7.286a1.214,1.214,0,0,0,0-2.429H18.571a1.214,1.214,0,1,0,0,2.429Zm0-4.857h7.286a1.214,1.214,0,0,0,0-2.429H18.571a1.214,1.214,0,1,0,0,2.429Zm-8.5,9.714H6.429A2.429,2.429,0,0,1,4,28.714V6.857A2.429,2.429,0,0,1,6.429,4.429H8.857V3.821A1.82,1.82,0,0,1,10.679,2h8.5A1.82,1.82,0,0,1,21,3.821v.607h2.429a2.428,2.428,0,0,1,2.429,2.429V8.071H20.288a4.851,4.851,0,0,0-3.434,1.423l-5.36,5.36a4.851,4.851,0,0,0-1.423,3.434Z"
            transform="translate(-4 -2)"
            fill="inherit"
            fill-rule="evenodd"
          />
        </svg>
      );
    case "DetailIcon":
      return (
        <svg
          id="Layer_1"
          xmlns="http://www.w3.org/2000/svg"
          viewBox="0 0 24 24"
          width="24px"
          height="24px"
        >
          <g id="Layer_2">
            <path
              fill="inherit"
              d="M20.2,4.6c-1.4-1.6-4.5-2.6-8.2-2.6h0c-3.7,0-6.8,1-8.2,2.6-2.4,2.7-2.4,10,0,12.7.5.5,1,.9,1.6,1.3l.3,2c.2,1.1,1.2,1.8,2.3,1.6.3,0,.5-.2.8-.3l2.7-1.8c.2-.1.4-.2.6-.2,3.7,0,6.7-1,8.1-2.6,2.4-2.7,2.4-10,0-12.7ZM12,5.8c.7,0,1.2.6,1.2,1.2s-.6,1.2-1.2,1.2-1.2-.6-1.2-1.2c0-.7.6-1.2,1.2-1.2h0ZM13,16.5h-2c-.6,0-1-.4-1-1s.4-1,1-1v-3c-.6,0-1-.4-1-1s.4-1,1-1h1c.6,0,1,.4,1,1h0v4c.6,0,1,.4,1,1s-.4,1-1,1Z"
            />
          </g>
        </svg>
      )
    case "Payout":
      return (
        <svg
          id="Layer_1"
          xmlns="http://www.w3.org/2000/svg"
          viewBox="0 0 32 32"
          width="24px"
          height="24px"

        >
          <g id="Layer_11" data-name="Layer_1">
            <g id="Layer_3" fill="inherit">
              <path d="M8.2,19.3v1.6c0,.5.4.8.8.8h1.6c0-1.4-1.1-2.5-2.5-2.5l.1.1Z" />
              <circle cx="14.8" cy="12.7" r="2.5" />
              <path d="M18.1,10.3c.5.7.8,1.6.8,2.5,0,2.3-1.8,4.1-4.1,4.1s-4.1-1.8-4.1-4.1c0-.9.3-1.8.8-2.5h-3.3v7.4c2.3,0,4.1,1.8,4.1,4.1h4.9c0-2.3,1.8-4.1,4.1-4.1v-7.4h-3.3.1Z" />
              <path d="M25.5,5.3H4.1c-.5,0-.8.4-.8.8v4.9c0,.5.4.8.8.8h2.5v-2.5c0-.5.4-.8.8-.8h14.8c.5,0,.8.4.8.8v2.5h2.5c.5,0,.8-.4.8-.8v-4.9c0-.5-.4-.8-.8-.8Z" />
              <path d="M26.73,24.9h.65v2.76h-.65v-2.76Z" />
              <path d="M27.38,21.97c0-.18-.15-.32-.32-.32s-.32.15-.32.32v.16h.65v-.16Z" />
              <path d="M27.06,28.79l.27-.81h-.54l.27.81Z" />
              <path d="M27.87,22.46h-1.14v2.11h.65v-1.79h.32v1.95h.32v-2.11c0-.09-.07-.16-.16-.16Z" />
              <path d="M24.46,22.62h.32v1.3h-.32v-1.3Z" />
              <path d="M20.4,24.9h.97v.97h-.97v-.97Z" />
              <path d="M23.81,23.92h.32v-1.79h-.32v1.79Z" />
              <path d="M23.16,22.95v.97h.32v-2.27h-.32v1.3Z" />
              <path d="M22.51,23.11h.32v.81h-.32v-.81Z" />
              <path d="M21.86,22.62v1.3h.32v-1.79h-.32v.49Z" />
              <path d="M21.21,22.79h.32v1.14h-.32v-1.14Z" />
              <path d="M19.75,28.79h6.49v-7.79h-6.49v7.79ZM25.92,28.31c0,.09-.07.16-.16.16h-3.25c-.09,0-.16-.07-.16-.16v-.97c0-.09.07-.16.16-.16h3.25c.09,0,.16.07.16.16v.97ZM25.92,26.85h-3.9v-.32h3.9v.32ZM25.92,26.2h-3.9v-.32h3.9v.32ZM25.92,25.55h-3.9v-.32h3.9v.32ZM25.92,24.9h-2.92v-.32h2.92v.32ZM20.08,23.92h.81v-1.3c0-.09.07-.16.16-.16h.49v-.49c0-.09.07-.16.16-.16h.65c.09,0,.16.07.16.16v.81h.32v-1.3c0-.09.07-.16.16-.16h.65c.09,0,.16.07.16.16v.32h.49c.09,0,.16.07.16.16v.32h.49c.09,0,.16.07.16.16v1.46h.81v.32h-5.84v-.32ZM20.08,24.73c0-.09.07-.16.16-.16h1.3c.09,0,.16.07.16.16v1.3c0,.09-.07.16-.16.16h-1.3c-.09,0-.16-.07-.16-.16v-1.3ZM20.08,27.49h1.3v.32h-1.3v-.32ZM20.08,28.14h1.95v.32h-1.95v-.32Z" />
              <path d="M27.06,20.03c0-.36-.29-.65-.65-.65h-6.09c.33.37.33.93,0,1.3h6.09c.36,0,.65-.29.65-.65Z" />
              <path d="M20.24,20.03c0-.36-.29-.65-.65-.65s-.65.29-.65.65v5.52h.49v-4.71c0-.09.07-.16.16-.16.36,0,.65-.29.65-.65Z" />
              <path d="M22.67,27.49h2.92v.65h-2.92v-.65Z" />
            </g>
          </g>
        </svg>
      )
    case "ReportViewIcon":
      return (
        <svg
          id="Layer_1"
          xmlns="http://www.w3.org/2000/svg"
          viewBox="0 0 512 512"
          width="24px"
          height="24px"
        >
          <g id="_x32_29" fill="inherit">
            <path d="M129.5,234.1c-0.3,119.9-0.4,152.2-0.4,159.4c0-0.1,0-0.3,0-0.4c0,0.3,0,0.6,0,0.9c0-0.2,0-0.4,0-0.6
              c0,0.4,0,1,0,1.8v0c0,0.1,0,0,0,0c-0.1,10.6,6.2,23.4,14,31.3c11.4,11.6,24.1,12.4,24.2-3.5c0,1.3,0-18.9,0-19.9
              c0-16.1,6.9-27,14.9-31.7c43.7-25.4,56.4-32.8,58.2-33.8c-0.1,0-0.1,0.1-0.2,0.1c8-4.6,23.7-13.7,53.3-30.9l48.1-28
              c-1.2-4.1-1.8-8.2-1.8-12.1l0.5-161.1c0-27.2-19.2-60.3-42.8-73.8c-10.3-6.1-20.2-7.2-27.2-3.1L68.7,145.9
              c2.2,0.5,8.6,2.9,13.1,5.6C108.7,167,129.6,204.8,129.5,234.1z M233.3,341.9c0.3-0.2,1-0.6,1.8-1.1
              C234.1,341.4,233.5,341.7,233.3,341.9z M325.2,261.4L150.6,363.4c-2.4,1.4-5.5,0.6-6.9-1.8c-1.4-2.4-0.6-5.5,1.8-6.9l174.6-102.1
              c2.4-1.4,5.5-0.6,6.9,1.8C328.5,256.9,327.6,260,325.2,261.4z M145.5,307.5l131.4-76.8c2.4-1.4,5.5-0.6,6.9,1.8
              c1.4,2.4,0.6,5.5-1.8,6.9l-131.4,76.8c-0.8,0.5-1.7,0.7-2.5,0.7c-1.7,0-3.4-0.9-4.3-2.5C142.3,312,143.1,308.9,145.5,307.5z
              M325.2,167L150.6,269c-2.4,1.4-5.5,0.6-6.9-1.8c-1.4-2.4-0.6-5.5,1.8-6.9l174.6-102.1c2.4-1.4,5.5-0.6,6.9,1.8
              C328.5,162.5,327.6,165.6,325.2,167z M108.4,151.6l172.1-100c1.6-0.9,3.5-0.9,5.1,0c21.7,7,42.2,40,42.2,63.9c0,1.8-1,3.4-2.5,4.3
              L150.6,221.9c-2.8,1.7-6.6,0.2-7.4-3.1c-5.8-22.7-18.4-43.6-35.7-59C105,157.4,105.4,153.3,108.4,151.6z"/>
            <path d="M119,392.9C119,392.9,119,392.9,119,392.9c0,0.5,0,0.9,0,1.2C119,393.4,119,393.1,119,392.9z" />
            <path d="M317.6,112.6c-1.4-17.5-15.3-40.7-30.1-49.2c-1.7-1-3-1.6-4-1.9l-164.2,95.4c14.6,14.6,25.7,33,31.9,53
              L317.6,112.6z"/>
            <path d="M212.6,407.7c0,0-0.1-0.1-0.1-0.1c-8.5-4.9-13.8-1.5-13.8,7.8c0-1.3-0.1,19-0.1,20c0,0.1,0,0.2,0,0.3
              c0,5-0.8,10.1-1.7,13.2l32.6-18.9C226.3,420.3,219.2,411.6,212.6,407.7z"/>
            <path d="M433.4,254.8c-9.6-5.5-18.8-6.6-25.2-2.9l-137.3,79.8l-65,37.8c0.3,0.1,0.5,0.2,0.8,0.3
              c30.4,9.4,55.8,51.3,55.7,82.5c0-2.2-0.1,32.2-0.1,33.3c40.2-23.3,204.4-118.8,210.8-122.5l0.1-39.1
              C473.3,298.6,455.4,267.6,433.4,254.8z M249.9,381.8c-2.4,1.4-5.5,0.6-6.9-1.8c-1.4-2.4-0.6-5.5,1.8-6.9l172.4-100.2
              c2.4-1.4,5.5-0.6,6.9,1.8c1.4,2.4,0.6,5.5-1.8,6.9L249.9,381.8z M452.8,316.7L280.3,416.8c-2.4,1.4-5.5,0.6-6.9-1.8
              c-1.4-2.4-0.6-5.5,1.8-6.9L447.7,308c2.4-1.4,5.5-0.6,6.9,1.8C456,312.2,455.2,315.3,452.8,316.7z"/>
            <path d="M198.7,378.2c-14.4-1.7-21.2,10.3-21.3,24.9c0-1.3,0,18.9,0,20c-0.3,23.8-21.4,28.2-38.7,13.1
              c-12.5-10.9-19.8-28.2-19.7-41c0,0.1,0-0.1,0-1c0,0,0,0,0,0c0-0.1,0-0.1,0-0.2c0,0,0,0.1,0,0.2c0-0.5,0-1,0-1.3c0,0,0-0.1,0-0.1
              c0-0.1,0-0.2,0-0.2c0-8.6,0.1-42.6,0.4-158.6c0.1-43.4-45.7-90.9-69.8-77.1c-6.9,4-10.8,12.8-10.8,24.7l0,6.2l11.1,6.4v-0.4
              c0.1-19.2,15.1-27.8,31.8-18.2c15,8.6,26.6,28.9,26.6,46.1L107.9,383c-0.1,27.1,19.1,60.2,42.7,73.9c22.4,12.9,37.7,2.2,37.9-21.2
              c0-0.1,0-0.2,0-0.3c0,1.3,0.1-19,0.1-20c0-16.3,12.1-23.8,25.7-18c15.6,6.6,27.1,27.3,27,42.6l-0.1,39.1l11.1,6.4
              c0,2.2,0.1-32.3,0.1-33.3C252.4,420.2,223.6,381.2,198.7,378.2z"/>
          </g>
        </svg>
      )
    case "TerritoryAdd":
      return (
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width="18"
          height="18"
          viewBox="0 0 24 24"
          fill="none"
        >
          <path
            d="M6 12H12M12 12H18M12 12V18M12 12V6"
            stroke="currentColor"
            strokeWidth="2"
            strokeLinecap="round"
            strokeLinejoin="round"
          />
        </svg>
      );
    case "TerritoryEdit":
      return (
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width="18"
          height="18"
          viewBox="0 0 24 24"
          fill="none"
        >
          <path
            fillRule="evenodd"
            clipRule="evenodd"
            d="M21.1213 2.70705C19.9497 1.53548 18.0503 1.53547 16.8787 2.70705L15.1989 4.38685L7.29289 12.2928C7.16473 12.421 7.07382 12.5816 7.02986 12.7574L6.02986 16.7574C5.94466 17.0982 6.04451 17.4587 6.29289 17.707C6.54127 17.9554 6.90176 18.0553 7.24254 17.9701L11.2425 16.9701C11.4184 16.9261 11.5789 16.8352 11.7071 16.707L19.5556 8.85857L21.2929 7.12126C22.4645 5.94969 22.4645 4.05019 21.2929 2.87862L21.1213 2.70705ZM18.2929 4.12126C18.6834 3.73074 19.3166 3.73074 19.7071 4.12126L19.8787 4.29283C20.2692 4.68336 20.2692 5.31653 19.8787 5.70705L18.8622 6.72357L17.3068 5.10738L18.2929 4.12126ZM15.8923 6.52185L17.4477 8.13804L10.4888 15.097L8.37437 15.6256L8.90296 13.5112L15.8923 6.52185ZM4 7.99994C4 7.44766 4.44772 6.99994 5 6.99994H10C10.5523 6.99994 11 6.55223 11 5.99994C11 5.44766 10.5523 4.99994 10 4.99994H5C3.34315 4.99994 2 6.34309 2 7.99994V18.9999C2 20.6568 3.34315 21.9999 5 21.9999H16C17.6569 21.9999 19 20.6568 19 18.9999V13.9999C19 13.4477 18.5523 12.9999 18 12.9999C17.4477 12.9999 17 13.4477 17 13.9999V18.9999C17 19.5522 16.5523 19.9999 16 19.9999H5C4.44772 19.9999 4 19.5522 4 18.9999V7.99994Z"
            fill="currentColor"
          />
        </svg>
      );
    case "TerritoryDelete":
      return (
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width="18"
          height="18"
          viewBox="0 0 24 24"
          fill="none"
        >
          <path
            d="M4 7H20"
            stroke="currentColor"
            strokeWidth="2"
            strokeLinecap="round"
            strokeLinejoin="round"
          />
          <path
            d="M6 7V18C6 19.6569 7.34315 21 9 21H15C16.6569 21 18 19.6569 18 18V7"
            stroke="currentColor"
            strokeWidth="2"
            strokeLinecap="round"
            strokeLinejoin="round"
          />
          <path
            d="M9 5C9 3.89543 9.89543 3 11 3H13C14.1046 3 15 3.89543 15 5V7H9V5Z"
            stroke="currentColor"
            strokeWidth="2"
            strokeLinecap="round"
            strokeLinejoin="round"
          />
        </svg>
      );
    case "GitCompare":
      return (
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width="18"
          height="18"
          viewBox="0 0 24 24"
          fill="none"
          stroke="currentColor"
          strokeWidth="2"
          strokeLinecap="round"
          strokeLinejoin="round"
        >
          <circle cx="18" cy="18" r="3" />
          <circle cx="6" cy="6" r="3" />
          <path d="M13 6h3a2 2 0 0 1 2 2v7" />
          <path d="M11 18H8a2 2 0 0 1-2-2V9" />
        </svg>
      )
    case "InfoOutlinedIcon":
      return <InfoOutlinedIcon />;


      const IconHolderObj = {
        AlarmIcon: <AlarmIcon sx={{ ...data?.iconStyle }} />,
        ClickIcon: <ClickIcon sx={{ ...data?.iconStyle }} />,
        ContentCopyIcon: <ContentCopyIcon sx={{ ...data?.iconStyle }} />,
        FileCopyIcon: <FileCopyIcon sx={{ ...data?.iconStyle }} />,
        PauseIcon: <PauseIcon sx={{ ...data?.iconStyle }} />,
        PlayIcon: <PlayArrowIcon sx={{ ...data?.iconStyle }} />,
        CloseIcon: <CloseIcon sx={{ ...data?.iconStyle }} />,
        ReplayIcon: <ReplayIcon sx={{ ...data?.iconStyle }} />,
        DeleteIcon: <DeleteIcon sx={{ ...data?.iconStyle }} />,
        SendIcon: <SendIcon sx={{ ...data?.iconStyle }} />,
        AddIcon: <AddNoteIcon sx={{ ...data?.iconStyle }} />,
        EditIcon: <EditIcon sx={{ ...data?.iconStyle }} />,
        ApproveIcon: <ApproveIcon sx={{ ...data?.iconStyle }} />,
        RejectIcon: <RejectIcon sx={{ ...data?.iconStyle }} />,
        BackIcon: <BackIcon sx={{ ...data?.iconStyle }} />,
        PendingIcon: <PendingActionsOutlinedIcon sx={{ ...data?.iconStyle }} />,
        BackIcon2: <BackIcon2 sx={{ ...data?.iconStyle }} />,
        ViewIcon: <RemoveRedEyeOutlinedIcon sx={{ ...data?.iconStyle }} />,
        NotificationIcon: (
          <NotificationImportantOutlinedIcon sx={{ ...data?.iconStyle }} />
        ),
        PersonIcon: <PersonIcon sx={{ ...data?.iconStyle }} />,
        ReportIcon: <SummarizeOutlinedIcon sx={{ ...data?.iconStyle }} />,
        ErrorIcon: (
          <ErrorOutlineOutlinedIcon color="error" sx={{ ...data?.iconStyle }} />
        ),
        RefreshIcon: <RefreshOutlinedIcon sx={{ ...data?.iconStyle }} />,
        DownloadIcon: <DownloadIcon sx={{ ...data?.iconStyle }} />,
        SearchIcon: <SearchIcon sx={{ ...data?.iconStyle }} />,
        ...additionalIcons,
      };
      return IconHolderObj[iconName];
  }
}
