import { useTranslation } from 'react-i18next' import { useProjectContext } from '@/shared/context/project-context' import { useUserContext } from '@/shared/context/user-context' import teaserVideo from '../images/teaser-track-changes.mp4' import teaserImage from '../images/teaser-track-changes.gif' import { startFreeTrial, upgradePlan } from '@/main/account-upgrade' import { memo } from 'react' import OLModal, { OLModalBody, OLModalFooter, OLModalHeader, OLModalTitle, } from '@/features/ui/components/ol/ol-modal' import OLButton from '@/features/ui/components/ol/ol-button' import OLRow from '@/features/ui/components/ol/ol-row' import OLCol from '@/features/ui/components/ol/ol-col' import MaterialIcon from '@/shared/components/material-icon' type UpgradeTrackChangesModalProps = { show: boolean setShow: React.Dispatch> } function UpgradeTrackChangesModalLegacy({ show, setShow, }: UpgradeTrackChangesModalProps) { const { t } = useTranslation() const project = useProjectContext() const user = useUserContext() return ( setShow(false)}> {t('upgrade_to_track_changes')}
{/* eslint-disable-next-line jsx-a11y/media-has-caption */}

{t('see_changes_in_your_documents_live')}

    {[ t('track_any_change_in_real_time'), t('review_your_peers_work'), t('accept_or_reject_each_changes_individually'), ].map(translation => (
  •  {translation}
  • ))}

{t('already_subscribed_try_refreshing_the_page')}

{project.owner && (
{project.owner._id === user.id ? ( user.allowedFreeTrial ? ( startFreeTrial('track-changes')} > {t('try_it_for_free')} ) : ( upgradePlan('project-sharing')} > {t('upgrade')} ) ) : (

{t( 'please_ask_the_project_owner_to_upgrade_to_track_changes' )}

)}
)}
setShow(false)}> {t('close')}
) } export default memo(UpgradeTrackChangesModalLegacy)