import{j as f,a$ as y,aL as x}from"./llFuKhWI.js";import{a as b}from"./Bmq57C4o.js";const D={currency:"USD",minimumFractionDigits:0,maximumFractionDigits:2},P=x.en_US,g=()=>{const s=f("prices"),e=s.value.starter/100,a=s.value.corporate/100,t=n=>b({value:n,locale:P,options:D}),r=n=>n*(y.tax.germany/100),l=async(n,c)=>{if(!n)return{error:"Internal error, discount couldn't be applied."};if(!c)return{error:"Please provide a coupon code."};const{price:m,discount:p,percent:d,error:i}=await $fetch("/stripe/coupon",{method:"POST",body:{tier:n,coupon:c}});if(i)return{error:i};const o=m/100,u=p/100;return{prices:{discount:{unformatted:u,formatted:t(u),percent:d},monthly:{unformatted:o/12,base:t(o/12),taxes:t(r(o/12)),total:t(o/12+r(o/12))},annually:{unformatted:o,base:t(o),taxes:t(r(o)),total:t(o+r(o))}}}};return{prices:{starter:{monthly:{unformatted:e/12,base:t(e/12),taxes:t(r(e/12)),total:t(e/12+r(e/12))},annually:{unformatted:e,base:t(e),taxes:t(r(e)),total:t(e+r(e))}},corporate:{monthly:{unformatted:a/12,base:t(a/12),taxes:t(r(a/12)),total:t(a/12+r(a/12))},annually:{unformatted:a,base:t(a),taxes:t(r(a)),total:t(a+r(a))}}},formatPrice:t,calculateTaxes:r,applyDiscount:l}};export{g as u};