1import{d as A,r as p,p as D,u as M,s as V,y as z,z as P,a0 as E,C as F,c as i,g as I,h as s,w as U,H as h,t as c,f as a,o as r,e as N,am as G,F as q,B as H,D as L,_ as O}from"./index-RY-WuJ48.js";import{B as T}from"./Box-CflMCUMY.js";import{N as Y}from"./Spin-BYliUbwy.js";const Z={key:0,class:"d-flex align-items-center justify-content-center flex-column p-xxl-2"},$={class:"caption caption-2 text-danger mt-l"},J={class:"caption caption-1 mt-xs"},K={class:"caption caption-1 mt-l"},Q={class:"caption caption-1 mt-xs"},W={key:2,class:"d-flex align-items-center justify-content-center flex-column mt-m"},X={key:1,class:"d-flex align-items-center justify-content-center flex-column"},ee={key:2,class:"d-flex justify-content-center"},te={key:3,class:"d-flex mt-xl"},se=["href"],ae={class:"row mt-xxl-2"},ne={class:"col-md-6"},oe={class:"btn btn-sm btn-outline w-100",href:"https://www.ratioapp.de/webplattform/apps/kundenportal/login-3rd?referer=&mandant=puresurfcamps"},ce={class:"col-md-6 mt-m mt-md-0"},le=A({__name:"Erfolgreich",setup(ie){const d=p(!1),u=p(null),y=p(null),k=p(null),e=D(),v=M(),l=v.query.order,_=v.query.token,C=v.query.mode,m=v.query.id,b=p(null),S=p(!0);e.displayName();const{t:n}=V(),f=p({totalprice:0,items:[]});e.checkout.user.firstname&&(e.user=e.checkout.user),z("Erfolgreich"),f.value.totalprice=+e.basketResponse.totalPrice,e.basketResponse.guests&&e.basketResponse.guests.forEach(o=>{o.positions.forEach((t,g)=>{const w=f.value.items.find(j=>j.item_name===t.name);w?w.quantity++:f.value.items.push({item_id:(f.value.items.length+1).toString(),item_name:t.name,item_category:g===0?"Surfcamp":"Leistung",item_country:e.checkout.surfcamp.destination.name,item_location:e.checkout.surfcamp.name,price:+t.price,quantity:t.amount})})}),e.basket.housings&&(console.log("housing",e.basket.housings),P.forOwn(e.basket.housings,o=>{(o.bookable===!1||e.checkout.surfcamp.onlyFlightBookable||e.checkout.surfcamp.alternative)&&(S.value=!1)})),window.dataLayer.push({event:"purchase",transaction_id:l,currency:"EUR",value:f.value.totalprice,tax:f.value.totalprice*.19,shipping:0,email:e.checkout.user.email,phone:e.checkout.user.phone,first_name:e.checkout.user.firstname,last_name:e.checkout.user.lastname,street:e.checkout.user.street,city:e.checkout.user.city,region:"Nicht angegeben",country:"DE",postal_code:e.checkout.user.zip,items:f.value.items}),C==="rechnung"&&(d.value=!0,l&&typeof l=="string"&&m&&typeof m=="string"&&B(l,m)),d.value||(u.value=setInterval(()=>{R()},1e3),setTimeout(()=>{u.value&&clearInterval(u.value)},6e4*10));const x=E(()=>v.query.alternative==="true"||!S.value);function R(){!l||typeof l!="string"||!_||typeof _!="string"||!m||typeof m!="string"||F.checkPayment(l,_).then(o=>{d.value=o.zahlungStatus,d.value&&u.value&&(clearInterval(u.value),l&&m&&B(l,m)),o.zahlungGespeichert=="502"&&(k.value="Deine Zahlung wurde gebucht, konnte in unserem System allerdings nicht gespeichert werden. Bitte wende dich an unseren Support")}).catch(o=>{y.value=o,d.value&&u.value&&clearInterval(u.value)})}function B(o,t){const g=E(()=>"https://www.ratioapp.de/webplattform/services/gast/ratio/buchungsengine/toupac/print_bestaetigung/puresurfcamps/vorgang-"+o+".pdf?id="+t+"&agenturcode=&lang=");b.value=g.value}return e.resetStore(),(o,t)=>{const g=G("lottie-animation");return r(),i("main",null,[I(T,{class:"position-relative"},{default:U(()=>[d.value?(r(),i("div",Z,[I(g,{class:"position-absolute","animation-link":"animations/confetti.json",height:230,loop:!1,"auto-play":!0}),t[2]||(t[2]=s("i",{class:"fal fa-check-to-slot text-grey-500 mb-m"},null,-1)),s("h2",null,c(x.value?a(n)("success.thankYouAlternative"):a(n)("success.thankYou"))+", "+c(a(e).user.firstname)+"!",1),x.value?(r(),i(q,{key:0},[s("div",$,c(a(n)("success.successMessageAlternative")),1),s("div",J,c(a(n)("success.successMessage2Alternative")),1)],64)):(r(),i(q,{key:1},[s("div",K,c(a(n)("success.successMessage1")),1),s("div",Q,c(a(n)("success.successMessage2")),1)],64)),k.value?(r(),i("div",W,[t[1]||(t[1]=s("i",{class:"fal fa-message-exclamation fs-32 text-secondary-400 mb-m"},null,-1)),h(" "+c(k.value),1)])):N("",!0)])):y.value?(r(),i("div",X,[t[3]||(t[3]=s("i",{class:"fal fa-message-exclamation fs-32 text-secondary-400 mb-m"},null,-1)),h(" "+c(y.value),1)])):(r(),i("div",ee,[I(a(Y),{description:a(n)("success.paymentVerified")},null,8,["description"])])),b.value?(r(),i("div",te,[s("a",{href:b.value,class:"w-100 btn btn-grey"},[h(c(x.value?a(n)("success.showInvoiceAlternative"):a(n)("success.showInvoice"))+" ",1),t[4]||(t[4]=s("i",{class:"fal fa-address-card ms-xs fs-16"},null,-1))],8,se)])):N("",!0)]),_:1}),s("div",ae,[s("div",ne,[s("a",oe,[h(c(a(n)("success.customerAccount"))+" ",1),t[5]||(t[5]=s("i",{class:"fal fa-user ms-xs fs-16"},null,-1))])]),s("div",ce,[s("button",{class:"btn btn-sm btn-grey w-100",onClick:t[0]||(t[0]=w=>a(H).push({path:a(L)("surfcamp")}))},[h(c(a(n)("success.toHomepage"))+" ",1),t[6]||(t[6]=s("i",{class:"fal fa-home ms-xs fs-16"},null,-1))])])])])}}}),fe=O(le,[["__scopeId","data-v-2bd0f3e8"]]);export{fe 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.