mirror of
https://github.com/hanzobot/adnexus.git
synced 2026-10-30 19:44:10 +00:00
2 lines
1.1 KiB
JavaScript
2 lines
1.1 KiB
JavaScript
import{r as l,j as e}from"./ui-SA1K2VdO.js";import{V as s,q as i}from"./utils-BOogt4zp.js";const u=()=>{const[t,a]=l.useState(!0);l.useEffect(()=>{if(typeof window<"u"){window.globalMuteState===void 0&&(window.globalMuteState=!0),a(window.globalMuteState);const o=()=>{a(window.globalMuteState)};return window.addEventListener("globalMuteChange",o),()=>{window.removeEventListener("globalMuteChange",o)}}},[]);const n=()=>{typeof window<"u"&&(window.globalMuteState=!window.globalMuteState,window.dispatchEvent(new Event("globalMuteChange")),a(!t))};return e.jsx("button",{onClick:n,className:`fixed bottom-6 right-6 p-3 rounded-full bg-black/50 text-white z-50 transition-all duration-300 shadow-lg hover:bg-black/70 border ${t?"border-gray-400":"border-white"}`,"aria-label":t?"Unmute":"Mute",children:t?e.jsxs("div",{className:"relative",children:[e.jsx(s,{size:24,className:"text-gray-400"}),e.jsx("div",{className:"absolute top-1/2 left-1/2 w-0.5 h-8 bg-gray-400 -rotate-45 -translate-x-1/2 -translate-y-1/2"})]}):e.jsx(i,{size:24,className:"text-white"})})};export{u as G};
|