import{_ as C}from"./Button.CpdQ1HRJ.js";import{_ as A}from"./CTADropdown.vue.BXGekoMC.js";import{f as N,h as P,q as w,g as B,r as k,i as E,s as T,P as D,o as u,c as p,j as l,a as t,b as c,w as _,d as f,t as g,m as $}from"./entry.DV6a5_Hb.js";import{u as U}from"./fetch.Bb5GbrhF.js";import{u as j}from"./asyncData.StC_7AGX.js";import{u as V}from"./useDatalayer.DeAqW70C.js";import{_ as M}from"./Modal.vue.D29_Gtp-.js";const S={class:"gap-4 lg:gap-20 grid grid-cols-1 lg:grid-cols-2"},H={key:0,class:"price"},L={class:"mb-0 font-bold text-[32px]"},R=t("span",{class:"relative -left-1 text-xl sm:text-base"},"/mês ",-1),X={class:"relative -top-1 sm:top-0 text-[10px] leading-none"},q={class:"gap-2 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-1 text-xl"},F={class:"relative"},G={class:"relative"},ee=N({__name:"PriceAndCTA",props:{Name:{},OldPrice:{},Price:{},Disclaimer:{},BtnAreaCandidato:{},ButtonsSignUp:{}},setup(v){const h=P(),x=w.get(B().public.ie),a=k(""),r=v,s=j("price",async()=>(await U(`${x.url}/wp-json/courses/v1/offers/?dt=2/4&course_slug=medicina&modality_slug=presencial&modality=Presencial`,{method:"GET",headers:{"Content-Type":"application/json","X-Api-Key":"HdAPoQ&%e2X1d45xE3*aT*"}},"$1L8009UHTx")).data.value);async function d(){(await s.data.value).forEach(e=>{var o,n,i;Array.isArray(s.data.value)&&s.data.value.length===1&&(a.value=s.data.value[0].valor_de),e.unidade.nome.includes("(")?(((o=e.unidade.nome.match(/\(([^)]+)\)/i))==null?void 0:o[1])||"")===((n=r.Name)==null?void 0:n.trim())&&(a.value=e.valor_de):e.unidade.nome.trim()===((i=r.Name)==null?void 0:i.trim())&&(a.value=e.valor_de)})}E(()=>r.Name,()=>{d()}),T(()=>{d()});function y(){h.open(M,{template:"Accordion"})}const{trackEvent:b}=V();return(e,o)=>{const n=D("money"),i=C,m=A;return u(),p("div",S,[l(a)?(u(),p("div",H,[t("p",L,[c(n,{class:"block min-w-max font-extrabold text-[40px] text-[var(--light-tertiary)]"},{default:_(()=>[f(g("R$ "+l(a))+" ",1),R]),_:1})]),t("small",X,g(e.Disclaimer),1)])):$("",!0),t("menu",q,[t("li",F,[c(i,{onClick:o[0]||(o[0]=J=>(y(),l(b)({event:"measure_click_unidade",content:"Botao de Editais e resultados da unidade"}))),class:"justify-center hover:bg-[var(--light-hover-outline)] p-5 sm:p-4 rounded-lg w-full h-100 font-bold text-[var(--light-primary)] text-base sm:text-sm hover:text-[var(--light-primary)] no-underline !leading-none !outline-none",variant:"outline",color:"light-primary"},{default:_(()=>[f(" Editais e resultados ")]),_:1})]),t("li",G,[c(m,{label:"Inscreva-se Já!",buttons:e.ButtonsSignUp,gtmLocal:"unidades",style:"units"},null,8,["buttons"])])])])}}});export{ee as _};