// services/jiraPoller/ticketIcons.js // // Component/kind → emoji mapping for poller Webex summary bullets. export const COMPONENT_ICONS = { 'Mobility': '📱', 'Communication Services': '☎️', 'Audio Visual': '📺', }; const KIND_ICONS = { phone: '☎️', av: '📺', }; /** * Pick the summary-bullet icon for a ticket. * Prefer the first recognized Jira component; fall back to AI kind. * * @param {Array<{name?: string}>|null|undefined} components * @param {'phone'|'av'|string} [kind] * @returns {string} */ export function iconForTicket(components, kind) { for (const c of components || []) { const icon = COMPONENT_ICONS[c?.name]; if (icon) return icon; } return KIND_ICONS[kind] || '🎫'; }