import { Text } from "preact-i18n";
import { ModalForm } from "@revoltchat/ui";
import { TextReact } from "../../../lib/i18n";
import { ModalProps } from "../types";
/**
* Confirmation modal
*/
export default function ConfirmLeave(
props: ModalProps<"leave_group" | "leave_server">,
) {
const name = props.target.name;
return (
}
description={
{name} }}
/>
}
data={{
silently_leave: {
title: ,
description: (
),
},
}}
schema={{
silently_leave: "checkbox",
}}
callback={({ silently_leave }) =>
props.target.delete(silently_leave)
}
submit={{
palette: "error",
children: ,
}}
/>
);
}