import{d as U,u as j,x as y,f as B,v as b,az as h,e as c,o as t,F as C,a as r,l as u,c as k,m as a,w as s,b as n,t as l,A as S,s as x,n as V}from"./Dk4AzF7j.js";import{_ as z}from"./BnFHREeV.js";import{_ as A}from"./B_jJHUd2.js";const D={class:"text-center text-sm capitalize o_px-2 rounded-sm outline-1 outline-uiBorder self-center bg-uiBg max-w-28","data-testid":"subscription-sku"},R={key:0,class:"grid-projectDetails__role self-center"},F={class:"o_p-2 text-sm text-uiText-toned max-w-[280px]"},G={key:0},O={class:"o_mb-3 text-pretty"},E={class:"flex justify-center","data-testid":"plan-tag-popover"},I="pro",q=U({__name:"PlanTag",props:{skuName:{},wannaUpsell:{type:Boolean,default:!0},ownerProject:{},datatestId:{}},setup(g){const p=g,N=j(),m=y(),{policyGuard:d}=B(),P=()=>{p.ownerProject&&(m.currentPid=p.ownerProject.pid,m.currentSid=p.ownerProject.sid),N.setActiveSlideover("showUpgradeCurrentProject"),o.value=!1},o=b(!1),[v,_]=h();return(e,f)=>{const $=x,w=z,T=A;return t(),c(C,null,[r(a(v),null,{default:s(({skuName:i})=>[n("div",D,l(e.$t(`planNames.${i}.name`)),1)]),_:1}),a(d)("dashboard.projectBar.planTagUpsell",{trackingContext:{components:"PlanTag"}})?(t(),c("div",R,[r(T,{open:a(o),"onUpdate:open":f[0]||(f[0]=i=>S(o)?o.value=i:null),arrow:"",content:{align:"end",side:"bottom"}},{content:s(()=>[n("div",F,[e.skuName==="pro"||!e.wannaUpsell?(t(),c("p",G,l(e.$t("plantags.description",{name:e.$t(`planNames.${e.skuName}.name`)})),1)):e.wannaUpsell?(t(),k(w,{key:1,ui:{root:"p-00 o_p-2"},variant:"subtle",color:"info"},{description:s(()=>[n("div",null,[n("p",O,l(e.$t("plantags.upsell",{name:e.$t(`planNames.${e.skuName}.name`)})),1),n("div",E,[r($,{variant:"solid",color:"primary",size:"sm",onClick:P},{default:s(()=>[V(l(e.$t("plantags.upsellButton",{name:e.$t(`planNames.${I}.name`)})),1)]),_:1})])])]),_:1})):u("",!0)])]),default:s(()=>[r(a(_),{"sku-name":e.skuName},null,8,["sku-name"])]),_:1},8,["open"])])):u("",!0),a(d)("dashboard.projectBar.planTag",{trackingContext:{components:"PlanTag"}})?(t(),k(a(_),{key:1,"sku-name":e.skuName},null,8,["sku-name"])):u("",!0)],64)}}}),L=Object.assign(q,{__name:"PlanTag"});export{L as P};
