"use strict";(this.webpackChunk_tsmesolutions_cubes_ui=this.webpackChunk_tsmesolutions_cubes_ui||[]).push([[7286],{87286:(e,n,t)=>{t.r(n),t.d(n,{default:()=>u});var o=t(24590),i=["disbled","aria-label"],a={value:Boolean,onText:String,offText:String,offActionText:String,onActionText:String,toggle:{type:Function,require:!0}},l=(0,o.defineComponent)({inheritAttrs:!1,props:a,setup:function(e){var n=(0,o.toRefs)(e),t=n.value,i=n.onText,a=n.offText,l=n.onActionText,r=n.offActionText,u=n.toggle,c=(0,o.ref)(!1);return{label:(0,o.computed)(function(){return t.value?i.value:a.value}),actionLabel:(0,o.computed)(function(){return t.value?l.value:r.value}),isLoading:c,invokeToggle:function(){c.value=!0,u.value(t.value).finally(function(){c.value=!1})}}}});const r=l,u=(0,t(66262).A)(r,[["render",function(e,n,t,a,l,r){var u=(0,o.resolveComponent)("v-spinner"),c=(0,o.resolveDirective)("fake-link");return(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createElementBlock)("a",{disbled:e.isLoading,class:(0,o.normalizeClass)([{"badge-success":e.value,"badge-danger":!e.value},"badge badge-pill mr-2 pl-2 tip tip-top font-weight-normal"]),"aria-label":e.actionLabel,onClick:n[0]||(n[0]=function(n){return e.invokeToggle()})},[e.isLoading?((0,o.openBlock)(),(0,o.createBlock)(u,{key:0,accent:"primary",class:"mx-3 spinner-border-sm"})):((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:1},[(0,o.createTextVNode)((0,o.toDisplayString)(e.label),1)],64))],10,i)),[[c]])}]])}}]);