// Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; import { Modal } from '../Modal'; import { useRestoreFocus } from '../../hooks/useRestoreFocus'; import type { LocalizerType } from '../../types/Util'; import { Button, ButtonSize, ButtonVariant } from '../Button'; export type PropsType = { i18n: LocalizerType; contactSupport: () => unknown; onClose: () => unknown; }; export function ChatSessionRefreshedDialog( props: PropsType ): React.ReactElement { const { i18n, contactSupport, onClose } = props; // Focus first button after initial render, restore focus on teardown const [focusRef] = useRestoreFocus(); const footer = ( <> {i18n('icu:ChatRefresh--contactSupport')} {i18n('icu:Confirmation--confirm')} > ); return ( <> {i18n('icu:ChatRefresh--notification')} {i18n('icu:ChatRefresh--summary')} > ); }