import"../chunks/B2cHk4HI.js";import{o as P}from"../chunks/4WsUhDWi.js";import{v as D,b as m,p as S,f as C,t as w,c as z,$ as N,d as s,s as c,aw as R,au as Y,r as n,g as x,ay as Z,a as j}from"../chunks/BDALf20I.js";import{s as f}from"../chunks/4k6DpCgf.js";import{r as A,i as B}from"../chunks/Bke_korE.js";import{h as M}from"../chunks/DV6L2nvf.js";import{h as O}from"../chunks/BUhRjcOt.js";import{p as $}from"../chunks/C-Y7nmnD.js";import{a as V,u as W}from"../chunks/DffDvEhl.js";import{L as F}from"../chunks/CYItkO2S.js";import{b as G}from"../chunks/BNZUboE0.js";import{g as _}from"../chunks/DklPLC_x.js";import{g as H}from"../chunks/BpFpuxGr.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4a6bf5bb-6139-4c34-aa73-98961bc8f67e",e._sentryDebugIdIdentifier="sentry-dbid-4a6bf5bb-6139-4c34-aa73-98961bc8f67e")})()}catch{}const J=()=>"Payment succeeded",K=()=>"Pagamento bem sucedido",T=(e={},t={})=>(t.locale??_())==="en"?J():K(),Q=e=>`You purchased <b>${e.number_droplet} droplets</b>.`,U=e=>`Você comprou <b>${e.number_droplet} droplets</b>.`,X=(e,t={})=>(t.locale??_())==="en"?Q(e):U(e),ee=()=>"Thank you for your support!",te=()=>"Obrigado pelo seu apoio!",re=(e={},t={})=>(t.locale??_())==="en"?ee():te();var oe=D('<svg><path d="m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"></path></svg>');function ae(e,t){let o=A(t,["$$slots","$$events","$$legacy"]);var l=oe();G(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...o})),m(e,l)}var se=C('<div class="relative flex h-full flex-col items-center justify-center px-4"><div class="absolute top-8"><!></div> <div class="card border-base-content/10 w-full max-w-xl border shadow-sm"><div class="card-body gap-3"><!> <h2 class="text-4xl font-medium sm:text-5xl"> </h2> <p class="text-lg"><!> </p> <a class="btn btn-primary btn-lg mt-2 w-max" href="/"> </a></div></div></div>');function ge(e,t){S(t,!0);let o=Y(null);P(async()=>{R(o,$.url.searchParams.get("droplets"),!0);const r=$.url.searchParams.get("session_id");r&&await V.refreshPaymentSession(r)&&await W.refresh()});var l=se();O(r=>{w(a=>N.title=`Wplace - ${a??""}`,[()=>T()])});var d=s(l),q=s(d);F(q,{size:"lg",hasText:!0}),n(d);var b=c(d,2),v=s(b),h=s(v);ae(h,{class:"size-16 text-emerald-500"});var i=c(h,2),k=s(i);n(i);var p=c(i,2),g=s(p);{var I=r=>{var a=Z(),u=j(a);M(u,()=>X({number_droplet:Number(x(o)).toLocaleString()})),m(r,a)};B(g,r=>{x(o)&&r(I)})}var E=c(g);n(p);var y=c(p,2),L=s(y,!0);n(y),n(v),n(b),n(l),w((r,a,u)=>{f(k,`${r??""}!`),f(E,` ${a??""}`),f(L,u)},[()=>T(),()=>re(),()=>H()]),m(e,l),z()}export{ge as component};
