// Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { useState, type JSX } from 'react'; import type { LocalizerType } from '../types/Util.std.ts'; import { AxoButton } from '../axo/AxoButton.dom.tsx'; import { AxoConfirmDialog } from '../axo/AxoConfirmDialog.dom.tsx'; import { strictAssert } from '../util/assert.std.ts'; import { tw } from '../axo/tw.dom.tsx'; export type PropsType = { hasChanges: boolean; i18n: LocalizerType; onCancel: () => unknown; onSave: () => unknown; }; export function AvatarModalButtons({ hasChanges, i18n, onCancel, onSave, }: PropsType): JSX.Element { const [confirmDiscardAction, setConfirmDiscardAction] = useState< (() => void) | undefined >(undefined); return (