1import{b as L,u as R,d as k,e as t,j as e,C as B,h as I,B as M,s as j}from"./index-BoPK12rZ.js";import{I as p}from"./input-B7jnFymG.js";import{L as r}from"./label-CCd9oABz.js";import{S as g,a as v,b as f,c as N,d as a}from"./select-B6XUQb0n.js";import{P as T}from"./progress-B2ndVF8r.js";import{C as V}from"./circle-user-C0UBtafJ.js";import{C as H}from"./circle-check-BHOaP-8t.js";import"./index-DuY6vpjC.js";import"./index-DR_KIw6N.js";import"./chevron-down-BAeWndFz.js";import"./chevron-up-BRs2jkXF.js";const W=()=>{const{t:s,language:C}=L(),S=C==="he",b=R(),{toast:c}=k(),[n,y]=t.useState(""),[i,w]=t.useState(""),[o,P]=t.useState(""),[d,F]=t.useState(""),[h,u]=t.useState(!1),m=[n,i,o,d].filter(Boolean).length,x=m/4*100,E=async()=>{u(!0);try{const{data:{user:l}}=await j.auth.getUser();if(!l)throw new Error("Not authenticated");await j.from("profiles").update({full_name:n,phone:i,onboarding_completed:!0}).eq("id",l.id),c({title:s("×פר×פ×× × ×©×ר!","Profile saved!")}),b("/dashboard")}catch{c({title:s("ש×××× ×ש××ר×","Error saving"),variant:"destructive"})}finally{u(!1)}};return e.jsx("div",{className:"min-h-screen bg-background p-4 pb-24",dir:S?"rtl":"ltr",children:e.jsxs("div",{className:"max-w-lg mx-auto space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx(V,{className:"h-7 w-7 text-primary"}),e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:s("×ש××ת פר×פ××","Complete Profile")})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[e.jsx("span",{children:s("×תק×××ת","Progress")}),e.jsxs("span",{children:[Math.round(x),"%"]})]}),e.jsx(T,{value:x,className:"h-2"})]}),e.jsx(B,{children:e.jsxs(I,{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("×©× ×××","Full Name")}),e.jsx(p,{value:n,onChange:l=>y(l.target.value),placeholder:s("××× ×¡ ×©× ×××","Enter full name")}
1)]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("××פ××","Phone")}),e.jsx(p,{value:i,onChange:l=>w(l.target.value),placeholder:"050-000-0000",type:"tel"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("×§×פת ×××××","Health Fund")}),e.jsxs(g,{value:o,onValueChange:P,children:[e.jsx(v,{children:e.jsx(f,{placeholder:s("××ר ×§×פת ×××××","Select health fund")})}),e.jsxs(N,{children:[e.jsx(a,{value:"clalit",children:s("××××ת","Clalit")}),e.jsx(a,{value:"maccabi",children:s("××××","Maccabi")}),e.jsx(a,{value:"meuhedet",children:s("×××××ת","Meuhedet")}),e.jsx(a,{value:"leumit",children:s("×××××ת","Leumit")})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:s("×××ר ×××ר××","Region")}),e.jsxs(g,{value:d,onValueChange:F,children:[e.jsx(v,{children:e.jsx(f,{placeholder:s("××ר ×××ר","Select region")})}),e.jsxs(N,{children:[e.jsx(a,{value:"north",children:s("צפ××","North")}),e.jsx(a,{value:"center",children:s("×ר××","Center")}),e.jsx(a,{value:"south",children:s("×ר××","South")}),e.jsx(a,{value:"jerusalem",children:s("×ר×ש×××","Jerusalem")})]})]})]}),e.jsxs(M,{className:"w-full",size:"lg",onClick:E,disabled:h||m<2,children:[e.jsx(H,{className:"h-4 w-4 me-2"}),h?s("ש××ר...","Saving..."):s("ש××ר ×××ש×","Save & Continue")]})]})})]})})};export{W 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.