1import{R as T,r as O,j as t}from"./react-vendor.C9yQFog-.js";import{c as F,s as U,j as Y,d as q,e as z}from"./Utils.y_yiXN_g.js";import{o as d}from"./Display.0Mh_IIjo.js";import{a as u}from"./index.B8_nURbH.js";import"./index.C7pGb7eu.js";import"./Button.CBPR3Ga3.js";import"./Loader.TR69ea4F.js";import"./VehicleFeatureIcons.DZIolgFF.js";import"./SystemIcons.E8fM-0Px.js";import"./Paragraph.BLxUjZ0I.js";import"./SkeletonLoader.T6A-mfNQ.js";import"./Tag.DLEIXLZ-.js";import"./CurrencyFormatUtils.DDv-LpEJ.js";const os=j=>{const{componentId:R,title:_,description:b,footer:K,marketId:p,orgKey:m,orgName:N,savings:w,language:$,currency:g,presalesPlanApi:h,membershipPlanApi:f,membershipPlanConsumerApi:y,displayAnnualPlan:C}=j,{useState:i}=T,[v,x]=i(!1),[B,D]=i({}),[L,M]=i([]),[k,I]=i(90),S=(o,c)=>o.planCards.map(e=>({...c.find(a=>{const l=a.planKey===e.planKey,n=a.term.toLowerCase()===e.term.toLowerCase(),r=a.planType===e.segment;return l&&a||n&&r&&a}),...e})),A=o=>o.map(c=>z(c));O.useEffect(()=>{const o=(s,e)=>{const a=S(s,e);x(!1),D(s),M(a)};(async()=>{x(!0);try{const s=await u.get(`${h}/${m}`),e=await u.get(`${f}/${m}/plans`);if(C.toLowerCase()==="yes"){const r=(await u.get(`${y}/${p}`)).data.find(P=>P.term==="Y");e.data.push(r),I(r==null?void 0:r.price)}else s.data[0].planCards=s.data[0].planCards.filter(n=>n.planKey!=="standard"),s.data[0].planCards=s.data[0].planCards.filter(n=>n.planKey!=="standard_high");const a=s.data[0],l=A(e.data);o(a,l)}catch(s){console.log(s)}})()},[f,m,h,C,p,y]);const E=F(L,g,k,p);return t.jsx("div",{"data-testid":R,className:"university-pricing",children:t.jsxs("div",{children:[t.jsxs("header",{className:"university-pricing__header",children:[d(_,"h2"),t.jsx("div",{className:"university-pricing__description",children:d(U(b,N,w,$,g),"div")})]}),t.jsx("div",{className:"pricing__content",children:t.jsx(Y,{planCards:v?q():E,loading:v})}),t.jsx("footer",{className:"university-pricing__footer",children:d(K,"div")})]})})};export{os as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.