"use strict";(self.webpackChunkbongacams=self.webpackChunkbongacams||[]).push([[391],{90807:function(t,n,e){e.d(n,{p:function(){return o}});var o=function(){}},30193:function(t,n,e){e.r(n),e.d(n,{ListingChatNavigationDesktop:function(){return l}});var o=e(15215),r=e(44198),a=e(89414),i=e(90807),s=e(90972),h=e(81363),c=e(22336),u=e(99525),d=e(41669),l=function(t){function n(n){var e=t.call(this)||this;return e.onNavChange=function(){e.owner.navData.length<2?d("#bModelNavigator").hide():(d(".js-next_chat_room").is(":hidden")||d(".js-prev_chat_room").is(":hidden"))&&(d("#bModelNavigator").show(),d(document).trigger("chat:showModelNavigator"))},e.loadNav=function(){return s.l.isAttached?h.ListingLoader.load({type:a.w.NAV}):((0,r._b)("ListingChatNavigation Core loadNavModels Failed").error("Listing is not attaches"),Promise.resolve())},e.owner=n,e}return(0,o.C6)(n,t),n.prototype.init=function(){var t=this;u.A.getState().isMobile?(0,r._b)("ListingChatNavigation Desktop init Failed").error("Mobile detect"):(d(document).on("click",".js-next_chat_room",function(n){n.preventDefault(),t.owner.nextRoom()}),d(document).on("click",".js-prev_chat_room",function(n){n.preventDefault(),t.owner.prevRoom()}))},n.prototype.onNextRoom=function(){return(0,o.sH)(this,void 0,void 0,function(){return(0,o.YH)(this,function(t){switch(t.label){case 0:return this.owner.navDataExpired?[4,this.owner.loadNavModels()]:[3,2];case 1:return t.sent(),u.A.action(c.oy)(1),[3,3];case 2:u.A.action(c.oy)(1),this.owner.navData[this.owner.currentChathostIndex+2]||this.owner.loadNavModels(),t.label=3;case 3:return this.owner.currentChathostIndex+=1,this.owner.navData[this.owner.currentChathostIndex]||(this.owner.currentChathostIndex+=1),[2]}})})},n.prototype.onPrevRoom=function(){return(0,o.sH)(this,void 0,void 0,function(){return(0,o.YH)(this,function(t){switch(t.label){case 0:return this.owner.navDataExpired?[4,this.owner.loadNavModels()]:[3,2];case 1:return t.sent(),u.A.action(c.oy)(-1),[3,3];case 2:u.A.action(c.oy)(-1),this.owner.navData[this.owner.currentChathostIndex-2]||this.owner.loadNavModels(),t.label=3;case 3:return this.owner.currentChathostIndex-=1,this.owner.navData[this.owner.currentChathostIndex]||(this.owner.currentChathostIndex-=1),[2]}})})},n}(i.p)}}]);