"use strict";var _peopleCount=require("../../utils/people-count"),_utils=require("../../utils/utils");Component({properties:{sdkInstance:{type:Object,value:null,observer:"initSDK"},mode:{type:String,value:"portrait"}},data:{visible:!1,text:""},lifetimes:{attached:function(){this.initSDK(this.properties.sdkInstance)},detached:function(){"function"==typeof this._unsub&&this._unsub(),this._unsub=null,this._initializedSdk=null}},methods:{initSDK:function(t){var i,e,n=this;t&&this._initializedSdk!==t&&("function"==typeof this._unsub&&this._unsub(),this._initializedSdk=t,this._unsub=null===(i=t.store)||void 0===i||null===(e=i.get)||void 0===e?void 0:e.call(i,{liveInfo:function(t){n.syncView(t)}}))},syncView:function(t){var i=(0,_peopleCount.formatPeopleCount)(null==t?void 0:t.VirtualPeopleCount);(0,_utils.setDataIfChanged)(this,{visible:(0,_peopleCount.shouldShowPeopleCount)(t),text:i?"".concat(i,"人气"):""})}}});