import { AppState } from '@/UIModels/AppState' import { observer } from 'mobx-react-lite' import { FunctionComponent } from 'preact' import HistoryLockedIllustration from '../../../svg/il-history-locked.svg' import { Button } from '@/Components/Button/Button' const getPlanHistoryDuration = (planName: string | undefined) => { switch (planName) { case 'Core': return '30 days' case 'Plus': return '365 days' default: return "the current session's changes" } } const getPremiumContentCopy = (planName: string | undefined) => { return `Version history is limited to ${getPlanHistoryDuration(planName)} in the ${planName} plan` } export const RevisionContentLocked: FunctionComponent<{ appState: AppState }> = observer(({ appState }) => { const { userSubscriptionName, isUserSubscriptionExpired, isUserSubscriptionCanceled } = appState.subscription return (