/* * Copyright 2026 Element Creations Ltd. * * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial * Please see LICENSE files in the repository root for full details. */ import React from "react"; import { type JSX } from "react"; import { Text } from "@vector-im/compound-web"; import { _t } from "../../../languageHandler"; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; interface RemoveSectionDialogProps { onFinished: (shouldRemoveSection: boolean) => void; /** Whether the section is empty */ isEmpty: boolean; } /** * Dialog shown to the user to remove section in the room list. */ export function RemoveSectionDialog({ onFinished, isEmpty }: RemoveSectionDialogProps): JSX.Element { return ( onFinished(false)} title={_t("remove_section_dialog|title")} hasCancel={true} > {_t("remove_section_dialog|confirmation")} {!isEmpty && ( <>
{_t("remove_section_dialog|description")} )} onFinished(false)} onPrimaryButtonClick={() => onFinished(true)} />
); }