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