import{j as U,s as h,v as D,m as A,x as M,y as b,h as V,l as k}from"./index-sLCKmIWG-B5BYNF2N.js";import{r as f,D as S,a3 as P,w as y,l as g,C,H as E,a4 as T,a5 as R,a6 as K}from"./filter-CdAXK93b.js";const L={install(s,e){const u=(e==null?void 0:e.components)??{};s.provide(U,f(u))}},N={install(s){const e=f([]),u=()=>{e.value.splice(0,e.value.length)};s.provide(h,{items:e,reset:u})}},x={install(s){const e=f(new Map),u=()=>{let l=()=>{};return{value:new Promise(t=>{l=t}),resolve:l}},i=l=>[u(),l||Symbol("Modals controller"),!0],_=(l={})=>{var o;const t=S(l.props),[r,a,v]=i((o=t.value)==null?void 0:o.id);return e.value.set(a,{component:l.component?P(l.component):void 0,props:{...t.value,_isConfirm:!1,_promise:r,_modelValue:v}}),y(t,p=>{const c=e.value.get(a);c&&e.value.set(a,{component:l.component?P(l.component):void 0,props:{...c.props,...p}})}),r.value},d=(l={})=>{var o;const t=S(l.props),[r,a,v]=i((o=t.value)==null?void 0:o.id);return e.value.set(a,{component:l.component?P(l.component):void 0,props:{...t.value,_isConfirm:!0,_promise:r,_modelValue:v}}),y(t,p=>{const c=e.value.get(a);c&&e.value.set(a,{component:l.component?P(l.component):void 0,props:{...c.props,...p}})}),r.value},m=l=>{const o=e.value.get(l);o!=null&&o.props&&(o.props={...o.props,_modelValue:!1})},n=l=>{e.value.delete(l)};s.provide(D,{modals:e,remove:n,show:_,confirm:d,leave:m})}},B={install(s){const e=f(new Map),u=g(()=>e.value.size),i=g(()=>[...e.value.values()]),_=g(()=>i.value[i.value.length-1]),d=t=>{e.value.set(t.uid,t)},m=t=>{e.value.delete(t.uid)},n=f(new Map),l=t=>{n.value.set(t.uid,t)},o=t=>{n.value.delete(t.uid)};s.provide(A,{countStack:u,lastStack:_,registry:C(n),stack:i,pushStack:d,removeStack:m,pushRegistry:l,removeRegistry:o})}},w={install(s){const e=f(new Map),u=o=>{var t;const r=S(o),a=((t=r.value)==null?void 0:t.id)||Symbol("Popover controller");return y(r,v=>{e.value.set(a,{...v,...typeof v.modelValue<"u"&&T(o)?{"onUpdate:modelValue":p=>{var c;(c=v["onUpdate:modelValue"])==null||c.call(v,p),o.value.modelValue=p}}:{}})},{immediate:!0,deep:!0}),R(()=>e.value.delete(a),!0),a},i=(o,t)=>{const r=e.value.get(o);r&&e.value.set(o,{...r,...E(t)})},_=o=>e.value.delete(o),d=f(new Map),m=o=>{var t;const r=S(o),a=((t=r.value)==null?void 0:t.id)||Symbol("Tooltip controller");return y(r,v=>{e.value.set(a,{...v,...typeof v.modelValue<"u"&&T(o)?{"onUpdate:modelValue":p=>{var c;(c=v["onUpdate:modelValue"])==null||c.call(v,p),o.value.modelValue=p}}:{}})},{immediate:!0,deep:!0}),R(()=>d.value.delete(a),!0),a},n=(o,t)=>{const r=d.value.get(o);r&&d.value.set(o,{...r,...E(t)})},l=o=>d.value.delete(o);s.provide(M,{popovers:e,tooltips:d,tooltip:m,popover:u,setPopover:i,setTooltip:n,removePopover:_,removeTooltip:l})}},H={install(s,e){var u,i;const m=typeof(e==null?void 0:e.rtl)=="boolean"?!1:((u=e==null?void 0:e.rtl)==null?void 0:u.rtlInitial)??!1,n=typeof(e==null?void 0:e.rtl)=="boolean"?void 0:((i=e==null?void 0:e.rtl)==null?void 0:i.localeInitial)??void 0,l=f(m),o=f(n);s.provide(b,{isRtl:l,locale:o})}},Y="top-end",z={install(s){const e=f([]),u=f(!1),i=n=>{u.value=n},_=(n={})=>{var l,o,t,r;const a=S(n.props),v=((l=a.value)==null?void 0:l.id)||Symbol("Toast controller"),p={component:n.component?P(n.component):void 0,props:{...a.value,pos:((o=a.value)==null?void 0:o.pos)||Y,_modelValue:((t=a.value)==null?void 0:t.value)||5e3,_self:v}};return(((r=a.value)==null?void 0:r.appendToast)!==void 0?a.value.appendToast:u.value)?e.value.push(p):e.value.unshift(p),y(a,c=>{const I=e.value.findIndex(O=>O.props._self===v);I!==-1&&e.value.splice(I,1,{component:n.component?P(n.component):void 0,props:{...e.value[I].props,...c,_modelValue:(c==null?void 0:c.value)||e.value[I].props._modelValue||5e3}})}),v},d=n=>{e.value=e.value.filter(l=>l.props._self!==n)},m=n=>{const l=e.value.findIndex(o=>o.props._self===n);l!==-1&&e.value.splice(l,1,{component:e.value[l].component?P(e.value[l].component):void 0,props:{...e.value[l].props,_modelValue:!1}})};s.provide(V,{_setIsAppend:i,toasts:e,show:_,remove:d,leave:m})}},F={install(s){const e=K({}),u=({id:i,value:_,toggle:d,show:m,hide:n})=>(e[i]=g(()=>({value:_.value,toggle:d,show:m,hide:n})),{unregister(){delete e[i]}});u.map=C(e),s.provide(k,u)}},G=(s={})=>({install(e){(s.breadcrumb??!0)&&e.use(N),(s.modalController??!0)&&e.use(x),(s.modalManager??!0)&&e.use(B),((s.rtl??!0)||typeof s.rtl=="object")&&e.use(H,s),(s.toast??!0)&&e.use(z),(s.popover??!0)&&e.use(w),e.use(F),e.use(L,s)}}),W={DISCUSSED:"Discussed",READY:"Ready",PROPOSED:"Proposed",TO_BE_DISCUSSED:"To be discussed",IN_DISCUSSION:"In discussion",PUBLISHED:"Published",OBSOLETE:"Obsolete",EXTERNAL:"External",PRE_PROPOSED:"Pre-proposed"},X={CURATION_STATUS:"Curation status",TO_BE_REVIEWED_BY:"To be reviewed by",CURATOR:"Curator",ID:"ID",E_CIGO:"E-CigO",FUZZY_SET:"Fuzzy set",RELATIONSHIP_TYPE:"Relationship type",LABEL:"Label"};export{X as C,W as a,G as c};
//# sourceMappingURL=constants-DL6Hx3V0.js.map
