export const getSentimentLabel = ( sentiment: string | { sentiment?: string } ): string => { return typeof sentiment === 'string' ? sentiment : sentiment.sentiment || 'neutral'; }; export const getSentimentBadgeTone = ( label: string ): 'success' | 'critical' | 'info' => { switch (label) { case 'positive': return 'success'; case 'negative': return 'critical'; default: return 'info'; } };