"use client"; import { Volume2, VolumeX } from "lucide-react"; import { toast } from "sonner"; import { useSound } from "@/components/sound-provider"; import { Button, type ButtonProps } from "@/components/ui/button"; import { cn } from "@/lib/utils"; type SoundToggleProps = { ariaLabel?: string; mutedAriaLabel?: string; mutedToastLabel?: string; unmutedToastLabel?: string; variant?: ButtonProps["variant"]; className?: string; iconClassName?: string; }; export function SoundToggle({ ariaLabel = "Mute sounds", mutedAriaLabel = "Unmute sounds", mutedToastLabel = "Sound muted", unmutedToastLabel = "Sound enabled", variant = "outline", className, iconClassName, }: SoundToggleProps) { const { isMuted, toggleMuted } = useSound(); const handleToggle = () => { toggleMuted(); toast(isMuted ? unmutedToastLabel : mutedToastLabel); }; return ( ); }