import{Ft as e}from"./paths-CAzfAyaR.js";import{qs as t}from"./model-selection-R1b_J3k7.js";const n=new Map;function r(e){return(e??``).trim()||`default`}function i(e){let i=r(e),a=n.get(i)??null;if(!a)throw Error(`No active WhatsApp Web listener (account: ${i}). Start the gateway, then link WhatsApp with: ${t(`openclaw channels login --channel whatsapp --account ${i}`)}.`);return{accountId:i,listener:a}}function a(t,i){let{accountId:a,listener:o}=typeof t==`string`?{accountId:t,listener:i??null}:{accountId:e,listener:t??null},s=r(a);o?n.set(s,o):n.delete(s)}function o(e){let t=r(e);return n.get(t)??null}export{i as n,a as r,o as t};
