import{r as n,j as s}from"./@radix-CFOkMR_E.js";import{z as r,B as u,h as p,r as d}from"./index-KsTz2dHG.js";import{a as h}from"./UpdatePasswordSchemas-BeCeaRW5.js";import{S as x}from"./check-circle-i56092KI.js";import{u as f}from"./url-rGEp5Umh.js";import{c as g,L as S}from"./@react-router-CO-OsFwI.js";const l=n.createContext(null);function B({children:e,initialStep:t=1}){const[o,a]=n.useState(t);return s.jsx(l.Provider,{value:{surveyStep:o,setSurveyStep:a},children:e})}function w(){const e=n.useContext(l);if(e===null)throw new Error("useSurveyContext must be used within an SurveyProvider");return e}function E({stepAmount:e}){const{surveyStep:t}=w();return t>e?null:s.jsx("ol",{className:"flex flex-wrap justify-center gap-1 pb-5","aria-label":"progress",children:Array.from({length:e},(o,a)=>s.jsx("li",{"aria-current":t===a+1?"step":void 0,className:`h-0.5 w-[90px] rounded-rounded ${t===a+1?"bg-primary-100":t>a?"bg-primary-300":"bg-neutral-200"}`},a))})}const F=r.object({fullName:r.union([r.string(),r.literal("")]),email:r.union([r.string().email(),r.literal("")]),getUpdates:r.boolean()}).refine(e=>e.getUpdates?e.email!=="":!0),R=r.object({primaryUse:r.string().min(1),amountProductionModels:r.string().min(1)}),U=r.object({channels:r.string().array(),other:r.boolean(),otherVal:r.string().optional()}).refine(e=>e.other?e.otherVal!=="":e.channels.length>0),k=r.object({serverName:r.string().optional()});function y(e=!1){return h.extend({username:r.string()}).refine(t=>t.newPassword===t.confirmPassword,{path:["confirmPassword"],message:"Passwords do not match"}).refine(t=>e?t.username.length>0:!0)}y();const v=e=>n.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289L19.7071 11.2929C20.0976 11.6834 20.0976 12.3166 19.7071 12.7071L12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071C10.9024 19.3166 10.9024 18.6834 11.2929 18.2929L16.5858 13H5C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11H16.5858L11.2929 5.70711C10.9024 5.31658 10.9024 4.68342 11.2929 4.29289Z"}));function z({username:e,subHeader:t,displayBody:o=!0}){const[a]=g(),i=a.get("redirect"),m=i&&`${window.location.origin}${i}`,c=f.safeParse(m);return s.jsxs(u,{className:"flex max-w-[540px] flex-col items-center justify-center space-y-7 px-7 py-9",children:[s.jsx(x,{className:"h-[120px] w-[120px] fill-theme-text-success"}),s.jsxs("div",{className:"space-y-3 text-center",children:[s.jsxs("p",{className:"text-display-xs font-semibold",children:["Congratulations!",s.jsx("br",{}),t]}),o&&s.jsxs("p",{className:"text-theme-text-secondary",children:["You can log in to the dashboard with your username"," ",s.jsx("span",{className:"font-semibold text-theme-text-primary",children:e})," and your password to start exploring!"]}),s.jsx(p,{className:"inline-flex",size:"md",intent:"primary",asChild:!0,children:s.jsxs(S,{to:c.success?c.data:d.home,children:[s.jsx("span",{children:"Go to Dashboard"}),s.jsx(v,{className:"h-5 w-5 fill-white"})]})})]})]})}export{U as A,E as S,z as a,B as b,k as c,F as d,y as g,R as p,w as u};
