const e=require(`../../../types/hinkal.types.cjs`);require(`../../../types/index.cjs`);var t=new Set,n=n=>{if(typeof document<`u`){let t=e=>{e instanceof CustomEvent?n(e.detail??{}):n({})};return document.addEventListener(e.EventType.BalanceChange,t),()=>document.removeEventListener(e.EventType.BalanceChange,t)}return t.add(n),()=>{t.delete(n)}},r=n=>{let r=e.EventType.BalanceChange,i=new CustomEvent(r,{detail:n});typeof document<`u`?document.dispatchEvent(i):t.forEach(e=>{e(n)})};exports.balanceChangedHandler=r,exports.subscribeToBalanceChange=n;