{"version":3,"file":"GlobalMuteButton.Dlpi-2U2.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/pVovPxRnMWWb2a7Bmyjf/kAmk6c2X5qRsAN3U6dxO/GlobalMuteButton.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";export function GlobalMuteButton({buttonSize=60,useFrameSize=false,width,height}){const[muted,setMuted]=useState(false);// Compute final size (from prop or the component's frame in Framer)\nconst size=useFrameSize&&typeof width===\"number\"&&typeof height===\"number\"?Math.min(width,height):buttonSize;useEffect(()=>{const mediaElements=document.querySelectorAll(\"audio, video\");mediaElements.forEach(el=>{if(\"muted\"in el){el.muted=muted;}});},[muted]);return /*#__PURE__*/_jsx(motion.button,{type:\"button\",\"aria-label\":muted?\"Unmute all\":\"Mute all\",\"aria-pressed\":muted,onClick:()=>setMuted(prev=>!prev),whileHover:{scale:1.2,rotate:5},whileTap:{scale:.9,rotate:-5},animate:{rotate:[0,1,-1,0]},transition:{repeat:Infinity,duration:2,ease:\"easeInOut\"},style:{width:size,height:size,aspectRatio:\"1 / 1\",borderRadius:9999,display:\"grid\",placeItems:\"center\",fontSize:size*.6,color:\"#fff\",textShadow:\"0 0 10px #a855f7, 0 0 20px #9333ea\",boxShadow:\"0 0 20px #9333ea, inset 0 0 10px #a855f7\",background:\"radial-gradient(circle at 50% 50%, #9333ea 0%, #000 90%)\",cursor:\"pointer\",userSelect:\"none\",fontWeight:\"bold\",border:\"none\",outline:\"none\",WebkitTapHighlightColor:\"transparent\"},children:muted?\"🔇\":\"🔊\"});}// Framer controls\naddPropertyControls(GlobalMuteButton,{useFrameSize:{type:ControlType.Boolean,title:\"Use Frame Size\",defaultValue:false},buttonSize:{type:ControlType.Number,title:\"Button Size\",defaultValue:60,min:30,max:200,step:1,hidden:props=>props.useFrameSize===true}});\nexport const __FramerMetadata__ = {\"exports\":{\"GlobalMuteButton\":{\"type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