1import{r as h,b as S,a as D,j as e,v as E,b7 as d,b8 as g,B as I,b9 as B,aU as A}from"./index-hXv3D_Kq.js";import{u as U}from"./useSignupFlow-DxhEPUOi.js";import{u as L}from"./interestsApiSlice-DaBzauGd.js";import{u as P}from"./userRoadmapApiSlice-BzRH7Ly3.js";import{l as T}from"./logo-B4ayjg2B.js";import{l as R,p as M,j as F,m as _,s as z}from"./placements-DXGNXu92.js";import"./hand-detection-CCSM7oMs.js";import"./practiceInterviewApiSlice-DFYtl6ZD.js";import"./dsaApiSlice-BkkhzC08.js";import"./systemDesignPracticeApiSlice-acjctU14.js";import"./mentorChatApiSlice-DSCopD1I.js";const b=[{id:d.LEARN_SKILLS,label:"Learn & Upgrade Skills",icon:e.jsx("img",{src:R,alt:"learn-and-upgrade-skills"})},{id:d.PRACTICE_INTERVIEWS,label:"Practice Interviews",icon:e.jsx("img",{src:M,alt:"practice-interviews"})},{id:d.JOBS_PLACEMENTS,label:"Jobs / Placements",icon:e.jsx("img",{src:F,alt:"jobs-placements"})},{id:d.MASTER_DSA,label:"Master DSA",icon:e.jsx("img",{src:_,alt:"master-dsa"})},{id:d.SYSTEM_DESIGN,label:"Master System Design",icon:e.jsx("img",{src:z,alt:"system-design"})}],X=()=>{const{updateFlowData:f,goToNextStep:j,goToPreviousStep:w}=U(),[r,l]=h.useState([]),[n,u]=h.useState(!1),v=S(),o=D(s=>s.auth.user),c=o==null?void 0:o._id,[N,{isLoading:m}]=L(),[y,{isLoading:p}]=P();h.useEffect(()=>{o!=null&&o.interests&&o.interests.length>0&&l(o.interests)},[o==null?void 0:o.interests]);const x=s=>{l(t=>t.includes(s)?t.filter(a=>a!==s):[...t,s])},k=async()=>{if(!c){console.error("User ID not found");return}u(!0);try{await N({userId:c,interests:r}).unwrap(),await y({userId:c,selected:r}).unwrap(),v(A({interests:r})),f({selectedInterests:r}),await j()}catch(s){console.error("Error updating interests or proceeding to next step:",s)}finally{u(!1)}},C=()=>{w()};return e.jsx("div",{className:"fixed inset-0 w-full h-full overflow-y-auto",style:{background:"linear-gradient(0deg, #F0FFF6 0.09%, #EDEDED 99.89%)"},children:e.jsx("div",{className:"flex items-center justify-center px-4 py-8 pt-20 sm:pt-8 lg:pt-12 lg:pb-[135px]",children:e.jsxs("div",{className:"w-full max-w-[946px] space-y-[25px] xl:space-y-[15px] lg:space-y-[16px]",children:[e.jsx("div",{className:"flex sm:hidden justify-between items-center px-4 py-8 absolute top-0 z-10 bg-transparent lg:px-0",children:e.jsx("img",{src:T,alt:"logo"})}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("button",{onClick:C,className:"flex items-center text-[16px] font-medium leading-[24px] text-[#414141] hover:text-gray-600 transition-colors",children:[e.jsx("img",{className:"w-[14px] h-[14px] mr-[10px]",src:E,alt:"Back Arrow"}),e.jsx("span",{children:"Back"})]})}),e.jsxs("div",{className:"space-y-4 lg:space-y-[5px]",children:[e.jsxs("div",{className:"text-[#666666] text-[16px] sm:text-lg font-medium",children:[e.jsx("span",{className:"text-grey-6",children:"Step 5"})," of 6"]}),e.jsxs("div",{className:"sm:space-y-[5px]",children:[e.jsx("h1",{className:"text-[#333333] text-[32px] font-bold leading-tight sm:text-[25px]",children:"Select your interests"}),e.jsx("p",{className:"text-[#696B6B] font-dm-sans text-[20px] font-normal leading-[31px] sm:text-[14px] sm:leading-[22px]",children:"Let's personalize your experience"})]})]}),e.jsxs("div",{className:"grid grid-cols-3 sm:grid-cols-1 gap-[32px] sm:gap-6 sm:mt-5",children:[b.slice(0,1).map(s=>e.jsxs("div",{className:`relative p-6 sm:p-0 rounded-[12px] h-[220px] sm:h-[50px] cursor-pointer transition-all duration-200 ${r.includes(s.id)?"bg-white shadow-lg border-2 border-button":"bg-white hover:border-2 hover:-translate-y-[10px] hover:border-[#7CDDA4] sm:bg-white sm:items-start"}`,onClick:()=>x(s.id),children:[e.jsx("div",{className:"absolute top-[8px] left-[8px] sm:top-[12px] sm:left-[15px]",onClick:t=>t.stopPropagation(),children:e.jsx(g,{checked:r.includes(s.id),onCheckedChange:t=>{l(t?a=>[...a,s.id]:a=>a.filter(i=>i!==s.id))},className:"w-[24px] h-[24px] border-2 bg-white data-[state=checked]:bg-button data-[state=checked]:border-button border-gray-300"})}),e.jsxs("div",{className:"flex flex-col items-center text-center pt-[16px] sm:pt-0 sm:justify-center sm:h-full sm:items-start",children:[e.jsx("div",{className:"mb-[16px] sm:hidden",children:s.icon}),e.jsx("h3",{className:"text-[#696B6B] text-[16px] font-medium absolute bottom-8 sm:relative sm:bottom-auto sm:text-left sm:left-[52px]",children:s.label})]})]},s.id)),b.slice(1,3).map(s=>e.jsxs("div",{className:`relative p-6 sm:p-0 rounded-[12px] h-[220px] sm:h-[50px] cursor-pointer transition-all duration-200 ${r.includes(s.id
1)?"bg-white shadow-lg border-2 border-button":"bg-white hover:border-2 hover:-translate-y-[10px] hover:border-[#7CDDA4] sm:bg-white sm:items-start"}`,onClick:()=>x(s.id),children:[e.jsx("div",{className:"absolute top-[8px] left-[8px] sm:top-[12px] sm:left-[15px]",onClick:t=>t.stopPropagation(),children:e.jsx(g,{checked:r.includes(s.id),onCheckedChange:t=>{l(t?a=>[...a,s.id]:a=>a.filter(i=>i!==s.id))},className:"w-[24px] h-[24px] border-2 bg-white data-[state=checked]:bg-button data-[state=checked]:border-button border-gray-300"})}),e.jsxs("div",{className:"flex flex-col items-center text-center pt-[16px] sm:pt-0 sm:justify-center sm:h-full sm:items-start",children:[e.jsx("div",{className:"absolute top-2 sm:hidden",children:s.icon}),e.jsx("h3",{className:"text-[#696B6B] text-[16px] font-medium absolute bottom-8 sm:relative sm:bottom-auto sm:text-left sm:left-[52px]",children:s.label})]})]},s.id)),b.slice(3,5).map(s=>e.jsxs("div",{className:`relative p-6 sm:p-0 rounded-[12px] h-[220px] sm:h-[50px] cursor-pointer transition-all duration-200 ${r.includes(s.id)?"bg-white shadow-lg border-2 border-button":"bg-white hover:border-2 hover:-translate-y-[10px] hover:border-[#7CDDA4] sm:bg-white sm:items-start"}`,onClick:()=>x(s.id),children:[e.jsx("div",{className:"absolute top-[8px] left-[8px] sm:top-[12px] sm:left-[15px]",onClick:t=>t.stopPropagation(),children:e.jsx(g,{checked:r.includes(s.id),onCheckedChange:t=>{l(t?a=>[...a,s.id]:a=>a.filter(i=>i!==s.id))},className:"w-[24px] h-[24px] border-2 bg-white data-[state=checked]:bg-button data-[state=checked]:border-button border-gray-300"})}),e.jsxs("div",{className:"flex flex-col items-center text-center pt-[16px] sm:pt-0 sm:justify-center sm:h-full sm:items-start",children:[e.jsx("div",{className:"mb-[16px] sm:hidden",children:s.icon}),e.jsx("h3",{className:"text-[#696B6B] text-[16px] font-medium absolute bottom-8 sm:relative sm:bottom-auto sm:text-left sm:left-[52px]",children:s.label})]})]},s.id))]}),e.jsx("div",{className:"relative sm:absolute sm:bottom-0 sm:left-0 sm:right-0 sm:z-20 sm:bg-white sm:p-4 sm:border-t sm:border-gray-100 lg:fixed lg:bottom-0 lg:left-0 lg:right-0 lg:z-20 lg:bg-white lg:p-4 lg:border-t lg:border-gray-100 md:fixed md:bottom-0 md:left-0 md:right-0 md:z-20 md:bg-white md:p-4 md:border-t md:border-gray-100",children:e.jsxs(I,{onClick:k,disabled:r.length===0||n||m||p,className:`w-full h-[50px] flex justify-center items-center gap-2 px-8 py-4 2 bg-[#001630] text-white font-medium rounded-lg 3 hover:bg-[#002A5C] transition-colors duration-200 ease-in-out mb-5 sm:mb-0 4 disabled:opacity-50 disabled:cursor-not-allowed ${n||m||p?"opacity-50 cursor-not-allowed":""} 5 sm:shadow-lg`,children:[(n||m||p)&&e.jsx(B,{className:"w-4 h-4 animate-spin"}),r.length>0?"Continue":"Pick 1 or more to continue"]})})]})})})};export{X 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.