// Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import moment from 'moment'; import type { FormatXMLElementFn } from 'intl-messageformat'; import type { LocalizerType } from '../types/Util'; import { UNSUPPORTED_OS_URL } from '../types/support'; import { missingCaseError } from '../util/missingCaseError'; import type { WidthBreakpoint } from './_util'; import { Intl } from './Intl'; import { LeftPaneDialog } from './LeftPaneDialog'; export type PropsType = { containerWidthBreakpoint: WidthBreakpoint; expirationTimestamp: number; i18n: LocalizerType; type: 'warning' | 'error'; OS: string; }; export function UnsupportedOSDialog({ containerWidthBreakpoint, expirationTimestamp, i18n, type, OS, }: PropsType): JSX.Element | null { const learnMoreLink: FormatXMLElementFn = children => ( {children} ); let body: JSX.Element; if (type === 'error') { body = ( ); } else if (type === 'warning') { body = ( ); } else { throw missingCaseError(type); } return ( {body} ); }