import{C as e,Dt as t,H as n,I as r,It as i,N as a,O as o,Q as s,S as c,Wt as l,bt as u,cn as d,in as f,j as p,k as m,mt as h,tt as g,w as _,x as v}from"./_plugin-vue_export-helper-BVhEvvHC.js";import{Ni as y,ar as b,kn as x}from"./src-CD6Jsigc.js";import{D as S,X as C,b as w,k as T,r as E,x as D}from"./dist-CFDfEV9u.js";import{r as O,t as k}from"./axios-DSyjHw-i.js";import{t as A}from"./useFeatureNames-x1xeIENn.js";import{t as j}from"./sessionSettingStore-ZHUB-lwo.js";import{a as M,i as N,l as P,n as F,o as I,r as L,s as R,t as z}from"./alert-dialog-R0_ON7dy.js";r(),u(),l();var B=p({__name:`HoverCard`,props:{defaultOpen:{type:Boolean},open:{type:Boolean},openDelay:{},closeDelay:{}},emits:[`update:open`],setup(t,{emit:n}){let r=T(t,n);return(t,n)=>(s(),e(i(S),f(a(i(r))),{default:h(()=>[g(t.$slots,`default`)]),_:3},16))}});r(),u(),l();var V=p({__name:`HoverCardTrigger`,props:{asChild:{type:Boolean},as:{}},setup(t){let n=t;return(t,r)=>(s(),e(i(E),f(a(n)),{default:h(()=>[g(t.$slots,`default`)]),_:3},16))}});r(),u();var H=p({__name:`HoverCardContent`,props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){let r=t,a=v(()=>{let{class:e,...t}=r;return t}),o=D(a);return(t,a)=>(s(),e(i(w),null,{default:h(()=>[m(i(C),n(i(o),{class:i(y)(`z-50 w-64 select-none rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,r.class)}),{default:h(()=>[g(t.$slots,`default`)]),_:3},16,[`class`])]),_:3}))}});r(),u(),l();var U={class:`text-sm font-medium`},W=p({inheritAttrs:!1,__name:`FeatureButton`,props:{requiredFeature:{},variant:{default:`default`}},emits:[`click`],setup(r,{emit:a}){let l=r,u=a,f=j(),{t:p}=O({useScope:`global`}),{featureName:y}=A(),S=t(!1),C=v(()=>!l.requiredFeature||f.hasFeature(l.requiredFeature)),w=v(()=>!C.value),T=v(()=>y(l.requiredFeature)),E=v(()=>w.value?`secondary`:l.variant);function D(e){C.value?u(`click`,e):S.value=!0}function W(){console.log(`Opening plans page...`),S.value=!1,k.post(`/account/plan/open`).catch(e=>console.error(`Failed to open plans page:`,e))}function G(){S.value=!1}return(t,r)=>(s(),e(i(P),{open:S.value,"onUpdate:open":r[0]||=e=>S.value=e},{default:h(()=>[m(i(B),{"open-delay":200},{default:h(()=>[m(i(V),{"as-child":``},{default:h(()=>[m(i(b),n({onClick:D,variant:E.value,class:{"opacity-60":w.value}},t.$attrs),{default:h(()=>[g(t.$slots,`default`),w.value?(s(),e(i(x),{key:0,class:`ml-2 h-4 w-4`})):_(``,!0)]),_:3},16,[`variant`,`class`])]),_:3}),w.value?(s(),e(i(H),{key:0,class:`w-auto p-2`,align:`center`},{default:h(()=>[c(`p`,U,d(i(p)(`featureGate.upgradeTitle`)),1)]),_:1})):_(``,!0)]),_:3}),m(i(R),null,{default:h(()=>[m(i(I),null,{default:h(()=>[m(i(M),null,{default:h(()=>[o(d(i(p)(`featureGate.upgradeTitle`)),1)]),_:1}),m(i(N),null,{default:h(()=>[o(d(i(p)(`featureGate.upgradeDescription`,{feature:T.value})),1)]),_:1})]),_:1}),m(i(L),null,{default:h(()=>[m(i(z),{onClick:G},{default:h(()=>[o(d(i(p)(`button.cancel`)),1)]),_:1}),m(i(F),{onClick:W},{default:h(()=>[o(d(i(p)(`featureGate.viewPlans`)),1)]),_:1})]),_:1})]),_:1})]),_:3},8,[`open`]))}});export{B as i,H as n,V as r,W as t};