import briefcaseIcon from '../assets/workbench-icons/outline-briefcase.svg?raw'
import documentTextIcon from '../assets/workbench-icons/outline-document-text.svg?raw'
import paperAirplaneIcon from '../assets/workbench-icons/outline-paper-airplane.svg?raw'
import shoppingBagIcon from '../assets/workbench-icons/outline-shopping-bag.svg?raw'
import truckIcon from '../assets/workbench-icons/outline-truck.svg?raw'
import usersIcon from '../assets/workbench-icons/outline-users.svg?raw'

function prepareHeroiconMarkup(svgRaw) {
  return String(svgRaw || '')
    .replace(/<svg\b([^>]*)>/i, '<svg class="workbench-heroicon"$1>')
    .replace(/\sdata-slot="[^"]*"/g, '')
    .replace(/\saria-hidden="[^"]*"/g, '')
}

export const workbenchIconMap = {
  hospitality: { markup: prepareHeroiconMarkup(usersIcon), style: 'outline' },
  travelDraft: { markup: prepareHeroiconMarkup(briefcaseIcon), style: 'outline' },
  receipts: { markup: prepareHeroiconMarkup(documentTextIcon), style: 'outline' },
  flight: { markup: prepareHeroiconMarkup(paperAirplaneIcon), style: 'outline' },
  transport: { markup: prepareHeroiconMarkup(truckIcon), style: 'outline' },
  procurement: { markup: prepareHeroiconMarkup(shoppingBagIcon), style: 'outline' }
}
