1import{u as m,r as d,j as e,L as x,q as h,b as t,D as o,ad as f}from"./vendor-D7X22TEy.js";import{t as u,g as p,p as g,S as j,c as b,B as c}from"./index-B1RviW89.js";function v(){m();const r=new URLSearchParams(window.location.search),a=parseInt(r.get("appointment_id")??"0",10),n=r.get("session_id")??"",{data:s,isLoading:i,error:l}=u.stripe.verifyPayment.useQuery({appointmentId:a,sessionId:n},{enabled:!!a&&!!n,retry:2});return d.useEffect(()=>{s?.paid&&a&&(p.purchase(a),g(a,95))},[s?.paid,a]),i?e.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-[#f8f5f0]",children:[e.jsx(j,{title:"Consulta Marcada com Sucesso | ClÃnica da Mente",description:"A sua consulta foi marcada com sucesso. Receberá uma confirmação por e-mail com todos os detalhes.",canonical:"/marcacao-consulta/sucesso",ogType:"website",schemaMarkup:{"@context":"https://schema.org","@type":"WebPage",name:"Consulta Marcada com Sucesso | ClÃnica da Mente",url:"https://www.clinicadamente.com/marcacao-sucesso",description:"A sua consulta foi marcada com sucesso na ClÃnica da Mente."},noIndex:!0}),e.jsxs("div",{className:"text-center",children:[e.jsx(x,{className:"h-10 w-10 animate-spin text-[#c9a84c] mx-auto mb-4"}),e.jsx("p",{className:"text-[#1a2e44] font-medium",children:"A verificar o pagamento..."})]})]}):l||!s?.paid?e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[#f8f5f0] px-4",children:e.jsxs("div",{className:"max-w-md w-full bg-white rounded-2xl shadow-lg p-8 text-center",children:[e.jsx(h,{className:"h-12 w-12 text-red-500 mx-auto mb-4"}),e.jsx("h2",{className:"text-2xl font-bold text-[#1a2e44] mb-3",children:"Pagamento não confirmado"}),e.jsxs("p",{className:"text-gray-600 mb-6",children:["Não foi possÃvel confirmar o pagamento. Se foi debitado algum valor, contacte-nos para ",e.jsx("a",{href:"mailto:[email protected]",className:"text-[#c9a84c] underline",children:"[email protected]"}),"."]}),e.jsx(t,{href:"/marcacao-consulta","data-track-cta":"marcacao-sucesso-other","data-track-page":"marcacao-sucesso",onClick:()=>b("marcacao-sucesso-other","marcacao-sucesso","other"),children:e.jsx(c,{className:"bg-[#c9a84c] hover:bg-[#b8973b] text-white",children:"Tentar novamente"})})]})}):e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[#f8f5f0] px-4 py-16",children:e.jsxs("div",{className:"max-w-lg w-full bg-white rounded-2xl shadow-lg p-8 text-center",children:[e.jsx("div",{className:"w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-6",children:e.jsx(o,{className:"h-10 w-10 text-green-600"})}),e.jsx("h1",{className:"text-3xl font-bold text-[#1a2e44] mb-2",children:"Consulta confirmada!"}),e.jsx("p",{className:"text-gray-600 mb-8",children:"O pagamento foi processado com sucesso. Receberá um email de confirmação em breve."}),e.jsxs("div",{className:"bg-[#f8f5f0] rounded-xl p-4 mb-8 text-left",children:[e.jsx("p",{className:"text-sm text-gray-500 mb-1",children:"Referência da marcação"}),e.jsxs("p",{className:"font-mono font-bold text-[#1a2e44] text-lg",children:["#",String(a).padStart(6,"0")]})]}),e.jsxs("div",{className:"space-y-3 mb-8 text-left",children:[e.jsxs("div",{className:"flex items-center gap-3 text-gray-700",children:[e.jsx(f,{className:"h-5 w-5 text-[#c9a84c] shrink-0"}),e.jsx("span",{children:"Consulta de Avaliação e Diagnóstico, 90 minutos"})]}),e.jsxs("div",{className:"flex items-center gap-3 text-gray-700",children:[e.jsx(o,{className:"h-5 w-5 text-green-600 shrink-0"}),e.jsx("span",{children:"Pagamento de 95,00⬠confirmado"})]})]}),e.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"A nossa equipa irá contactá-lo para confirmar todos os detalhes da consulta."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx(t,{href:"/",children:e.jsx(c,{variant:"outline",className:"border-[#1a2e44] text-[#1a2e44]",children:"Voltar ao inÃcio"})}),e.jsx(t,{href:"/contactos",children:e.jsx(c,{className:"bg-[#c9a84c] hover:bg-[#b8973b] text-white",children:"Falar connosco"})})]})]})})}export{v 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.