1import{a as be,u as ye,b as we,r as i,s as m,j as e,H as _e,aQ as Se,C as k,d as D,e as F,g as E,k as Ce,aR as ke,f as z,I as y,B as u,aS as R,aT as Y,aU as H,l as ne,i as le,V as De,aV as Fe}from"./index-D4T1ghJH.js";import{L as c}from"./label-BeVhvnkf.js";import{T as Ee}from"./textarea-pDjx8h1t.js";import{S as Te,a as Ie,b as $e,c as Pe,d as Be}from"./select-Cc7pUdUd.js";import{C as Oe}from"./camera-capture-COAZAy-u.js";import"./index-Dg9XYgQE.js";const Re=()=>{const ce=typeof window<"u"?window.location.href:"/identity",{user:o}=be(),{toast:d}=ye(),{t:s,dir:T}=we(),[a,w]=i.useState(null),[de,oe]=i.useState(!0),[_,x]=i.useState(!1),[h,f]=i.useState(0),[I,K]=i.useState(""),[$,G]=i.useState(""),[P,M]=i.useState(""),[B,Q]=i.useState(""),[S,X]=i.useState(""),[O,J]=i.useState(""),[C,W]=i.useState(""),[p,me]=i.useState(null),[v,ue]=i.useState(null),[j,V]=i.useState(null),[L,g]=i.useState(0),[xe,Z]=i.useState(!1),ee=[{value:"national_id",label:s("اÙÙÙÙØ© اÙÙØ·ÙÙØ©"),icon:"ð"},{value:"passport",label:s("Ø¬ÙØ§Ø² Ø§ÙØ³Ùر"),icon:"ð"},{value:"driving_license",label:s("رخصة اÙÙÙØ§Ø¯Ø©"),icon:"ð"},{value:"residence_permit",label:s("Ø§ÙØ¥ÙاÙ
Ø©"),icon:"ð"}],q=[{id:"personal",title:s("اÙÙ
عÙÙÙ
ات Ø§ÙØ´Ø®ØµÙØ©"),description:s("أدخ٠Ù
عÙÙÙ
Ø§ØªÙ Ø§ÙØ´Ø®ØµÙØ© Ø§ÙØµØÙØØ© ÙØ§ÙÙ
Ø·Ø§Ø¨ÙØ© ÙÙÙØ«Ø§Ø¦Ù Ø§ÙØ±Ø³Ù
ÙØ©")},{id:"documents",title:s("Ø±ÙØ¹ اÙÙØ«Ø§Ø¦Ù"),description:s("اختر ÙÙØ¹ اÙÙØ«ÙÙØ© ÙØ£Ø¯Ø®Ù رÙÙ
ÙØ§")},{id:"verification",title:s("Ø§ÙØªÙØ«ÙÙ"),description:s("Ù
راجعة Ø§ÙØ·Ùب")}];i.useEffect(()=>{o&&se()},[o]);const se=async()=>{try{const{data:t,error:r}=await m.from("identity_verification").select("*").eq("user_id",o?.id).order("created_at",{ascending:!1}).limit(1).single();if(r&&r.code!=="PGRST116")throw r;t&&(w(t),K(t.full_name||""),G(t.date_of_birth||""),M(t.nationality||""),Q(t.address||""),X(t.phone_number||""),J(t.document_type||""),W(t.document_number||""),t.status==="pending"||t.status==="verified"||t.status==="approved"?f(2):t.document_type&&f(1))}catch(t){console.error("Error fetching verification:",t)}oe(!1)},he=async()=>{if(!I||!$||!P||!B||!S){d({title:s("Ø¨ÙØ§Ùات ÙØ§Ùصة"),description:s("ÙØ±Ø¬Ù Ù
ÙØ¡ جÙ
ÙØ¹ Ø§ÙØÙÙ٠اÙÙ
Ø·ÙÙØ¨Ø©"),variant:"destructive"});return}x(!0);try{const{data:t}=await m.from("identity_verification").select("id, user_id").eq("phone_number",S.trim()).in("status",["pending","verified","approved"]).neq("user_id",o?.id??"").maybeSingle();if(t){d({title:s("رÙÙ
Ù
ÙØ±Ø±"),description:s("رÙÙ
اÙÙØ§ØªÙ Ù
Ø³Ø¬Ù Ø¨ØØ³Ø§Ø¨ آخر"),variant:"destructive"}),x(!1);return}if(!o?.id)throw new Error(s("ÙØ±Ø¬Ù تسجÙÙ Ø§ÙØ¯Ø®ÙÙ"));const r={user_id:o.id,verification_type:"kyc",status:"draft",full_name:I.trim(),date_of_birth:$,nationality:P.trim(),address:B.trim(),phone_number:S.trim()};if(a){const{data:l,error:n}=await m.from("identity_verification").update(r).eq("id",a.id).select("*").single();if(n)throw n;w(l)}else{const{data:l,error:n}=await m.from("identity_verification").insert([r]).select().single();if(n)throw n;w(l)}d({title:s("تÙ
ØÙظ Ø§ÙØ¨ÙØ§ÙØ§Øª"),description:s("تÙ
ØÙظ Ù
عÙÙÙ
Ø§ØªÙ Ø§ÙØ´Ø®ØµÙØ© Ø¨ÙØ¬Ø§Ø")}),f(1)}catch(t){console.error("Error saving personal info:",t);const r=t?.code==="23505"?s("رÙÙ
اÙÙØ§ØªÙ Ù
Ø³Ø¬Ù Ø¨ØØ³Ø§Ø¨ آخر"):s("ØØ¯Ø« خطأ Ø£Ø«ÙØ§Ø¡ ØÙظ Ø§ÙØ¨ÙØ§ÙØ§Øª");d({title:s("خطأ ÙÙ Ø§ÙØÙØ¸"),description:r,variant:"destructive"})}x(!1)},A=async(t,r)=>{const{data:l,error:n}=await m.storage.from("identity-documents").upload(r,t,{cacheControl:"3600",upsert:!1});if(n)throw n;return l.path},fe=async()=>{if(!O||!C){d({title:s("Ø¨ÙØ§Ùات ÙØ§Ùصة"),description:s("ÙØ±Ø¬Ù Ø§Ø®ØªÙØ§Ø± ÙÙØ¹ اÙÙØ«ÙÙØ© ÙØ¥Ø¯Ø®Ø§Ù رÙÙ
ÙØ§"),variant:"destructive"});return}const t=!!a?.document_front_url,r=!!a?.selfie_url;if(!p&&!t||!j&&!r){d({title:s("اÙÙØ«Ø§Ø¦Ù Ù
Ø·ÙÙØ¨Ø©"),description:s("ÙØ±Ø¬Ù Ø±ÙØ¹ ØµÙØ±Ø© اÙÙØ«ÙÙØ© ÙØ§ÙØµÙØ±Ø© Ø§ÙØ´Ø®ØµÙØ©"),variant:"destructive"});return}x(!0);try{const{data:l}=await m.from("identity_verification").select("id, user_id").eq("document_number",C.trim()).in("status",["pen
1ding","verified","approved"]).neq("user_id",o?.id??"").maybeSingle();if(l){d({title:s("رÙÙ
Ù
ÙØ±Ø±"),description:s("رÙÙ
اÙÙØ«ÙÙØ© Ù
Ø³Ø¬Ù Ø¨ØØ³Ø§Ø¨ آخر"),variant:"destructive"}),x(!1);return}g(20);const n=Date.now(),b=o?.id;if(!b)throw new Error(s("ÙØ±Ø¬Ù تسجÙÙ Ø§ÙØ¯Ø®ÙÙ"));let N=a;if(!N){const{data:re,error:ie}=await m.from("identity_verification").insert([{user_id:b,verification_type:"kyc",status:"draft"}]).select("*").single();if(ie)throw ie;N=re,w(re)}const Ne=p?await A(p,`${b}/front_${n}.${p.name.split(".").pop()}`):N.document_front_url;g(50);let te=N.document_back_url;v&&(te=await A(v,`${b}/back_${n}.${v.name.split(".").pop()}`)),g(70);const ve=j?await A(j,`${b}/selfie_${n}.${j.name.split(".").pop()}`):N.selfie_url;g(90);const{error:ae}=await m.from("identity_verification").update({document_type:O,document_number:C.trim(),document_front_url:Ne,document_back_url:te,selfie_url:ve,status:"pending"}).eq("id",N.id);if(ae)throw ae;g(100),d({title:s("تÙ
Ø¥Ø±Ø³Ø§Ù Ø§ÙØ·Ùب"),description:s("تÙ
Ø¥Ø±Ø³Ø§Ù Ø·ÙØ¨ Ø§ÙØªØÙÙ Ù
٠اÙÙÙÙØ© ÙÙÙ
راجعة")}),f(2),se()}catch(l){console.error("Error submitting documents:",l);const n=l?.code==="23505"?s("رÙÙ
اÙÙØ«ÙÙØ© Ù
Ø³Ø¬Ù Ø¨ØØ³Ø§Ø¨ آخر"):s("ØØ¯Ø« خطأ Ø£Ø«ÙØ§Ø¡ Ø±ÙØ¹ اÙÙØ«Ø§Ø¦Ù");d({title:s("خطأ ÙÙ Ø§ÙØ¥Ø±Ø³Ø§Ù"),description:n,variant:"destructive"})}x(!1),g(0)},pe=t=>{switch(t){case"verified":case"approved":return e.jsx(ne,{className:"h-5 w-5 text-green-500"});case"pending":return e.jsx(le,{className:"h-5 w-5 text-yellow-500"});case"rejected":return e.jsx(Fe,{className:"h-5 w-5 text-red-500"});default:return e.jsx(De,{className:"h-5 w-5 text-gray-500"})}},je=t=>{switch(t){case"verified":case"approved":return s("تÙ
Ø§ÙØªØÙÙ");case"pending":return s("ÙÙØ¯ اÙÙ
راجعة");case"rejected":return s("Ù
رÙÙØ¶");case"draft":return s("Ù
Ø³ÙØ¯Ø©");default:return s("ØºÙØ± Ù
ØØ¯Ø¯")}},ge=t=>{switch(t){case"verified":case"approved":return"bg-green-100 text-green-800 border-green-200";
1case"pending":return"bg-yellow-100 text-yellow-800 border-yellow-200";case"rejected":return"bg-red-100 text-red-800 border-red-200";case"draft":return"bg-blue-100 text-blue-800 border-blue-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}},U=T==="rtl"?"ar-SA":"en-US";return de?e.jsx("div",{className:"container mx-auto px-4 py-16 text-center",children:e.jsxs("div",{className:"animate-pulse space-y-4",children:[e.jsx("div",{className:"h-8 bg-muted rounded w-1/3 mx-auto"}),e.jsx("div",{className:"h-4 bg-muted rounded w-1/2 mx-auto"})]})}):e.jsxs(e.Fragment,{children:[e.jsxs(_e,{children:[e.jsxs("title",{children:[s("ØªÙØ«Ù٠اÙÙÙÙØ©")," â Identity Verification"]}),e.jsx("meta",{name:"description",content:s("عÙ
ÙÙØ© Ø§ÙØªØÙÙ Ù
٠اÙÙÙÙØ© (KYC) تضÙ
٠أÙ
Ø§Ù ØØ³Ø§Ø¨Ù ÙØ§ÙاÙ
تثا٠ÙÙÙ
عاÙÙØ± اÙÙ
Ø·ÙÙØ¨Ø©. ÙØ±Ø¬Ù ØªÙØ¯ÙÙ
Ø¨ÙØ§Ùات دÙÙÙØ© ÙÙ
Ø·Ø§Ø¨ÙØ© ÙÙÙØ«Ø§Ø¦Ù Ø§ÙØ±Ø³Ù
ÙØ©.")}),e.jsx("link",{rel:"canonical",href:ce})]}),e.jsx("div",{className:"min-h-screen",style:{backgroundImage:"url('/lovable-uploads/5f71efaf-8d4b-42c4-993b-f0d50e00f50e.png')",backgroundSize:"cover",backgroundPosition:"center",backgroundAttachment:"fixed"},children:e.jsxs("div",{className:"min-h-screen bg-background/90",children:[e.jsx("section",{className:"container mx-auto px-4 py-16",dir:T,children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"mb-8",style:{textAlign:T==="rtl"?"right":"left"},children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("div",{className:"bg-primary/10 p-4 rounded-full",children:e.jsx(Se,{className:"h-8 w-8 text-primary"})})}),e.jsx("h1",{className:"font-cairo text-3xl md:text-5xl font-bold mb-4 text-center",children:s("ØªÙØ«Ù٠اÙÙÙÙØ©")}),e.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto mb-4 font-cairo text-center",children:s("عÙ
ÙÙØ© Ø§ÙØªØÙÙ Ù
٠اÙÙÙÙØ© (KYC) تضÙ
٠أÙ
Ø§Ù ØØ³Ø§Ø¨Ù ÙØ§ÙاÙ
تثا٠ÙÙÙ
عاÙÙØ± اÙÙ
Ø·ÙÙØ¨Ø©. ÙØ±Ø¬Ù ØªÙØ¯ÙÙ
Ø¨ÙØ§Ùات دÙÙÙØ© ÙÙ
Ø·Ø§Ø¨ÙØ© ÙÙÙØ«Ø§Ø¦Ù Ø§ÙØ±Ø³Ù
ÙØ©.")}),e.jsxs("div",{className:"bg-destructive/10 border border-destructive/30 rounded-lg p-4 max-w-2xl mx-auto",children:[e.jsxs("p",{className:"text-sm font-cairo text-destructive font-semibold mb-2",children:["â ï¸ ",s("ØªØØ°Ùر Ù
ÙÙ
")]}),e.jsx("p",{className:"text-xs font-cairo text-muted-foreground leading-relaxed",children:s("ÙØ±Ø¬Ù ØªØØ±Ù Ø§ÙØ¯ÙØ© اÙÙØ§Ù
ÙØ© ÙÙ
Ø·Ø§Ø¨ÙØ© اÙÙØ§Ùع Ù٠جÙ
ÙØ¹ اÙÙ
عÙÙÙ
ات اÙÙ
ÙØ¯Ù
Ø©.")})]})]}),a&&e.jsxs(k,{className:"mb-8",children:[e.jsx(D,{children:e.jsxs(F,{className:"flex items-center gap-3 font-cairo",children:[pe(a.status),s("ØØ§ÙØ© Ø§ÙØªØÙÙ Ø§ÙØØ§ÙÙØ©")]})}),e.jsx(E,{children:e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[e.jsxs("div",{children:[e.jsx(Ce,{className:ge(a.status),children:je(a.status)}),a.verified_at&&e.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[s("تÙ
Ø§ÙØªØÙÙ ÙÙ:")," ",new Date(a.verified_at).toLocaleDateString(U)]}),a.verification_notes&&e.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[s("Ù
ÙØ§ØØ¸Ø§Øª"),": ",a.verification_notes]})]}),e.jsxs("div",{className:"text-end",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s("ØªØ§Ø±ÙØ® Ø§ÙØ·Ùب"),": ",new Date(a.created_at).toLocaleDateString(U)]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s("آخر ØªØØ¯ÙØ«"),": ",new Date(a.updated_at).toLocaleDateString(U)]})]})]})})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("div",{className:"flex items-center justify-between mb-6",children:q.map((t,r)=>e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${r<=h?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,children:r+1}),r<q.length-1&&e.jsx("div",{className:`w-16 h-0.5 ${r<h?"bg-primary":"bg-muted"}`})]},t.id))}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4",children:q.map((t,r)=>e.jsxs("div",{className:`text-center p-4 rounded-lg ${r<=h?"bg-primary/5 border-primary/20":"bg-muted/50"}`,children:[e.jsx("h3",{className:"font-semibold font-cairo",children:t.title}),e.jsx("p",{className:"text-sm text-muted-foreground font-cairo",children:t.description})]},t.id))})]}),h===0&&e.jsxs(k,{children:[e.jsxs(D,{children:[e.jsxs(F,{className:"flex items-center gap-2 font-cairo",children:[e.jsx(ke,{className:"h-5 w-5"}),s("اÙÙ
عÙÙÙ
ات Ø§ÙØ´Ø®ØµÙØ©")]}),e.jsx(z,{className:"font-cairo",children:s("أدخ٠Ù
عÙÙÙ
Ø§ØªÙ Ø§ÙØ´Ø®ØµÙØ© Ø§ÙØµØÙØØ© ÙØ§ÙÙ
Ø·Ø§Ø¨ÙØ© ÙÙÙØ«Ø§Ø¦Ù Ø§ÙØ±Ø³Ù
ÙØ©")})]}),e.jsxs(E,{className:"space-y-6",children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(c,{htmlFor:"fullName",className:"font-cairo",children:[s("Ø§ÙØ§Ø³Ù
اÙÙØ§Ù
Ù")," *"]}),e.jsx(y,{id:"fullName",value:I,onChange:t=>K(t.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(c,{htmlFor:"dateOfBirth",className:"font-cairo",children:[s("ØªØ§Ø±ÙØ® اÙÙ
ÙÙØ§Ø¯")," *"]}),e.jsx(y,{id:"dateOfBirth",type:"date",value:$,onChange:t=>G(t.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(c,{htmlFor:"nationality",className:"font-cairo",children:[s("Ø§ÙØ¬ÙØ³ÙØ©")," *"]}),e.jsx(y,{id:"nationality",value:P,onChange:t=>M(t.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(c,{htmlFor:"phoneNumber",className:"font-cairo",children:[s("رÙÙ
اÙÙØ§ØªÙ")," *"]}),e.jsx(y,{id:"phoneNumber",value:S,onChange:t=>X(t.target.value),placeholder:"+966xxxxxxxxx"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(c,{htmlFor:"address",className:"font-cairo",children:[s("Ø§ÙØ¹ÙÙØ§Ù اÙÙØ§Ù
Ù")," *"]}
1),e.jsx(Ee,{id:"address",value:B,onChange:t=>Q(t.target.value),rows:3})]}),e.jsx(u,{onClick:he,disabled:_,className:"w-full font-cairo",children:s(_?"Ø¬Ø§Ø±Ù Ø§ÙØÙØ¸...":"ØÙظ ÙØ§ÙÙ
تابعة")})]})]}),h===1&&e.jsxs(k,{children:[e.jsxs(D,{children:[e.jsxs(F,{className:"flex items-center gap-2 font-cairo",children:[e.jsx(R,{className:"h-5 w-5"}),s("Ø±ÙØ¹ اÙÙØ«Ø§Ø¦Ù")]}),e.jsx(z,{className:"font-cairo",children:s("اختر ÙÙØ¹ اÙÙØ«ÙÙØ© ÙØ£Ø¯Ø®Ù رÙÙ
ÙØ§")})]}),e.jsxs(E,{className:"space-y-6",children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(c,{className:"font-cairo",children:[s("ÙÙØ¹ اÙÙØ«ÙÙØ©")," *"]}),e.jsxs(Te,{value:O,onValueChange:J,children:[e.jsx(Ie,{children:e.jsx($e,{placeholder:s("اختر ÙÙØ¹ اÙÙØ«ÙÙØ©")})}),e.jsx(Pe,{children:ee.map(t=>e.jsx(Be,{value:t.value,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:t.icon}),t.label]})},t.value))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(c,{className:"font-cairo",children:[s("رÙÙ
اÙÙØ«ÙÙØ©")," *"]}),e.jsx(y,{value:C,onChange:t=>W(t.target.value),placeholder:s("أدخ٠رÙÙ
اÙÙØ«ÙÙØ©")})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(c,{className:"font-cairo",children:[s("ØµÙØ±Ø© اÙÙØ«ÙÙØ© - اÙÙØ¬Ù Ø§ÙØ£Ù
اÙ
Ù")," *"]}),e.jsxs("div",{className:"border-2 border-dashed border-muted-foreground/25 rounded-lg p-4 text-center",children:[e.jsx("input",{id:"frontDocument",type:"file",accept:"image/*",onChange:t=>me(t.target.files?.[0]||null),className:"hidden"}),e.jsx("label",{htmlFor:"frontDocument",className:"cursor-pointer",children:p?e.jsxs("div",{className:"space-y-2",children:[e.jsx(R,{className:"h-8 w-8 mx-auto text-green-500"}),e.jsx("p",{className:"text-sm text-green-600",children:p.name})]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{className:"h-8 w-8 mx-auto text-muted-foreground"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("اضغط ÙØ±Ùع Ø§ÙØµÙرة")})]})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:s("ØµÙØ±Ø© اÙÙØ«ÙÙØ© - اÙÙØ¬Ù Ø§ÙØ®ÙÙÙ (Ø§Ø®ØªÙØ§Ø±Ù)")}),e.jsxs("div",{className:"border-2 border-dashed border-muted-foreground/25 rounded-lg p-4 text-center",children:[e.jsx("input",{id:"backDocument",type:"file",accept:"image/*",onChange:t=>ue(t.target.files?.[0]||null),className:"hidden"}),e.jsx("label",{htmlFor:"backDocument",className:"cursor-pointer",children:v?e.jsxs("div",{className:"space-y-2",children:[e.jsx(R,{className:"h-8 w-8 mx-auto text-green-500"}),e.jsx("p",{className:"text-sm text-green-600",children:v.name})]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx(Y,{className:"h-8 w-8 mx-auto text-muted-foreground"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("اضغط ÙØ±Ùع Ø§ÙØµÙرة")})]})})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(c,{children:[s("ØµÙØ±Ø© Ø´Ø®ØµÙØ© Ù
ع ØÙ
٠اÙÙØ«ÙÙØ©")," *"]}),e.jsxs("div",{className:"space-y-3",children:[j?e.jsxs("div",{className:"border-2 border-dashed border-green-300 rounded-lg p-4 text-center max-w-md mx-auto",children:[e.jsx(H,{className:"h-8 w-8 mx-auto text-green-500"}),e.jsx("p",{className:"text-sm text-green-600",children:j.name}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>V(null),className:"mt-2",children:s("Ø¥Ø²Ø§ÙØ© Ø§ÙØµÙرة")})]}):e.jsx("div",{className:"border-2 border-dashed border-muted-foreground/25 rounded-lg p-4 max-w-md mx-auto",children:e.jsxs("div",{className:"space-y-3 text-center",children:[e.jsx(H,{className:"h-8 w-8 mx-auto text-muted-foreground"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("اختر طرÙÙØ© Ø¥Ø¶Ø§ÙØ© Ø§ÙØµÙرة")}),e.jsxs("div",{className:"flex gap-2 justify-center",children:[e.jsxs(u,{variant:"outline",size:"sm",onClick:()=>Z(!0),className:"flex items-center gap-2",children:[e.jsx(H,{className:"h-4 w-4"}),s("ÙØªØ اÙÙØ§Ù
ÙØ±Ø§")]}),e.jsxs(u,{variant:"outline",size:"sm",onClick:()=>document.getElementById("selfieDocument")?.click(),className:"flex items-center gap-2",children:[e.jsx(Y,{className:"h-4 w-4"}),s("Ø±ÙØ¹ ØµÙØ±Ø©")]})]})]})}),e.jsx("input",{id:"selfieDocument",type:"file",accept:"image/*",onChange:t=>
1V(t.target.files?.[0]||null),className:"hidden"})]})]})]}),L>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{children:s("Ø¬Ø§Ø±Ù Ø§ÙØ±Ùع...")}),e.jsxs("span",{children:[L,"%"]})]}),e.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:e.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${L}%`}})})]}),e.jsxs("div",{className:"bg-muted/50 p-4 rounded-lg",children:[e.jsx("h4",{className:"font-semibold mb-2",children:s("Ù
ØªØ·ÙØ¨Ø§Øª اÙÙØ«Ø§Ø¦Ù:")}),e.jsxs("ul",{className:"space-y-1 text-sm text-muted-foreground",children:[e.jsxs("li",{children:["⢠",s("ØµÙØ±Ø© ÙØ§Ø¶ØØ© ÙÙÙØ¬Ù Ø§ÙØ£Ù
اÙ
Ù ÙÙÙØ«ÙÙØ©","Clear photo of the front side of the document")]}),e.jsxs("li",{children:["⢠",s("ØµÙØ±Ø© ÙØ§Ø¶ØØ© ÙÙÙØ¬Ù Ø§ÙØ®ÙÙÙ ÙÙÙØ«ÙÙØ© (إذا ÙØ§Ù ÙØØªÙ٠عÙÙ Ù
عÙÙÙ
ات)","Clear photo of the back side (if it contains info)")]}),e.jsxs("li",{children:["⢠",s("ØµÙØ±Ø© Ø´Ø®ØµÙØ© (سÙÙÙÙ) Ù
ع ØÙ
٠اÙÙØ«ÙÙØ©","Selfie while holding the document")]}),e.jsxs("li",{children:["⢠",s("ØªØ£ÙØ¯ Ù
Ù ÙØ¶ÙØ Ø¬Ù
ÙØ¹ اÙÙ
عÙÙÙ
ات ÙØ¹Ø¯Ù
ÙØ¬Ùد Ø§ÙØ¹Ùاس ÙÙØ¶ÙØ¡","Ensure all information is clear without light reflections")]})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(u,{variant:"outline",onClick:()=>f(0),className:"flex-1",children:s("Ø§ÙØ³Ø§Ø¨Ù")}),e.jsx(u,{onClick:fe,disabled:_,className:"flex-1",children:s(_?"Ø¬Ø§Ø±Ù Ø§ÙØ¥Ø±Ø³Ø§Ù...":"إرسا٠ÙÙÙ
راجعة")})]})]})]}),h===2&&e.jsxs(k,{children:[e.jsxs(D,{children:[e.jsxs(F,{className:"flex items-center gap-2",children:[e.jsx(ne,{className:"h-5 w-5"}),s("Ù
راجعة Ø§ÙØ·Ùب")]}),e.jsx(z,{children:s("تÙ
Ø§Ø³ØªÙØ§Ù
Ø·ÙØ¨Ù ÙÙÙ ÙÙØ¯ اÙÙ
راجعة Ù
Ù ÙØ¨Ù ÙØ±ÙÙÙØ§")})]}),e.jsxs(E,{className:"space-y-6",children:[e.jsxs("div",{className:"text-center py-8",children:[e.jsx("div",{className:"bg-primary/10 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(le,{className:"h-8 w-8 text-primary"})}),e.jsx("h3",{className:"text-xl font-semibold mb-2",children:s("Ø·ÙØ¨Ù ÙÙØ¯ اÙÙ
راجعة")}),e.jsx("p",{className:"text-muted-foreground mb-4",children:s("ÙØ³ØªØºØ±Ù Ø§ÙØªØÙÙ Ù
٠اÙÙÙÙØ© عادة Ù
Ù 1-3 Ø£ÙØ§Ù
عÙ
Ù. سÙÙÙÙ
بإشعار٠ÙÙØ± Ø§ÙØªÙ
ا٠اÙÙ
راجعة.")}),a&&e.jsxs("div",{className:"bg-muted/50 p-4 rounded-lg text-start",children:[e.jsx("h4",{className:"font-semibold mb-3",children:s("Ù
ÙØ®Øµ Ø§ÙØ·Ùب:")}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsxs("p",{children:[e.jsxs("strong",{children:[s("Ø§ÙØ§Ø³Ù
"),":"]})," ",a.full_name]}),e.jsxs("p",{children:[e.jsxs("strong",{children:[s("ØªØ§Ø±ÙØ® اÙÙ
ÙÙØ§Ø¯"),":"]})," ",a.date_of_birth]}),e.jsxs("p",{children:[e.jsxs("strong",{children:[s("Ø§ÙØ¬ÙØ³ÙØ©"),":"]})," ",a.nationality]})]}),e.jsxs("div",{children:[e.jsxs("p",{children:[e.jsxs("strong",{children:[s("ÙÙØ¹ اÙÙØ«ÙÙØ©"),":"]})," ",ee.find(t=>t.value===a.document_type)?.label]}),e.jsxs("p",{children:[e.jsxs("strong",{children:[s("رÙÙ
اÙÙØ«ÙÙØ©"),":"]})," ",a.document_number]}),e.jsxs("p",{children:[e.jsxs("strong",{children:[s("رÙÙ
اÙÙØ§ØªÙ"),":"]})," ",a.phone_number]})]})]})]})]}),e.jsxs("div",{className:"bg-blue-50 border border-blue-200 p-4 rounded-lg dark:bg-blue-950/20 dark:border-blue-800",children:[e.jsx("h4",{className:"font-semibold text-blue-800 dark:text-blue-300 mb-2",children:s("Ù
اذا بعدØ")}),e.jsxs("ul",{className:"text-sm text-blue-700 dark:text-blue-400 space-y-1",children:[e.jsxs("li",{children:["⢠",s("سÙÙÙÙ
ÙØ±ÙÙÙØ§ بÙ
راجعة جÙ
ÙØ¹ اÙÙ
عÙÙÙ
ات ÙØ§ÙÙØ«Ø§Ø¦Ù اÙÙ
ÙØ¯Ù
Ø©","Our team will review all submitted information and documents")]}),e.jsxs("li",{children:["⢠",s("ستتÙÙ٠إشعارا٠عبر Ø§ÙØ¨Ø±Ùد Ø§ÙØ¥ÙÙØªØ±ÙÙÙ Ø¨ÙØªÙجة اÙÙ
راجعة","You'll receive an email notification with the review result")]})]})]}),a?.status==="rejected"&&a.verification_notes&&e.jsxs("div",{className:"bg-red-50 border border-red-200 p-4 rounded-lg dark:bg-red-950/20 dark:border-red-800",children:[e.jsx("h4",{className:"font-semibold text-red-800 dark:text-red-300 mb-2",children:s("سبب Ø§ÙØ±Ùض:")}),e.jsx("p",{className:"text-sm text-red-700 dark:text-red-400",children:a.verification_notes}),e.jsx(u,{variant:"outline",className:"mt-3",onClick:()=>f(0),children:s("إعادة ØªÙØ¯ÙÙ
Ø§ÙØ·Ùب")})]})]})]})]})}),e.jsx(Oe,{isOpen:xe,onClose:()=>Z(!1),onCapture:t=>V(t)})]})})]})};export{Re 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.