1import{I as g,M as k,N as v,J as C,O as L,B as x,P as I,H as e,K as F,L as P}from"./main-kIa_llse.js";import"./index-KWE2MP9S.js";function $({onTabChange:T,handleFinish:R,selectedMethod:r,summary:s}){const{t:a}=g(),{paymentConfiguration:c}=k(),{saving:j}=v(),{config:A,idCampaign:N}=C(),{watch:w}=L(),y=w("tabset")||"content1";c?.tree,c?.frequency,c?.currency;const u=c?.beneficiary??"",p=c?.message??"";x.useMemo(()=>I.find(i=>i.id===r)?.name??r??"-",[r]);const d=x.useMemo(()=>s?.adopcionPage?s.adopcionPage:typeof window<"u"?window.location.origin:"",[s?.adopcionPage]),m=x.useMemo(()=>typeof window<"u"?window.location.href:"",[]),n=x.useMemo(()=>s?.campaignPage?s.campaignPage:typeof window<"u"?window.location.origin:"",[s?.campaignPage]);console.debug("impactLink",d),console.debug("inviteLink",m),console.debug("campaignLink",n);const t=(i,l)=>{const b=a("share.message.adopted-tree"),o=l||d||(typeof window<"u"?window.location.origin:"");if(!o)return;const h={whatsapp:`https://wa.me/?text=${encodeURIComponent(b+" "+o)}`,twitter:`https://twitter.com/intent/tweet?text=${encodeURIComponent(b)}&url=${encodeURIComponent(o)}`,facebook:`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(o)}`,linkedin:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(o)}`}[i];h?window.open(h,"_blank","width=600,height=520"):alert(a("common.unsupported-platform"))},f=async i=>{if(i)try{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(i);else{const l=document.createElement("input");l.value=i,document.body.appendChild(l),l.select(),document.execCommand("copy"),document.body.removeChild(l)}alert(a("common.copied-to-clipboard"))}catch{alert(a("common.cannot-copy-to-clipboard"))}};return e.jsxs("div",{id:"step3",role:"tabpanel","aria-labelledby":"step3-tab",children:[e.jsxs("div",{className:"w-full max-w-[760px] mx-auto p-2 space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mx-auto mb-2",children:e.jsx("i",{className:"fa-regular fa-circle-check text-[48px] text-[#01873E]","aria-hidden":"true"})}),e.jsx("h2",{className:"font-normal w-full !text-[36px] !lg:text-[30px] mb-1 text-[#01873E] text-center",children:a("common.thank-you")}),e.jsx("p",{className:"text-muted-foreground m-0",children:a("common.adoption-successful")})]}),e.jsxs("div",{className:"bg-[rgba(0,0,0,0.04)] rounded-lg p-6 space-y-4",children:[r==="card"||r==="paypal"?e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"!text-[20px] font-semibold mb-3",children:a("summary.title")}),e.jsxs("div",{className:"flex flex-wrap",children:[e.jsx("div",{className:"w-full mb-2",children:e.jsx("p",{className:"m-0 font-medium capitalize",children:e.jsx("span",{dangerouslySetInnerHTML:{__html:s?.arbol}})})}),e.jsxs("div",{className:"w-full md:w-1/2 mb-2",children:[e.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:a("summary.type")}),e.jsx("p",{className:"m-0 font-medium capitalize",children:s?.type})]}),e.jsxs("div",{className:"w-full md:w-1/2 mb-2",children:[e.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:a("summary.frequency")}),e.jsx("p",{className:"m-0 font-medium capitalize",children:s?.frequency})]}),e.jsxs("div",{className:"w-full md:w-1/2 mb-2",children:[e.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:a("summary.payment-method")}),e.jsx("p",{className:"m-0 font-medium",children:s?.paymentMethod})]}),e.jsxs("div",{className:"w-full md:w-1/2 mb-2",children:[e.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:a("summary.amount")}),e.jsxs("p",{className:"m-0 font-medium",children:[s?.currency," ",s?.price]})]}),(u||p)&&e.jsxs("div",{className:"pt-3 mt-3 border-t w-full",children:[e.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:a("summary.dedicated-to")}),e.jsx("p",{className:"m-0 font-medium",children:u||a("â")}),!!p&&e.jsxs("p",{className:"m-0 text-sm italic mt-1",children:['"',p,'"']})]})]})]}):e.jsx("div",{className:"flex flex-wrap",children:e.jsxs("div",{className:"w-full",children:[e.jsx("h3",{className:"!text-[20px] font-semibold mb-3",children:a("response.basc.success.title")}),e.jsx("p",{className:"m-0",children:a("response.basc.success.message")})]})}),e.jsx("div",{className:"",children:s?.personalPage&&e.jsxs(e.Fragment,{children:[e.jsxs("a",{href:s?.personalPage,className:"btn btn-secondary btn-small w-full",target:"_blank",children:[e.jsx("i",{className:"fa-solid fa-map-pin mr-2","aria-hidden":"true"}),a("share.personal.show-my-adoptions")]}),e.jsxs("div",{className:"text-xs text-muted-foreground text-center mt-2",children:[e.jsx("i",{className:"fa-solid fa-lock mr-1","aria-hidden":"true"}),a("share.personal.info-is-protected")]})]})})]}),e.jsx("hr",{}),N?e.jsxs("div",{className:"bg-[rgba(0,0,0,0.04)] rounded-lg p-4 space-y-3",children:[e.jsxs("h3",{className:"!text-[20px] font-semibold mb-3",children:[e.jsx("i",{className:"fa-solid fa-share-nodes mr-2","aria-hidden":"true"}),a("share.campaign.title")]}),e.jsxs("div",{className:"mb-2",children:[e.jsx("label",{htmlFor:"shareLink",className:"mb-1",children:a("share.campaign.link")}),e.jsxs("div",{className:"flex",children:[e.jsx("input",{id:"shareLink",type:"text",className:"form-control !rounded-r-none",value:n,readOnly:!0}),e.jsxs("button",{type:"button",className:"btn btn-outline-secondary !rounded-l-none px-3 whitespace-nowrap",onClick:()=>f(n),children:[e.jsx("i",{className:"fa-regular fa-copy mr-1","aria-hidden":"true"}),a("share.copy")]})]})]}),e.jsxs("div",{className:"flex gap-2 mt-3 justify-center",children:[e.jsx("button",{type:"button",className:"btn btn-secondary btn-small flex items-center justify-center","aria-label":a("WhatsApp"),title:a("WhatsApp"),onClick:()=>t("whatsapp",n),children:e.jsx("i",{className:"fa-brands fa-whatsapp fa-2x","aria-hidden":"true"})}),e.jsx("button",{type:"button",className:"btn btn-secondary btn-small flex items-center justify-center","aria-label":a("Facebook"),title:a("Facebook"),onClick:()=>t("facebook",n),children:e.jsx("i",{className:"fa-brands fa-facebook fa-2x","aria-hidden":"true"})}),e.jsx("button",{type:"button",className:"btn btn-secondary btn-small flex items-center justify-center","aria-label":a("X (Twitter)"),title:a("X (Twitter)"),onClick:()=>t("twitter",n),children:e.jsx("i",{className:"fa-brands fa-x-twitter fa-2x","aria-hidden":"true"})}),e.jsx("button",{type:"button",className:"btn btn-secondary btn-small flex items-center justify-center","aria-label":a("LinkedIn"),title:a("LinkedIn"),onClick:()=>t("linkedin",n),children:e.jsx("i",{className:"fa-brands fa-linkedin fa-2x","aria-hidden":"true"})})]})]}):e.jsxs("div",{className:"bg-[rgba(0,0,0,0.04)] rounded-lg p-6 space-y-3",children:[e.jsxs("h3",{className:"!text-[20px] font-semibold mb-3",children:[e.jsx("i",{className:"fa-solid fa-share-nodes mr-2","aria-hidden":"true"}),a("share.link.title")]}),e.jsx("p",{className:"my-2",children:a("share.link.message")}),e.jsx("div",{className:"mb-2",children:e.jsxs("div",{className:"flex",children:[e.jsx("input",{id:"shareLink",type:"text",className:"form-control !rounded-r-none",value:d,readOnly:!0}),e.jsxs("button",{type:"button",className:"btn btn-outline-secondary !rounded-l-none px-3 whitespace-nowrap",onClick:()=>f(d),children:[e.jsx("i",{className:"fa-regular fa-copy mr-1","aria-hidden":"true"}),a("share.copy")]})]})}),e.jsxs("div",{className:"flex gap-2 mt-3 justify-center",children:[e.jsx("button",{type:"button",className:"btn btn-secondary btn-small flex items-center justify-center","aria-label":a("WhatsApp"),title:a("WhatsApp"),onClick:()=>t("whatsapp"),children:e.jsx("i",{className:"fa-brands fa-whatsapp fa-2x","aria-hidden":"true"})}),e.jsx("button",{type:"button",className:"btn btn-secondary btn-small flex items-center justify-center","aria-label":a("Facebook"),title:a("Facebook"),onClick:()=>t("facebook"),children:e.jsx("i",{className:"fa-brands fa-facebook fa-2x","aria-hidden":"true"})}),e.jsx("button",{type:"button",className:"btn btn-secondary btn-small flex items-center justify-center","aria-label":a("X (Twitter)"),title:a("X (Twitter)"),onClick:()=>t("twitter"),children:e.jsx("i",{className:"fa-brands fa-x-twitter fa-2x","aria-hidden":"true"})}),e.jsx("button",{type:"button",className:"btn btn-secondary btn-small flex items-center justify-center","aria-label":a("LinkedIn"),title:a("LinkedIn"),onClick:()=>t("linkedin"),children:e.jsx("i",{className:"fa-brands fa-linkedin fa-2x","aria-hidden":"true"})})]})]}),y!=="content3"&&e.jsxs(e.Fragment,{children:[e.jsx("hr",{}),e.jsxs("div",{className:"",children:[e.jsxs("h3",{className:"!text-[20px] font-semibold mb-3",children:[e.jsx("i",{className:"fa-solid fa-share-nodes"})," ",a("share.invite.title")]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{type:"button",className:"btn btn-secondary btn-small min-w-0
1w-full lg:!w-1/3",onClick:()=>t("twitter",m),children:[e.jsx("i",{className:"fa-brands fa-x-twitter mr-1","aria-hidden":"true"}),a("X (Twitter)")]}),e.jsxs("button",{type:"button",className:"btn btn-secondary btn-small min-w-0 w-full lg:!w-1/3",onClick:()=>t("facebook",m),children:[e.jsx("i",{className:"fa-brands fa-facebook mr-1","aria-hidden":"true"}),a("Facebook")]}),e.jsxs("button",{type:"button",className:"btn btn-secondary btn-small min-w-0 w-full lg:!w-1/3",onClick:()=>t("linkedin",m),children:[e.jsx("i",{className:"fa-brands fa-linkedin mr-1","aria-hidden":"true"}),a("LinkedIn")]})]})]})]})]}),e.jsx(F,{children:j&&e.jsx(P.div,{className:"absolute inset-0 flex items-center justify-center bg-black/20 z-[9999]",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},children:e.jsx("p",{className:"text-white text-xl font-semibold m-0",children:a("common.saving")})},"saving-overlay")})]})}export{$ 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.