//enum import { userInfoEnum } from '../../enums'; //svg-routes import { PeriodContentSvgRoutes } from '../svg-routes'; export class PayrollPeriodContentHelper { public static getIcon(status: { numberOfDays: number; period: string }): { title: string; url: string; } { if (status?.period == "Pending") { return { title: `READY IN ${status.numberOfDays} DAYS`, url: PeriodContentSvgRoutes.pending, }; } else if (status?.period === 'Ready') { return { title: userInfoEnum.READY_TO_PROCESS, url: PeriodContentSvgRoutes.active, }; } else { return { title: `${status?.numberOfDays} DAYS OVERDUE`, url: PeriodContentSvgRoutes.warning, }; } } public static getSvgPath( propertyName: keyof typeof PeriodContentSvgRoutes ): string { return PeriodContentSvgRoutes[propertyName] as string; } }