import ProductionIcon from './ProductionIcon'
import PrinterIcon from './PrinterIcon'
import PrinterProfileIcon from './PrinterProfileIcon'
import FilamentProfileIcon from './FilamentProfileIcon'
import JobIcon from './JobIcon'
import GCodeFileIcon from './GCodeFileIcon'
import SubJobIcon from './SubJobIcon'
import InventoryIcon from './InventoryIcon'
import FilamentStockIcon from './FilamentStockIcon'
import PartStockIcon from './PartStockIcon'
import ProductStockIcon from './ProductStockIcon'
import StockEventIcon from './StockEventIcon'
import StockAuditIcon from './StockAuditIcon'
import PurchaseOrderIcon from './PurchaseOrderIcon'
import ShipmentIcon from './ShipmentIcon'
import OrderItemIcon from './OrderItemIcon'
import StockLocationIcon from './StockLocationIcon'
import StockTransferIcon from './StockTransferIcon'
import SalesIcon from './SalesIcon'
import ClientIcon from './ClientIcon'
import SalesOrderIcon from './SalesOrderIcon'
import MarketplaceIcon from './MarketplaceIcon'
import ListingIcon from './ListingIcon'
import FinanceIcon from './FinanceIcon'
import InvoiceIcon from './InvoiceIcon'
import PaymentIcon from './PaymentIcon'
import FilamentIcon from './FilamentIcon'
import FilamentSkuIcon from './FilamentSkuIcon'
import PartIcon from './PartIcon'
import PartSkuIcon from './PartSkuIcon'
import ProductIcon from './ProductIcon'
import ProductCategoryIcon from './ProductCategoryIcon'
import ProductSkuIcon from './ProductSkuIcon'
import VendorIcon from './VendorIcon'
import MaterialIcon from './MaterialIcon'
import NoteTypeIcon from './NoteTypeIcon'
import SettingsIcon from './SettingsIcon'
import AuditLogIcon from './AuditLogIcon'
import DeveloperIcon from './DeveloperIcon'
import PersonIcon from './PersonIcon'
import HostIcon from './HostIcon'
import DocumentPrinterIcon from './DocumentPrinterIcon'
import DocumentTemplateIcon from './DocumentTemplateIcon'
import DocumentIcon from './DocumentIcon'
import DocumentSizeIcon from './DocumentSizeIcon'
import DocumentJobIcon from './DocumentJobIcon'
import FileIcon from './FileIcon'
import CourierIcon from './CourierIcon'
import CourierServiceIcon from './CourierServiceIcon'
import TaxRateIcon from './TaxRateIcon'
import TaxRecordIcon from './TaxRecordIcon'
import AppPasswordIcon from './AppPasswordIcon'
import InfoCircleIcon from './InfoCircleIcon'

const toEmoji = (emoji) => <span aria-hidden>{emoji}</span>

const sidebarIconMap = {
  production: <ProductionIcon />,
  printer: <PrinterIcon />,
  printerProfile: <PrinterProfileIcon />,
  filamentProfile: <FilamentProfileIcon />,
  job: <JobIcon />,
  subJob: <SubJobIcon />,
  gcodeFile: <GCodeFileIcon />,
  inventory: <InventoryIcon />,
  filamentStock: <FilamentStockIcon />,
  partStock: <PartStockIcon />,
  productStock: <ProductStockIcon />,
  stockEvent: <StockEventIcon />,
  stockAudit: <StockAuditIcon />,
  purchaseOrder: <PurchaseOrderIcon />,
  orderItem: <OrderItemIcon />,
  shipment: <ShipmentIcon />,
  stockLocation: <StockLocationIcon />,
  stockTransfer: <StockTransferIcon />,
  sales: <SalesIcon />,
  client: <ClientIcon />,
  salesOrder: <SalesOrderIcon />,
  marketplace: <MarketplaceIcon />,
  listing: <ListingIcon />,
  finance: <FinanceIcon />,
  invoice: <InvoiceIcon />,
  payment: <PaymentIcon />,
  filament: <FilamentIcon />,
  filamentSku: <FilamentSkuIcon />,
  part: <PartIcon />,
  partSku: <PartSkuIcon />,
  product: <ProductIcon />,
  productCategory: <ProductCategoryIcon />,
  productSku: <ProductSkuIcon />,
  vendor: <VendorIcon />,
  material: <MaterialIcon />,
  noteType: <NoteTypeIcon />,
  settings: <SettingsIcon />,
  auditLog: <AuditLogIcon />,
  developer: <DeveloperIcon />,
  person: <PersonIcon />,
  host: <HostIcon />,
  documentPrinter: <DocumentPrinterIcon />,
  documentTemplate: <DocumentTemplateIcon />,
  document: <DocumentIcon />,
  documentSize: <DocumentSizeIcon />,
  documentJob: <DocumentJobIcon />,
  file: <FileIcon />,
  courier: <CourierIcon />,
  courierService: <CourierServiceIcon />,
  taxRate: <TaxRateIcon />,
  taxRecord: <TaxRecordIcon />,
  appPassword: <AppPasswordIcon />,
  infoCircle: <InfoCircleIcon />,
  sessionStorage: toEmoji('🗃️'),
  authDebug: toEmoji('🔐'),
  apiDebug: toEmoji('🌐')
}

export const getSidebarIconNode = (iconKey) => {
  if (!iconKey) return null
  return sidebarIconMap[iconKey] || null
}
