RezinaLMS-Admin/src/pages/content-management/components/AccessTierConfirmDialog.shared.ts

23 lines
642 B
TypeScript

import type { ContentAccessTier } from "../../../types/course.types"
export function accessTierConfirmTitle(
nextTier: ContentAccessTier,
contentLabel = "content",
): string {
if (nextTier === "PREMIUM") {
return `Set this ${contentLabel} to Premium?`
}
return `Set this ${contentLabel} to Free?`
}
export function accessTierConfirmDescription(
nextTier: ContentAccessTier,
contentLabel = "content",
): string {
if (nextTier === "PREMIUM") {
return `Learners will need a premium subscription to access this ${contentLabel}.`
}
return `This ${contentLabel} will be available to all learners at no extra cost.`
}