"use client";
import type { ReactNode } from "react";
import { Copy } from "lucide-react";
import { cn } from "@/lib/utils";
import { Switch } from "@/components/ui/switch";
export function SettingsSection({
title,
description,
action,
children,
}: {
title: string;
description?: string;
action?: ReactNode;
children: ReactNode;
}) {
return (
{title}
{description ? (
{description}
) : null}
{action ?
{action}
: null}
{children}
);
}
export function SettingsCard({
className,
children,
}: {
className?: string;
children: ReactNode;
}) {
return (
{children}
);
}
export function ToggleRow({
title,
description,
defaultChecked = false,
}: {
title: string;
description?: string;
defaultChecked?: boolean;
}) {
return (
{title}
{description ? (
{description}
) : null}
);
}
export function CopyField({
label,
description,
value,
}: {
label: string;
description?: string;
value: string;
}) {
return (
{label}
{description ? (
{description}
) : null}
{value}
);
}
/** Light/white CTA used for primary actions on the dark settings surface. */
export const whiteButton =
"bg-foreground text-background hover:bg-foreground/90";
/** Field label with an optional required asterisk. */
export function FieldLabel({
children,
required,
}: {
children: ReactNode;
required?: boolean;
}) {
return (
{children}
{required ? * : null}
);
}