24 lines
535 B
TypeScript
24 lines
535 B
TypeScript
import type { AlertType } from 'ui-layer/components/alert/types'
|
|
import type { UiIcon } from '#build/types/ui/icons'
|
|
|
|
export function getStatusType(status: string): AlertType {
|
|
switch (status) {
|
|
case 'completed':
|
|
return 'positive'
|
|
case 'expired':
|
|
return 'negative'
|
|
default:
|
|
return 'warning'
|
|
}
|
|
}
|
|
export function getStatusIcon(status: string): UiIcon {
|
|
switch (status) {
|
|
case 'completed':
|
|
return 's-check'
|
|
case 'expired':
|
|
return 's-cross'
|
|
default:
|
|
return 's-clock'
|
|
}
|
|
}
|