"use client";
import { Fragment } from "react";
import { Card, CardSection, Divider, Group, Stack, Text, Title } from "@mantine/core";
import { useScopedI18n } from "@homarr/translation/client";
interface DangerZoneRootProps {
children: React.ReactNode[] | React.ReactNode;
}
export const DangerZoneRoot = ({ children }: DangerZoneRootProps) => {
const t = useScopedI18n("common");
return (
{t("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}
);
};