import { Fragment } from "react";
import { Card, CardSection, Divider, Group, Stack, Text, Title } from "@mantine/core";
import { getI18n } from "@homarr/translation/server";
interface DangerZoneRootProps {
children: React.ReactNode[] | React.ReactNode;
}
export const DangerZoneRoot = async ({ children }: DangerZoneRootProps) => {
const t = await getI18n();
return (
{t("common.dangerZone")}
{Array.isArray(children)
? children.map((child, index) => (
{child}
{index + 1 !== children.length && (
)}
))
: children}
);
};
interface DangerZoneItemProps {
label: string;
description: string;
action: React.ReactNode;
}
export const DangerZoneItem = ({ label, description, action }: DangerZoneItemProps) => {
return (
{label}
{description}
{action}
);
};