import{j as t}from"./@tanstack-CEbkxrhX.js";import{r as n}from"./@radix-C9DBgJhe.js";import{z as r,B as u,h as p,r as d}from"./index-BhYPVFKa.js";import{a as x}from"./UpdatePasswordSchemas-4FyPPBY9.js";import{S as h}from"./check-circle-BVvhm5dy.js";import{u as f}from"./url-ZKNs861m.js";import{b as g,L as S}from"./@react-router-DYovave8.js";const l=n.createContext(null);function E({children:e,initialStep:s=1}){const[o,a]=n.useState(s);return t.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 F({stepAmount:e}){const{surveyStep:s}=w();return s>e?null:t.jsx("ol",{className:"flex flex-wrap justify-center gap-1 pb-5","aria-label":"progress",children:Array.from({length:e},(o,a)=>t.jsx("li",{"aria-current":s===a+1?"step":void 0,className:`h-0.5 w-[90px] rounded-rounded ${s===a+1?"bg-primary-100":s>a?"bg-primary-300":"bg-neutral-200"}`},a))})}const R=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),U=r.object({primaryUse:r.string().min(1),amountProductionModels:r.string().min(1)}),k=r.object({channels:r.string().array().min(1),other:r.boolean(),otherVal:r.string().optional()}).refine(e=>e.other?e.otherVal!=="":!0),z=r.object({serverName:r.string().optional()});function y(e=!1){return x.extend({username:r.string()}).refine(s=>s.newPassword===s.confirmPassword,{path:["confirmPassword"],message:"Passwords do not match"}).refine(s=>e?s.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 A({username:e,subHeader:s,displayBody:o=!0}){const[a]=g(),i=a.get("redirect"),m=i&&`${window.location.origin}${i}`,c=f.safeParse(m);return t.jsxs(u,{className:"flex max-w-[540px] flex-col items-center justify-center space-y-7 px-7 py-9",children:[t.jsx(h,{className:"h-[120px] w-[120px] fill-theme-text-success"}),t.jsxs("div",{className:"space-y-3 text-center",children:[t.jsxs("p",{className:"text-display-xs font-semibold",children:["Congratulations!",t.jsx("br",{}),s]}),o&&t.jsxs("p",{className:"text-theme-text-secondary",children:["You can log in to the dashboard with your username"," ",t.jsx("span",{className:"font-semibold text-theme-text-primary",children:e})," and your password to start exploring!"]}),t.jsx(p,{className:"inline-flex",size:"md",intent:"primary",asChild:!0,children:t.jsxs(S,{to:c.success?c.data:d.home,children:[t.jsx("span",{children:"Go to Dashboard"}),t.jsx(v,{className:"h-5 w-5 fill-white"})]})})]})]})}export{k as A,F as S,A as a,E as b,z as c,R as d,y as g,U as p,w as u};
