import{r as c,j as e,X as n,p as x,q as l}from"./index-jPJOmtKw.js";import{L as d}from"./use-pix-payment-DR6HpRO6.js";const m=c.forwardRef(({pixData:t,copied:s,pixTimer:a,onCopy:r,onClose:i},o)=>e.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/40 backdrop-blur-md animate-in fade-in duration-300",children:e.jsxs("div",{ref:o,className:"flex flex-col items-center max-w-[360px] w-[90%] rounded-[24px] p-6 relative animate-in zoom-in-95 duration-300",style:{backgroundColor:"rgba(37,37,37,0.92)"},children:[i&&e.jsx("button",{onClick:i,className:"absolute top-4 right-4 text-white/60 hover:text-white transition-colors",children:e.jsx(n,{size:20})}),e.jsx("p",{className:"text-white/70 text-[11px] uppercase tracking-wider font-bold mb-4",children:"Pague com PIX"}),t.qr_code_base64?e.jsx("div",{className:"bg-white rounded-[12px] p-2 mb-4",children:e.jsx("img",{src:t.qr_code_base64,alt:"QR Code PIX",className:"w-[160px] h-[160px]"})}):t.qr_code?e.jsx("div",{className:"bg-white rounded-[12px] p-2 mb-4",children:e.jsx("img",{src:`https://api.qrserver.com/v1/create-qr-code/?size=160x160&data=${encodeURIComponent(t.qr_code)}`,alt:"QR Code PIX",className:"w-[160px] h-[160px]"})}):null,e.jsx("p",{className:"text-white/60 text-[11px] text-center mb-3",children:"Escaneie o QR Code ou copie o código abaixo:"}),e.jsx("div",{className:"w-full bg-white/10 rounded-[10px] p-3 text-[10px] text-white/80 break-all leading-relaxed max-h-[60px] overflow-y-auto mb-3",children:t.qr_code}),e.jsxs("button",{onClick:r,className:"w-full h-[44px] bg-pink text-white font-bold text-[13px] rounded-[12px] flex items-center justify-center gap-2 active:scale-[0.98] transition-all",children:[s?e.jsx(x,{size:16}):e.jsx(l,{size:16}),s?"Código copiado!":"Copiar código PIX"]}),a&&e.jsxs("p",{className:"text-pink text-[12px] text-center mt-3 font-bold",style:{fontVariantNumeric:"tabular-nums"},children:["Expira em: ",a]}),e.jsxs("div",{className:"flex items-center justify-center gap-2 mt-3",children:[e.jsx(d,{size:13,className:"animate-spin text-pink"}),e.jsx("span",{className:"text-white/60 text-[12px]",children:"Aguardando confirmação..."})]})]})}));m.displayName="PixPaymentPopup";export{m as P};
