import dayjs from 'dayjs' import { type ReactNode } from 'react' import { TimestampInfo } from 'ui-patterns' import { InlineLink } from '@/components/ui/InlineLink' export const RESTRICTION_MESSAGES = { GRACE_PERIOD: { title: 'Organization exceeded its quota in the previous billing cycle', description: (date: string, slug: string): ReactNode => { const label = dayjs(date).format('DD MMM, YYYY') return ( <> You have a grace period until{' '} to bring usage back under quota. Review usage ) }, }, GRACE_PERIOD_OVER: { title: 'Grace period is over', description: (slug: string): ReactNode => ( <> Your projects will not be able to serve requests when you use up your quota.{' '} Review billing ), }, RESTRICTED: { title: 'Services restricted', description: (slug: string): ReactNode => ( <> Your projects are unable to serve requests as your organization has used up its quota.{' '} Resolve billing issues ), }, OVERDUE_INVOICES: { title: 'Outstanding invoices', description: (slug: string): ReactNode => ( <> Please pay your invoices to avoid service disruption ), }, OVERDUE_INVOICES_FROM_OTHER_ORGS: { title: 'Outstanding invoices in other organization', description: (slug: string): ReactNode => ( <> Please pay invoices for other organizations to avoid service disruption ), }, }