import{d as f,c as l,o as s,w as t,a9 as p,e as i,u as a,f as T,aq as u,n as r,b as m,i as C,t as d,ad as c}from"./Bxv1kRJt.js";import{a as k,b,T as B}from"./Dxmk8VbU.js";const N=["data-state","disabled"],O={key:0,class:"sr-only"},R=f({inheritAttrs:!1,__name:"UiEditorToggle",props:{pressed:{type:Boolean,default:!1},disabled:{type:Boolean},tooltip:{},onClick:{},offset:{default:4},classRoot:{}},setup(y){return(e,o)=>(s(),l(a(B),{class:r(e.classRoot)},{default:t(()=>[p(a(k),{class:"TOOLTIP_TRIGGER"},{default:t(()=>[T("button",{"data-state":e.pressed?"on":"off",disabled:e.disabled?!0:void 0,class:r(e.$attrs.class||"TOGGLE_BUTTON"),onClick:o[0]||(o[0]=(...n)=>e.onClick&&e.onClick(...n)),onMousedown:o[1]||(o[1]=u(()=>{},["prevent"]))},[m(e.$slots,"default"),e.tooltip?(s(),C("span",O,d(e.tooltip),1)):i("",!0)],42,N)]),_:3}),e.tooltip&&!e.disabled?(s(),l(a(b),{key:0,offset:e.offset,class:"TOOLTIP_CONTENT"},{default:t(()=>[c(d(e.tooltip),1)]),_:1},8,["offset"])):i("",!0)]),_:3},8,["class"]))}});export{R as _};
