"use client";
import { AnimatePresence, motion, useReducedMotion } from "framer-motion";
import { Plus, ShieldCheck } from "lucide-react";
import { useLocale, useTranslations } from "next-intl";
import { useState, type ReactNode } from "react";
import { LocaleToggle } from "@/components/layout/locale-toggle";
import { SoundToggle } from "@/components/sound-toggle";
import { ThemeToggle } from "@/components/theme-toggle";
import { buildAdminUrl } from "@/lib/admin-routing";
import type { AppLocale } from "@/lib/locale";
import { cn } from "@/lib/utils";
type FloatingControlsProps = {
locale: string;
defaultLocale: AppLocale;
isSuperAdmin?: boolean;
};
const pill =
"flex h-11 w-11 items-center justify-center rounded-full border border-border/60 bg-background/85 text-foreground/80 backdrop-blur-chrome transition-colors hover:bg-accent hover:text-foreground";
/** Radius (px) of the arc the items fan out along. */
const RADIUS = 92;
export function FloatingControls({
locale,
defaultLocale,
isSuperAdmin = false,
}: FloatingControlsProps) {
const [open, setOpen] = useState(false);
const t = useTranslations("navigation");
const activeLocale = useLocale();
const isRtl = activeLocale === "ar";
const reducedMotion = useReducedMotion();
const controls: ReactNode[] = [