1import{u as g}from"./index-016102aa.mjs";import{_ as p,u as k,o as x,a as u,c as _,v as h,t as r,l as d}from"./entry-9f6422c3.mjs";const q={__name:"giftcard-thankyou",setup(m,{expose:y}){y();const{invoiceID:t,closeAnInvoice:s,sendEmailToGuest:l}=g(),e=k();console.log("route in thank-you",e),e.meta.layout="blank",x(async()=>{var n,i,c;const o=t.value||((n=e==null?void 0:e.query)==null?void 0:n.invoice_id);console.log("invoiceID.value",t.value,"invoice_id",o),o&&(((i=e==null?void 0:e.query)==null?void 0:i.success)==!0?(await s(o),console.log("Closing the invoice after payment was made successfully"),await l(o)):(await s(o,!0,{StatusCode:1,Message:(c=e==null?void 0:e.query)==null?void 0:c.message,InternalMessage:"Closing Invoice"}),console.log("Trying to close the invoice after payment was failed")),t.value=null)});const a={invoiceID:t,closeAnInvoice:s,sendEmailToGuest:l,route:e};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}},I={class:"text-center"},w={key:0},S=d("h2",{class:"text-2xl"},"Thank you!",-1),T={key:1},b=d("h2",{class:"text-2xl"},"Sorry, but it's failed.",-1),D={class:"hidden"};function B(m,y,t,s,l,e){var a,o,n,i,c,v,f;return u(),_("div",I,[((o=(a=s.route)==null?void 0:a.query)==null?void 0:o.success)==!0?(u(),_("div",w,[S,h(" "+r((i=(n=s.route)==null?void 0:n.query)==null?void 0:i.message),1)])):(u(),_("div",T,[b,h(" "+r((v=(c=s.route)==null?void 0:c.query)==null?void 0:v.message),1)])),d("div",D,r((f=s.route)==null?void 0:f.query)+" "+r(s.invoiceID),1)])}var A=p(q,[["render",B]]);export{A 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.