1import{r as e,j as t}from"./mui-7de4f23d.js";import{u as s}from"./useApi-e64add70.js";import{u as a}from"./useLoginAdmin-f4195b43.js";import{e as r,A as o}from"./index-2ba3c2ef.js";import{T as i}from"./thanks-img-47f9d641.js";import{a as l}from"./react-vendor-60cd4be3.js";import"./axiosInstance-9d8a485a.js";import"./axios-c6845f15.js";import"./metaRegistrationTracking-310be8f7.js";const n=()=>{e.useState();const{apiCall:n,response:m}=s("post"),{apiCall:c,response:d}=s("post"),[g,p]=e.useState(!1),{user:u,logout:x,login:f}=r(),{apiCall:S,response:j}=s("post"),{loginAdmin:h,error:y}=a(),I=l();return e.useEffect(()=>{j?.data?.data&&(f(j.data.data),localStorage.setItem("user",JSON.stringify(j.data.data)),I("/"))},[j]),e.useEffect(()=>{!0===m?.data?.success&&(p(!0),window.rewardful("convert",{email:m.data.convert}),localStorage.setItem("user",JSON.stringify(m?.data?.user)))},[m]),e.useEffect(()=>{if(d?.data)if("unpaid"===d?.data.payment_status)I("/");else if("paid"===d?.data.payment_status){const t=JSON.parse(localStorage.getItem("session"));var e=localStorage.getItem("userId");e||(e=JSON.parse(localStorage.getItem("user")).id),n("/api/save-payment",{session_id:t.id})}},[d]),e.useEffect(()=>{const e=JSON.parse(localStorage.getItem("session"));var t=localStorage.getItem("userId");if(!t){const e=JSON.parse(localStorage.getItem("user"));t=e?.id}e&&c("/api/getCustomerBySession",{session_id:e.id})},[]),t.jsx(t.Fragment,{children:t.jsx("div",{className:"thank_main flex justify-center items-center",children:t.jsxs("div",{className:"thanks_box text-center",children:[t.jsx("img",{src:i,alt:"img"}),t.jsx("p",{className:"text_main mt-6 text-2xl font-bold text-gray-10",children:"Entry Package Payment Successfull"}),t.jsx("p",{className:"text_sec pb-4 text-slate-600 font-light text-xs p-1",children:"AI Automated welcomes you aboard! Your subscription will keep you at the forefront of automation trends and innovations."}),g?t.jsx("button",{onClick:()=>(()=>{const e=JSON.parse(localStorage.getItem("user")),t=localStorage.getItem("token");if(e&&t)S("/api/get-user");else{const e=JSON.parse(localStorage.getItem("userData"));h({email:e?.email,password:e?.password}),localStorage.removeItem("userData"),localStorage.removeItem("session")}})(),className:"py-2 px-6 mx-auto bg-blue-500 text-white rounded",children:"Start"}):t.jsx(t.Fragment,{children:t.jsxs("div",{className:"flex gap-3 justify-center",children:[t.jsx("p",{className:"text_sec pb-4 text-slate-600 font-light text-xs p-1",children:"We are getting thing ready for you..."}),t.jsxs("div",{role:"status",children:[t.jsx(o,{size:"md",className:"mr-2 text-gray-200 dark:text-gray-600 fill-blue-600"}),t.jsx("span",{className:"sr-only",children:"Loading..."})]})]})})]})})})};export{n 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.