import{DEFAULT_PUSHER_CONFIG}from"../common/constants.js";class Pusher{constructor(t){Object.assign(this,DEFAULT_PUSHER_CONFIG,{isVisible:!0},t)}getPusherContext(t){return this.pusherContext||(this.pusherContext=wx.createLivePusherContext(t)),this.pusherContext}reset(){this.pusherContext&&(this.pusherContext.stop({success:()=>{Object.assign(this,DEFAULT_PUSHER_CONFIG,{isVisible:!0})}}),this.pusherContext=null)}}export default Pusher;