/* eslint-disable @typescript-eslint/no-explicit-any */
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 CalculateIcon from '@mui/icons-material/Calculate';
import MenuIcon from '@mui/icons-material/Menu';
import LogoutIcon from '@mui/icons-material/Logout';
import SmartphoneIcon from '@mui/icons-material/Smartphone';
import SavingsIcon from '@mui/icons-material/Savings';
import PaidIcon from '@mui/icons-material/Paid';
import CreditCardIcon from '@mui/icons-material/CreditCard';
import CurrencyRupeeIcon from '@mui/icons-material/CurrencyRupee';
import CreditScoreIcon from '@mui/icons-material/CreditScore';
import AddIcon2 from '@mui/icons-material/Add';
export function ButtonIcon(
  iconName: string,
  data: any = {},
  additionalIcons: Record<string, any> = {}
) {

  const IconHolderObj = {
    AddIcon2: <AddIcon2 sx={{ ...data?.iconStyle }}  />,
    CreditScoreIcon: <CreditScoreIcon sx={{ ...data?.iconStyle }}  />,
    CurrencyRupeeIcon: <CurrencyRupeeIcon sx={{ ...data?.iconStyle }}  />,
    MobileIcon:<SmartphoneIcon sx={{ ...data?.iconStyle }}  />,
    SmartphoneIcon:<SmartphoneIcon sx={{ ...data?.iconStyle }}  />,
    LogoutIcon:<LogoutIcon sx={{ ...data?.iconStyle }} />,
    MenuIcon: <MenuIcon sx={{ ...data?.iconStyle }} />,
    CalculateIcon:<CalculateIcon sx={{ ...data?.iconStyle }}  />,
    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 }} />,
    SavingsIcon:<SavingsIcon sx={{ ...data?.iconStyle }}  />,
    PaidIcon:<PaidIcon 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 }} />
    ),
    CreditCardIcon: <CreditCardIcon 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];
}
