// Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; import { Button, ButtonSize, ButtonVariant } from '../Button'; import type { ConversationType } from '../../state/ducks/conversations'; import { Modal } from '../Modal'; import { I18n } from '../I18n'; import { Emojify } from './Emojify'; import { useRestoreFocus } from '../../hooks/useRestoreFocus'; import type { LocalizerType } from '../../types/Util'; import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser'; export type PropsType = { i18n: LocalizerType; sender: ConversationType; inGroup: boolean; onClose: () => unknown; }; export function DeliveryIssueDialog(props: PropsType): React.ReactElement { const { i18n, inGroup, sender, onClose } = props; // Focus first button after initial render, restore focus on teardown const [focusRef] = useRestoreFocus(); const footer = ( <> openLinkInWebBrowser( 'https://support.signal.org/hc/articles/4404859745690' ) } size={ButtonSize.Medium} variant={ButtonVariant.Secondary} > {i18n('icu:DeliveryIssue--learnMore')} {i18n('icu:Confirmation--confirm')} > ); const senderTitle = ; return ( {i18n('icu:DeliveryIssue--title')} {inGroup ? ( ) : ( )} ); }