1import{u as h}from"./EV4JFeiC.js";import{u as k}from"./bl4g07IH.js";import{c as b,o as g,p as A}from"./Di4AxDXO.js";import{a1 as C,af as x,cC as V,c as w,ah as e,M as c,N as i,al as t,aJ as E,ag as n,ak as m,a5 as o}from"./Czd9XnOY.js";import"./46BuY3JG.js";import"./D2YvfBZE.js";import"./lB1Aae7P.js";import"./BJfU8DFO.js";import"./DRNKrJGC.js";import"./D2kFVVdL.js";import"./DyayeFCn.js";import"./DFfHoBKH.js";import"./DINNOrF0.js";import"./CPIt6tsr.js";import"./Dp-VqxDQ.js";import"./CY-HIaCL.js";import"./ubaDBVG5.js";import"./B_sB1hos.js";const F={key:0,class:"pdp-v2-price"},N={key:0,class:"unavailable pdp-v2-price__unavailable"},B={class:"flex pdp-v2-price__row"},j={class:"pdp-v2-price__amount"},D={key:0},I={key:0},O={key:1},q={key:0,class:"pdp-v2-price__compare"},J={key:1,class:"pdp-v2-price__discount"},L={key:0,class:"ec-subscription-pills-container pdp-v2-price__pills"},M={class:"ec-subscription-pill ec-subscription-pill--pdp"},S={key:0,class:"ec-subscription-pill ec-subscription-pill--pdp"},T={key:1,class:"ec-subscription-description pdp-v2-price__setup-fee"},U=C({__name:"Price",props:{element:{type:Object,required:!0}},async setup(W){let l,u;const{t:s,locale:v}=x(),{formatPriceWithLocale:P}=k(v),{product:a,selectedPrice:r,initPdpV2Product:f}=h();[l,u]=V(()=>f()),await l,u();const y=w(()=>{if(!(!a.value||!r.value))return{...a.value,compareAtPrice:r.value.compareAtPrice??a.value.compareAtPrice,selectedPrice:r.value}}),p=_=>A(_,{item:y.value,currency:r.value?.currency},P);return(_,d)=>e(a)&&e(r)?(c(),i("div",F,[e(b)(e(r))?(c(),i("p",N,t(e(s)("ecommerce.common.currently_unavailable")),1)):(c(),i(E,{key:1},[n("div",B,[n("p",j,[m(t(p("price")),1),e(r).recurring?.interval?(c(),i("span",D,[d[0]||(d[0]=m("/ ")),e(r).recurring.intervalCount>1?(c(),i("span",I,t(e(r).recurring.intervalCount)+" "+t(" "),1)):o("",!0),m(t(e(r).recurring?.interval),1),e(r).recurring.intervalCount>1?(c(),i("span",O,t(e(s)("ecommerce.common.interval_plural_suffix")),1)):o("",!0)])):o("",!0)]),e(r).compareAtPrice?(c(),i("span",q,t(p("compareAtPrice")),1)):o("",!0),e(r).compareAtPrice?(c(),i("span",J,t(e(g)(e(r))),1)):o("",!0)]),e(r).type==="recurring"?(c(),i("div",L,[n("div",M,t(e(s)("ecommerce.common.subscription")),1),e(r).trialPeriod?(c(),i("div",S,t(e(r).trialPeriod)+" "+t(e(s)("ecommerce.common.day_free_trial")),1)):o("",!0)])):o("",!0),e(r).setupFee?(c(),i("div",T,t(p("setupFee"))+" "+t(e(s)("ecommerce.common.one_time_setup_fee")),1)):o("",!0)],64))])):o("",!0)}}),pe=Object.assign(U,{__name:"PreviewElementsEcommercePdpV2Price"});export{pe 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.