import{d as N,u as $,b as M,e as r,o as C,h as b,j as c,t as g,F as A,r as F,i as P,k as _,m as R,B as V,_ as j,P as i,a as K,b4 as W,aT as q,l as O,w as Y}from"./vmckNi95.js";import{_ as z}from"./1EgUpRxG.js";import{_ as J}from"./DWIFtxsD.js";import{u as Q}from"./BN53Xkbe.js";const U=["dir","href","data-click-id"],X={class:"h-plan-card__top-container"},Z={class:"h-plan-card__texts"},ee={class:"h-plan-card__title"},te={class:"t-body-3 h-plan-card__description"},ae={class:"h-plan-card__features-list"},se={class:"h-plan-card__bottom-container"},ne={class:"t-body-4"},oe=N({__name:"HPlanCard",props:{data:{type:Object,required:!0}},setup(a){const{themeData:l,direction:k,pageNameDataClickId:v}=$(),{t:n}=M(),e=a,o=r(()=>!!(e.data.price&&e.data.title)),p=r(()=>["BR","LT"].includes(l.value.country.code));return(f,y)=>{const x=V,w=z;return o.value?(C(),b("a",{key:0,class:"h-plan-card",dir:_(k),href:a.data.link,"data-click-id":`hgr-${_(v)}-plan_card-${a.data.dataClickId}`},[c("div",X,[c("div",Z,[c("h3",ee,g(a.data.title),1),c("span",te,g(a.data.description),1)]),c("div",ae,[(C(!0),b(A,null,F(a.data.features,(u,H)=>(C(),b("div",{key:`${u}-${H}`,class:"h-plan-card__list-item"},[P(x,{icon:"ui-icons/ic-check"}),c("span",null,g(u),1)]))),128))])]),c("div",se,[c("span",ne,g(_(n)("components.planCards.priceFrom")),1),P(w,{price:a.data.price,"country-code":_(l).country.code||a.data.countryCode,"typography-classes":{currency:"t-h5",number:"t-h5",suffix:"t-h5"},suffix:a.data.priceSuffix,"show-asterisk":p.value},null,8,["price","country-code","suffix","show-asterisk"])])],8,U)):R("",!0)}}}),ce=j(oe,[["__scopeId","data-v-619cdcbb"]]),pe=N({__name:"HPlanCards",props:{title:{type:String,default:""},text:{type:String,default:""}},setup(a){const l=[i.SharedAndCloudGroupedNew,i.SharedHostingGrouped4Products,i.SharedAndCloudGroupedWordpress,i.CloudHostingGrouped,i.VpsKvmHosting,i.HostingerEmailHosting],{pageName:k,themeData:v}=$(),{getRouteLink:n}=K(),{t:e}=M(),{pricingTableRawData:o}=Q(l),p=a,f=r(()=>{var t,s,d,m,h,T,I,S,G,B,E,L;return{shared:((s=(t=o.value.sharedAndCloudGroupedNew)==null?void 0:t.products[0])==null?void 0:s.price.purchase)||0,wordpress:((m=(d=o.value.sharedAndCloudGroupedWordpress)==null?void 0:d.products[0])==null?void 0:m.price.purchase)||0,cloud:((T=(h=o.value.cloudHostingGrouped)==null?void 0:h.products[0])==null?void 0:T.price.purchase)||0,kvm:((S=(I=o.value.vpsKvmHosting)==null?void 0:I.products[0])==null?void 0:S.price.purchase)||0,hostingerEmailHosting:((B=(G=o.value.hostingerEmailHosting)==null?void 0:G.products[0])==null?void 0:B.price.purchase)||0,hostingerMail:((L=(E=o.value.hostingerEmailHosting)==null?void 0:E.products[0])==null?void 0:L.price.purchase)||0}}),y=r(()=>W()),x=r(()=>({title:p.title||e("components.planCards.title"),text:p.text,cards:u()})),w=r(()=>{const t=["shared","cloud","kvm","wordpress","domain"],s=q.hostingerMailLocales.includes(v.value.language.code)?"hostingerMail":"hostingerEmailHosting";return t.push(s),t}),u=()=>{const t=[];for(const s of w.value)(D(s).excludePages||[]).includes(k.value)||t.push(H(s));return t},H=t=>{var s;return{...D(t),price:f.value[t]||((s=y.value[t])==null?void 0:s.price.purchase)||0,priceSuffix:e(`global.${t==="domain"?"perYear":"perMonth"}`)}},D=t=>{switch(t){case"kvm":return{title:e("components.planCards.vpsTitle"),description:e("components.planCards.vpsDescription"),dataClickId:"vps",link:n("vps-hosting")};case"hostingerEmailHosting":return{title:e("components.planCards.emailTitle"),description:e("components.planCards.emailDescription"),dataClickId:"email",link:n("email-hosting"),excludePages:["email-hosting"]};case"hostingerMail":return{title:e("components.planCards.emailTitle"),description:e("components.planCards.emailDescription"),dataClickId:"email",link:n("email-hosting"),excludePages:["email-hosting"]};case"cloud":return{title:e("components.planCards.cloudTitle"),description:e("components.planCards.cloudDescription"),dataClickId:"cloud",link:n("cloud-hosting")};case"domain":return{title:e("components.planCards.domainsTitle"),description:e("components.planCards.domainsDescription"),dataClickId:"domains",link:n("domain-name-search")};case"wordpress":return{title:e("components.planCards.wordpressTitle"),description:e("components.planCards.wordpressDescription"),dataClickId:"wordpress",link:n("wordpress-hosting"),excludePages:["wordpress-hosting"]};case"shared":return{title:e("components.planCards.webHostingTitle"),description:e("components.planCards.webHostingDescription"),dataClickId:"shared",link:n("web-hosting"),excludePages:["web-hosting","cheap-web-hosting","domain-name-search"]};default:return{title:"",description:"",dataClickId:"",link:""}}};return(t,s)=>{const d=ce,m=J;return C(),O(m,{data:x.value},{items:Y(({item:h})=>[P(d,{data:h},null,8,["data"])]),_:1},8,["data"])}}});export{pe as _};
