"use strict";var y=Object.create;var a=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var C=Object.getPrototypeOf;var P=Object.prototype.hasOwnProperty;var h=(i,e)=>a(i,"name",{value:e,configurable:true});var W=(i,e)=>{for(var s in e)a(i,s,{get:e[s],enumerable:true})};var p=(i,e,s,t)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let r of A(e))if(!P.call(i,r)&&r!==s)a(i,r,{get:()=>e[r],enumerable:!(t=S(e,r))||t.enumerable})}return i};var D=(i,e,s)=>(s=i!=null?y(C(i)):{},p(e||!i||!i.__esModule?a(s,"default",{value:i,enumerable:true}):s,i));var T=i=>p(a({},"__esModule",{value:true}),i);var b=(i,e,s,t)=>{var r=t>1?void 0:t?S(e,s):e;for(var d=i.length-1,g;d>=0;d--)if(g=i[d])r=(t?g(e,s,r):g(r))||r;if(t&&r)a(e,s,r);return r};var z={};W(z,{default:()=>U});module.exports=T(z);var l=require("react/jsx-runtime");var u=require("mobx-react");var m=require("react");var I=D(require("./TabBarSortableList"));let n=class extends m.Component{onSortEnd=({oldIndex:e,newIndex:s})=>{const{enableToolTip:t,reorder:r}=this.props;t();r({oldIndex:e,newIndex:s})};shouldPreventSorting=e=>e.target.tagName!=="LI";toggleService=e=>{const{updateService:s}=this.props;if(e.serviceId){s({serviceId:e.serviceId,serviceData:{isEnabled:e.isEnabled,isMediaPlaying:false},redirect:false})}};disableService({serviceId:e}){this.toggleService({serviceId:e,isEnabled:false})}enableService({serviceId:e}){this.toggleService({serviceId:e,isEnabled:true})}hibernateService({serviceId:e}){if(e){this.props.hibernateService({serviceId:e})}}wakeUpService({serviceId:e}){if(e){this.props.wakeUpService({serviceId:e})}}render(){const{services:e,setActive:s,openSettings:t,disableToolTip:r,reload:d,toggleNotifications:g,toggleAudio:M,toggleDarkMode:f,deleteService:w,clearCache:E,useHorizontalStyle:v,showMessageBadgeWhenMutedSetting:k,showServiceNameSetting:x,showMessageBadgesEvenWhenMuted:N}=this.props;const c=v?"x":"y";return(0,l.jsx)("div",{className:"sidebar__services",children:(0,l.jsx)(I.default,{services:e,setActive:s,onSortEnd:this.onSortEnd,onSortStart:r,shouldCancelStart:this.shouldPreventSorting,reload:d,toggleNotifications:g,toggleAudio:M,toggleDarkMode:f,deleteService:w,clearCache:E,disableService:o=>this.disableService(o),enableService:o=>this.enableService(o),hibernateService:o=>this.hibernateService(o),wakeUpService:o=>this.wakeUpService(o),openSettings:t,distance:20,axis:c,lockAxis:c,helperClass:"is-reordering",showMessageBadgeWhenMutedSetting:k,showServiceNameSetting:x,showMessageBadgesEvenWhenMuted:N,useHorizontalStyle:v})})}};h(n,"TabBar");n=b([u.observer],n);var U=n;
