PageSourceSearch

https://gadsbrasil.com.br/assets/checkout-DSPWbMw3.js

js gadsbrasil.com.br collected 2026-10-08 01:59:53 UTC 5,955 bytes, 1 lines download raw bytes

1import{e as D,u as F,a0 as L,r as n,a1 as w,j as e,L as T,R as U,a2 as I,a3 as $,S as B,A as G,a as _,O as v,a4 as z,n as O,t as C}from"./main-Cc9kcbXG.js";import{F as V}from"./file-text-CLX-7L0a.js";function Q(){const{checkoutUrl:t,detailed:a,subtotal:l,clear:k,goToCheckout:o}=D(),{user:m,processPurchaseOrder:S}=F(),c=L(),[x,r]=n.useState(!1),[p,u]=n.useState(!1),f=n.useRef(!1),g=l>0?l:a.reduce((s,d)=>s+(d.lineTotal||0),0)||189,h=Math.round(g);n.useEffect(()=>{if(t){const s=w(t)||t;window.location.assign(s);return}if(a.length===0){c({to:"/produtos"});return}f.current||(f.current=!0,r(!0),o().finally(()=>r(!1)))},[t,a.length,c,o]);const P=async()=>{r(!0),await o(),r(!1)},A=async()=>{u(!0);try{const s=m?.email||"[email protected]",d=m?.name||"Cliente GADS",R=a.length>0?a.map(N=>`${N.product.name} (x${N.qty})`).join(", "):"Base Fluida Premium Pele Perfeita",b=typeof window<"u"?localStorage.getItem("gads:coupon_code"):null,i=typeof window<"u"?localStorage.getItem("gads:referral_creator"):null,E=typeof window<"u"?localStorage.getItem("gads:referral_amiga"):null;let j=b||i;b?.toUpperCase().startsWith("CLUBE-")&&i&&(j=i);const y=await S({orderValue:g,customerEmail:s,customerName:d,items:R,creatorCode:j||void 0,referralAmiga:E||void 0});C.success("Pedido Aprovado com Sucesso! 💎",{description:`+${y.pointsAwarded} diamantes creditados no seu extrato oficial (Pedido #${y.orderNumber}).`,duration:5e3}),k(),c({to:"/conta"})}catch{C.error("Erro ao registrar pedido.")}finally{u(!1)}};return e.jsx(T,{children:e.jsxs("div",{className:"mx-auto max-w-xl px-6 py-20 md:py-28 text-center",children:[e.jsx("p",{className:"editorial-eyebrow text-cyan-deep",children:"— Checkout Seguro"}),e.jsx("h1",{className:"mt-4 font-serif text-3xl sm:text-4xl text-foreground font-normal",children:"Finalizando seu pedido"}),e.jsxs("p",{className:"mt-4 text-sm text-muted-foreground leading-relaxed",children:["Seu pedido será finalizado no ambiente seguro com recebimento oficial processado pela"," ",e.jsx("strong",{className:"text-foreground",children:"Appmax"}),". Se o redirecionamento não acontecer automaticamente, use as opções abaixo."]}),e.jsxs("div",{className:"mt-6 rounded-2xl border border-cyan-deep/30 bg-gradient-to-r from-cyan-deep/10 via-cyan-deep/5 to-transparent p-4 flex items-center justify-between text-left shadow-2xs",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-cyan-deep/15 text-cyan-deep shrink-0",children:e.jsx(U,{className:"h-5 w-5 fill-cyan-deep/20"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[0.65rem] uppercase tracking-wider text-cyan-deep font-bold",children:"Clube GADS Diamantes"}),e.jsxs("p",{className:"text-xs sm:text-sm text-foreground font-medium",children:["Você acumulará ",e.jsxs("strong",{className:"text-cyan-deep font-bold",children:["+",h," Diamantes 💎"]})," com esta compra!"]})]})]}),e.jsx("span",{className:"hidden sm:inline-flex rounded-full bg-cyan-deep/10 px-2.5 py-1 text-[0.7rem] font-semibold text-cyan-deep",children:"1 Real = 1 Ponto"})]}),e.jsxs("div",{className:"mt-6 rounded-2xl border border-border bg-card p-5 text-left",children:[e.jsx("p",{className:"text-[0.65rem] uppercase tracking-[0.25em] text-muted-foreground font-semibold",children:"Formas de pagamento aceitas"}),e.jsxs("div",{className:"mt-3 grid grid-cols-1 sm:grid-cols-3 gap-3 text-xs",children:[e.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl border border-border/80 bg-sand/30 p-3",children:[e.jsx(I,{className:"h-4 w-4 text-cyan-deep shrink-0"}),e.jsxs("span",{children:[e.jsx("strong",{children:"Pix"})," instantâneo"]})]}),e.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl border border-border/80 bg-sand/30 p-3",children:[e.jsx($,{className:"h-4 w-4 text-cyan-deep shrink-0"}),e.jsxs("span",{children:[e.jsx("strong",{children:"Cartão"})," até 12x"]})]}),e.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl border border-border/80 bg-sand/30 p-3",children:[e.jsx(V,{className:"h-4 w-4 text-cyan-deep shrink-0"}),e.jsxs("span",{children:[e.jsx("strong",{children:"Boleto"})," bancário"]})]})]}),e.jsxs("div",{className:"mt-3 flex items-center gap-2 text-[0.7rem] text-muted-foreground",children:[e.jsx(B,{className:"h-4 w-4 text-cyan-deep"}),e.jsx("span",{children:"Transação segura com criptografia de ponta a ponta"})]})]}),e.jsxs("div",{className:"mt-8 flex flex-col items-center gap-3",children:[t?e.jsxs("a",{href:w(t)||t,className:"w-full sm:w-auto inline-flex items-center justify-center gap-2 bg-foreground px-8 py-4 text-xs uppercase tracking-[0.3em] text-background transition-all hover:bg-cyan-deep rounded-full cursor-pointer font-medium",children:[e.jsx("span",{children:"Ir para pagamento na Appmax"}),e.jsx(G,{className:"h-3.5 w-3.5"})]}):a.length===0?e.jsx(_,{to:"/produtos",className:"inline-block bg-foreground px-8 py-4 text-xs uppercase tracking-[0.3em] text-background hover:bg-cyan-deep rounded-full",children:"Explorar produtos"}):e.jsxs("button",{type:"button",onClick:()=>{P()},disabled:x,className:"w-full sm:w-auto inline-flex items-center justify-center gap-2 bg-foreground px-8 py-4 text-xs uppercase tracking-[0.3em] text-background hover:bg-cyan-deep disabled:opacity-50 rounded-full cursor-pointer font-medium",children:[x?e.jsx(v,{className:"h-4 w-4 animate-spin"}):e.jsx(z,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Tentar conexão com gateway"})]}),a.length>0&&e.jsxs("button",{type:"button",onClick:A,disabled:p,className:"mt-2 inline-flex items-center gap-2 text-xs font-semibold text-cyan-deep hover:text-cyan-deep/80 hover:underline cursor-pointer disabled:opacity-50",children:[p?e.jsx(v,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(O,{className:"h-3.5 w-3.5 text-cyan-deep"}),e.jsxs("span",{children:["Confirmar compra & creditar +",h," diamantes na conta"]})]})]})]})})}export{Q as component};

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.