// Copyright 2026 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { useCallback, useId, useState } from 'react'; import type { LocalizerType } from '../types/I18N.std.js'; import { AxoButton } from '../axo/AxoButton.dom.js'; import { AxoDialog } from '../axo/AxoDialog.dom.js'; import { tw } from '../axo/tw.dom.js'; import { AxoCheckbox } from '../axo/AxoCheckbox.dom.js'; import { I18n } from './I18n.dom.js'; export type KeyTransparencyErrorDialogProps = Readonly<{ i18n: LocalizerType; open: boolean; onOpenChange: (open: boolean) => void; onSubmit: (shareDebugLog: boolean) => void; onViewDebugLog: () => void; isSubmitting: boolean; }>; export function KeyTransparencyErrorDialog( props: KeyTransparencyErrorDialogProps ): React.JSX.Element { const { i18n, open, onOpenChange, onViewDebugLog, onSubmit, isSubmitting } = props; const debugLogCheckboxId = useId(); const [shareDebugLog, setShareDebugLog] = useState(false); const handleSubmit = useCallback(() => { onSubmit(shareDebugLog); }, [onSubmit, shareDebugLog]); return (

{i18n('icu:KeyTransparencyErrorDialog__Title')}

{i18n( 'icu:KeyTransparencyErrorDialog__ShareDebugLog__ViewButton' )}
{i18n('icu:KeyTransparencyErrorDialog__Submit')}
); }