import{d as p,G as m,es as w,H as T,W as k,o as h,a as C,b as c,d2 as i,e as _,u as g,aL as u,eu as v,bu as I,ez as $,ew as A,c as L,b0 as B,eA as D,v as y,X as E,ak as U,al as M,eP as S,J as V,L as x}from"./registerWidgets.e46eca28.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="8407b851-cf90-493e-97a2-d53229593dd2",a._sentryDebugIdIdentifier="sentry-dbid-8407b851-cf90-493e-97a2-d53229593dd2")}catch{}})();const N={class:"tab-menu"},z={class:"tabs"},H={key:0,class:"group"},j={class:"group"},F=["onClick"],G={key:1,class:"group"},J={class:"content"},P=p({__name:"TabMenuUnderline",setup(a){const e=m([]),o=w(),r=s=>{const t=d=>d==s;e.forEach((d,n)=>{d.isActive=t(n)})},l=T(()=>e.findIndex(s=>s.isActive));return k("addTab",s=>{e.push(s)}),h(()=>{r(0)}),(s,t)=>{const d=C("icon");return c(),i("div",N,[_("div",z,[g(o).left?(c(),i("div",H,[u(s.$slots,"left",{},void 0,!0)])):v("",!0),_("div",j,[(c(!0),i(I,null,$(e,(n,b)=>(c(),i("button",{key:n.title,class:A(["form-tab",l.value==b&&"active"]),onClick:Y=>r(b)},[n.icon?(c(),L(d,{key:0,path:n.icon,fill:"#8692A5",width:"10",height:"10"},null,8,["path"])):v("",!0),B(" "+D(n.title),1)],10,F))),128))]),g(o).right?(c(),i("div",G,[u(s.$slots,"right",{},void 0,!0)])):v("",!0)]),_("div",J,[u(s.$slots,"default",{},void 0,!0)])])}}});const K=y(P,[["__scopeId","data-v-60b2affa"]]),R={class:"tab"},W=p({__name:"Tab",props:{title:{},icon:{}},setup(a){const e=a,o=m({isActive:!1,title:e.title,icon:e.icon}),r=E("addTab");return h(()=>{r(o)}),(l,s)=>U((c(),i("div",R,[u(l.$slots,"default",{},void 0,!0)],512)),[[M,o.isActive]])}});const O=y(W,[["__scopeId","data-v-9c2e92c2"]]),X={class:"unsaved-changes-handler"},f="You have unsaved changes. Are you sure you want to leave?",Q=p({__name:"UnsavedChangesHandler",props:{hasChanges:{type:Boolean}},setup(a){const e=a,o=t=>(t=t||window.event,t&&(t.returnValue=f),f),r=()=>{window.addEventListener("beforeunload",o)};S((t,d,n)=>{if(!e.hasChanges)return n();confirm(f)?n():n(!1)});const l=()=>window.removeEventListener("beforeunload",o),s=t=>t?r():l();return V(()=>e.hasChanges,s),h(()=>s(e.hasChanges)),x(l),(t,d)=>(c(),i("div",X))}});export{K as T,Q as _,O as a};
//# sourceMappingURL=UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.27db324e.js.map
