// SYSTEM PANEL //
[ROOT]
/
home
/
csender
/
legus.lawnet.me_backup_20250830-212545
/
assets
[ PARENT ]
EDIT :: index-CJ0WrLJm.js
import{r as D,o as Z,C as ye,d as z,c as B,b as l,f as e,i as x,n as $,w as b,l as A,v as U,F as H,m as O,t as f,k as M,z as r,H as we,D as Y,h as K,I as Q,s as ee,B as X,J as he,e as j,T as ke,S as $e,u as N,E as Ce,G as De}from"./index-BhhcJpm2.js";import{C as Fe}from"./ClientFormModal-CrBZzoXV.js";const Ve=()=>{const S=D(null),E=D(!1),y=D(null),w=async()=>{try{E.value=!0,y.value=null;const m=await ye.getCaseCreateLookups();S.value=m.data}catch(m){y.value=m.message||"Failed to load lookup data",console.error("Error fetching case lookups:",m)}finally{E.value=!1}};return Z(()=>{w()}),{lookupsData:S,isLoading:E,error:y,refetchLookups:w}},_e={class:"bg-white"},Me={class:"bg-gray-100 px-6 py-4 flex items-center justify-between"},Le={key:0,class:"p-6"},Ae={class:"grid grid-cols-4 gap-6 mb-6"},Ee={class:"flex flex-col"},Se=["value"],je={key:0,class:"mt-1 text-xs text-red-500"},Be={class:"flex flex-col"},Ue={key:0,class:"mt-1 text-xs text-red-500"},Ne={class:"flex flex-col"},He=["value"],Oe={key:0,class:"mt-1 text-xs text-red-500"},Te={class:"flex flex-col"},ze={class:"relative"},Pe={key:0,class:"mt-1 text-xs text-red-500"},Ie={class:"grid grid-cols-4 gap-6 mb-6"},Ze={class:"flex flex-col"},Ge={class:"flex flex-col"},Je=["value"],Re={key:0,class:"mt-1 text-xs text-red-500"},qe={class:"flex flex-col"},Ke={class:"relative"},Qe={key:0,class:"mt-1 text-xs text-red-500"},Xe={class:"flex flex-col"},We={class:"grid grid-cols-4 gap-6"},Ye={class:"flex flex-col"},et={class:"flex flex-col"},tt=["value"],ot={key:0,class:"mt-1 text-xs text-red-500"},st={class:"flex flex-col"},lt={key:0,class:"mt-1 text-xs text-red-500"},rt=z({__name:"FileDataSection",props:{modelValue:{},errors:{},lookupsData:{}},emits:["update:modelValue"],setup(S,{emit:E}){const y=S,w=E,m=D(!1),n=B({get:()=>y.modelValue,set:v=>w("update:modelValue",v)}),p=()=>{m.value=!m.value};return(v,a)=>{var h,d,o,t;return r(),l("div",_e,[e("div",Me,[a[12]||(a[12]=e("h3",{class:"text-lg font-semibold text-gray-600"},"بيانات الملف",-1)),e("button",{onClick:p,class:"text-gray-500 hover:text-[#273F62] hover:bg-[#273F62]/10 rounded p-1 transition-all duration-200"},[(r(),l("svg",{class:$(["w-4 h-4 transition-transform",m.value?"rotate-180":"rotate-0"]),fill:"currentColor",viewBox:"0 0 24 24"},a[11]||(a[11]=[e("path",{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},null,-1)]),2))])]),m.value?x("",!0):(r(),l("div",Le,[e("div",Ae,[e("div",Ee,[a[14]||(a[14]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" الفرع "),e("span",{class:"text-red-500"},"*")],-1)),b(e("select",{"onUpdate:modelValue":a[0]||(a[0]=s=>n.value.branch=s),class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] bg-white focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",v.errors.branch?"border-red-500":"border-gray-300"])},[a[13]||(a[13]=e("option",{value:""},"الفرع",-1)),(r(!0),l(H,null,O((h=y.lookupsData)==null?void 0:h.lookup_options.branches,s=>(r(),l("option",{key:s.id,value:s.id},f(s.name_ar),9,Se))),128))],2),[[U,n.value.branch]]),v.errors.branch?(r(),l("p",je,f(v.errors.branch),1)):x("",!0)]),e("div",Be,[a[15]||(a[15]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" رقم الملف "),e("span",{class:"text-red-500"},"*")],-1)),b(e("input",{"onUpdate:modelValue":a[1]||(a[1]=s=>n.value.fileNumber=s),type:"text",placeholder:"01/2025",class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",v.errors.fileNumber?"border-red-500":"border-gray-300"])},null,2),[[M,n.value.fileNumber]]),v.errors.fileNumber?(r(),l("p",Ue,f(v.errors.fileNumber),1)):x("",!0)]),e("div",Ne,[a[17]||(a[17]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" السنة "),e("span",{class:"text-red-500"},"*")],-1)),b(e("select",{"onUpdate:modelValue":a[2]||(a[2]=s=>n.value.year=s),class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] bg-white focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",v.errors.year?"border-red-500":"border-gray-300"])},[a[16]||(a[16]=e("option",{value:""},"السنة",-1)),(r(!0),l(H,null,O((d=y.lookupsData)==null?void 0:d.form_metadata.year_options,s=>(r(),l("option",{key:s,value:s},f(s),9,He))),128))],2),[[U,n.value.year]]),v.errors.year?(r(),l("p",Oe,f(v.errors.year),1)):x("",!0)]),e("div",Te,[a[19]||(a[19]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" تاريخ قيد الدعوى "),e("span",{class:"text-red-500"},"*")],-1)),e("div",ze,[b(e("input",{"onUpdate:modelValue":a[3]||(a[3]=s=>n.value.registrationDate=s),type:"date",class:$(["w-full px-3 py-3 pr-10 border rounded-md text-sm text-[#54524F] focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",v.errors.registrationDate?"border-red-500":"border-gray-300"])},null,2),[[M,n.value.registrationDate]]),a[18]||(a[18]=e("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1))]),v.errors.registrationDate?(r(),l("p",Pe,f(v.errors.registrationDate),1)):x("",!0)])]),e("div",Ie,[e("div",Ze,[a[20]||(a[20]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," موضوع الدعوى ",-1)),b(e("input",{"onUpdate:modelValue":a[4]||(a[4]=s=>n.value.caseSubject=s),type:"text",placeholder:"نوع بوكالة عنوان الدعوى",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,512),[[M,n.value.caseSubject]])]),e("div",Ge,[a[22]||(a[22]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" مع من تمت المقابلة أول مرة "),e("span",{class:"text-red-500"},"*")],-1)),b(e("select",{"onUpdate:modelValue":a[5]||(a[5]=s=>n.value.firstMeeting=s),class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] bg-white focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",v.errors.firstMeeting?"border-red-500":"border-gray-300"])},[a[21]||(a[21]=e("option",{value:""},"مع من تمت المقابلة أول مرة",-1)),(r(!0),l(H,null,O((o=y.lookupsData)==null?void 0:o.lookup_options.employees,s=>(r(),l("option",{key:s.id,value:s.id},f(s.name_ar),9,Je))),128))],2),[[U,n.value.firstMeeting]]),v.errors.firstMeeting?(r(),l("p",Re,f(v.errors.firstMeeting),1)):x("",!0)]),e("div",qe,[a[24]||(a[24]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" تاريخ المقابلة "),e("span",{class:"text-red-500"},"*")],-1)),e("div",Ke,[b(e("input",{"onUpdate:modelValue":a[6]||(a[6]=s=>n.value.meetingDate=s),type:"date",class:$(["w-full px-3 py-3 pr-10 border rounded-md text-sm text-[#54524F] focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",v.errors.meetingDate?"border-red-500":"border-gray-300"])},null,2),[[M,n.value.meetingDate]]),a[23]||(a[23]=e("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1))]),v.errors.meetingDate?(r(),l("p",Qe,f(v.errors.meetingDate),1)):x("",!0)]),e("div",Xe,[a[25]||(a[25]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," نسبة النجاح ",-1)),b(e("input",{"onUpdate:modelValue":a[7]||(a[7]=s=>n.value.successRate=s),type:"text",placeholder:"نسبة النجاح",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,512),[[M,n.value.successRate]])])]),e("div",We,[e("div",Ye,[a[26]||(a[26]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," نوع أمر الاداء ",-1)),b(e("input",{"onUpdate:modelValue":a[8]||(a[8]=s=>n.value.performanceOrderType=s),type:"text",placeholder:"خط",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,512),[[M,n.value.performanceOrderType]])]),e("div",et,[a[28]||(a[28]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" حالة الملف "),e("span",{class:"text-red-500"},"*")],-1)),b(e("select",{"onUpdate:modelValue":a[9]||(a[9]=s=>n.value.fileStatus=s),class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] bg-white focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",v.errors.fileStatus?"border-red-500":"border-gray-300"])},[a[27]||(a[27]=e("option",{value:""},"حالة الملف",-1)),(r(!0),l(H,null,O((t=y.lookupsData)==null?void 0:t.lookup_options.case_file_statuses,s=>(r(),l("option",{key:s.id,value:s.code},f(s.name_ar),9,tt))),128))],2),[[U,n.value.fileStatus]]),v.errors.fileStatus?(r(),l("p",ot,f(v.errors.fileStatus),1)):x("",!0)]),e("div",st,[a[29]||(a[29]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" ترقيم المكتب القديم "),e("span",{class:"text-red-500"},"*")],-1)),b(e("input",{"onUpdate:modelValue":a[10]||(a[10]=s=>n.value.oldOfficeNumber=s),type:"text",class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",v.errors.oldOfficeNumber?"border-red-500":"border-gray-300"])},null,2),[[M,n.value.oldOfficeNumber]]),v.errors.oldOfficeNumber?(r(),l("p",lt,f(v.errors.oldOfficeNumber),1)):x("",!0)]),a[30]||(a[30]=e("div",null,null,-1))])]))])}}}),nt={class:"bg-white"},at={class:"bg-gray-100 px-6 py-4 flex items-center justify-between"},it={class:"flex items-center gap-4"},dt={key:0,class:"p-6"},ut={class:"mb-6"},pt={class:"flex items-center gap-2 text-sm font-medium text-[#54524F]"},ct={class:"grid grid-cols-4 gap-6"},mt={class:"flex flex-col"},ft={class:"relative"},vt=["value"],gt={key:0,class:"mt-1 text-xs text-red-500"},xt={class:"flex flex-col"},bt={key:0,class:"mt-1 text-xs text-red-500"},yt={class:"flex flex-col"},wt={class:"relative"},ht=["value"],kt={key:0,class:"mt-1 text-xs text-red-500"},$t={class:"flex flex-col"},Ct={key:0,class:"mt-1 text-xs text-red-500"},Dt=z({__name:"ClientMowakilSection",props:{modelValue:{},errors:{},lookupsData:{}},emits:["update:modelValue","open-client-search","open-mowakil-selection","open-add-client"],setup(S,{emit:E}){const y=S,w=E,m=D(!1),n=B({get:()=>y.modelValue,set:o=>w("update:modelValue",o)}),p=()=>{m.value=!m.value},v=()=>{w("open-add-client")},a=()=>{w("open-mowakil-selection")},h=B(()=>{if(!n.value.client)return"اختار";const o=n.value.client;return o.client_type==="individual"?o.name_ar||"عميل غير محدد":o.client_type==="company"?o.trade_name_ar||"شركة غير محددة":o.name_ar||"عميل غير محدد"}),d=B(()=>{var s;if(!n.value.selectedMowakils||n.value.selectedMowakils.length===0)return"اختار";if(!((s=y.lookupsData)!=null&&s.lookup_options.clients))return"جاري التحميل...";const o=y.lookupsData.lookup_options.clients.filter(i=>n.value.selectedMowakils.includes(i.id));if(o.length===0)return"اختار";const t=o.map(i=>i.client_type==="individual"?i.name_ar||"عميل غير محدد":i.trade_name_ar||"شركة غير محددة");return t.length>2?`${t.slice(0,2).join("، ")} و ${t.length-2} آخرين`:t.join("، ")});return(o,t)=>(r(),l("div",nt,[e("div",at,[t[6]||(t[6]=e("h3",{class:"text-lg font-semibold text-gray-600"},"بيانات العميل و الموكل",-1)),e("div",it,[e("button",{type:"button",onClick:v,class:"flex items-center gap-2 px-4 py-2 bg-transparent border border-[#273F62] text-[#273F62] text-sm rounded hover:bg-[#273F62]/10 focus:outline-none focus:ring-2 focus:ring-[#273F62] focus:ring-offset-2 transition-colors"},t[4]||(t[4]=[e("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})],-1),e("span",null,"إضافة عميل جديد",-1)])),e("button",{onClick:p,class:"text-gray-500 hover:text-[#273F62] hover:bg-[#273F62]/10 rounded p-1 transition-all duration-200"},[(r(),l("svg",{class:$(["w-4 h-4 transition-transform",m.value?"rotate-180":"rotate-0"]),fill:"currentColor",viewBox:"0 0 24 24"},t[5]||(t[5]=[e("path",{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},null,-1)]),2))])])]),m.value?x("",!0):(r(),l("div",dt,[e("div",ut,[e("label",pt,[b(e("input",{"onUpdate:modelValue":t[0]||(t[0]=s=>n.value.hasClientData=s),type:"checkbox",class:"w-4 h-4 text-[#DA7E13] bg-gray-100 border-gray-300 rounded focus:ring-[#DA7E13] focus:ring-2"},null,512),[[we,n.value.hasClientData]]),t[7]||(t[7]=e("span",null,"العميل مالك للبرنامج",-1))])]),e("div",ct,[e("div",mt,[t[9]||(t[9]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" العميل "),e("span",{class:"text-red-500"},"*")],-1)),e("div",ft,[e("input",{value:h.value,type:"text",readonly:"",placeholder:"اختار",class:$(["w-full px-3 py-3 pr-10 border rounded-md text-sm text-[#54524F] placeholder-gray-400 cursor-pointer bg-gray-50 focus:outline-none",o.errors.client?"border-red-500":"border-gray-300"]),onClick:t[1]||(t[1]=s=>o.$emit("open-client-search"))},null,10,vt),t[8]||(t[8]=e("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1))]),o.errors.client?(r(),l("p",gt,f(o.errors.client),1)):x("",!0)]),e("div",xt,[t[11]||(t[11]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" هل العميل هو الموكل؟ "),e("span",{class:"text-red-500"},"*")],-1)),b(e("select",{"onUpdate:modelValue":t[2]||(t[2]=s=>n.value.isClientMowakil=s),class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] bg-white focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",o.errors.isClientMowakil?"border-red-500":"border-gray-300"])},t[10]||(t[10]=[e("option",{value:""},"اختار",-1),e("option",{value:"yes"},"نعم",-1),e("option",{value:"no"},"لا",-1)]),2),[[U,n.value.isClientMowakil]]),o.errors.isClientMowakil?(r(),l("p",bt,f(o.errors.isClientMowakil),1)):x("",!0)]),e("div",yt,[t[13]||(t[13]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" الموكل "),e("span",{class:"text-red-500"},"*")],-1)),e("div",wt,[e("input",{value:d.value,type:"text",readonly:"",placeholder:"اختار",class:$(["w-full px-3 py-3 pr-10 border rounded-md text-sm text-[#54524F] placeholder-gray-400 cursor-pointer bg-gray-50 focus:outline-none",o.errors.selectedMowakils?"border-red-500":"border-gray-300"]),onClick:a},null,10,ht),t[12]||(t[12]=e("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1))]),o.errors.selectedMowakils?(r(),l("p",kt,f(o.errors.selectedMowakils),1)):x("",!0)]),e("div",$t,[t[15]||(t[15]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" حالة الموكل "),e("span",{class:"text-red-500"},"*")],-1)),b(e("select",{"onUpdate:modelValue":t[3]||(t[3]=s=>n.value.mowakilStatus=s),class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] bg-white focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",o.errors.mowakilStatus?"border-red-500":"border-gray-300"])},t[14]||(t[14]=[e("option",{value:""},"اختار",-1),e("option",{value:"active"},"نشط",-1),e("option",{value:"inactive"},"غير نشط",-1),e("option",{value:"suspended"},"معلق",-1)]),2),[[U,n.value.mowakilStatus]]),o.errors.mowakilStatus?(r(),l("p",Ct,f(o.errors.mowakilStatus),1)):x("",!0)])])]))]))}}),Ft={class:"bg-white"},Vt={class:"bg-gray-100 px-6 py-4 flex items-center justify-between"},_t={class:"flex items-center gap-4"},Mt={key:0,class:"p-6"},Lt={class:"grid grid-cols-4 gap-6"},At={class:"flex flex-col"},Et={class:"relative"},St=["value"],jt={key:0,class:"mt-1 text-xs text-red-500"},Bt={class:"flex flex-col"},Ut={class:"flex flex-col"},Nt={class:"flex flex-col"},Ht={class:"relative"},Ot=["value"],Tt=z({__name:"OpponentDataSection",props:{modelValue:{},errors:{},lookupsData:{}},emits:["update:modelValue","open-add-opponent","open-opponent-name-selection","open-opponent-details-selection"],setup(S,{emit:E}){const y=S,w=E,m=D(!1),n=B({get:()=>y.modelValue,set:t=>w("update:modelValue",t)}),p=()=>{m.value=!m.value},v=()=>{w("open-add-opponent")},a=B(()=>{if(!n.value.opponentName)return"اختار";const t=n.value.opponentName;return t.client_type==="individual"?t.name_ar||"عميل غير محدد":t.client_type==="company"?t.trade_name_ar||"شركة غير محددة":t.name_ar||"عميل غير محدد"}),h=B(()=>{if(!n.value.opponentDetails)return"اختار";const t=n.value.opponentDetails;return t.client_type==="individual"?t.name_ar||"عميل غير محدد":t.client_type==="company"?t.trade_name_ar||"شركة غير محددة":t.name_ar||"عميل غير محدد"}),d=()=>{w("open-opponent-name-selection")},o=()=>{w("open-opponent-details-selection")};return(t,s)=>(r(),l("div",Ft,[e("div",Vt,[s[4]||(s[4]=e("h3",{class:"text-lg font-semibold text-gray-600"},"بيانات الخصم",-1)),e("div",_t,[e("button",{type:"button",onClick:v,class:"flex items-center gap-2 px-4 py-2 bg-transparent border border-[#273F62] text-[#273F62] text-sm rounded hover:bg-[#273F62]/10 focus:outline-none focus:ring-2 focus:ring-[#273F62] focus:ring-offset-2 transition-colors"},s[2]||(s[2]=[e("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})],-1),e("span",null,"إضافة خصم جديد",-1)])),e("button",{onClick:p,class:"text-gray-500 hover:text-[#273F62] hover:bg-[#273F62]/10 rounded p-1 transition-all duration-200"},[(r(),l("svg",{class:$(["w-4 h-4 transition-transform",m.value?"rotate-180":"rotate-0"]),fill:"currentColor",viewBox:"0 0 24 24"},s[3]||(s[3]=[e("path",{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},null,-1)]),2))])])]),m.value?x("",!0):(r(),l("div",Mt,[e("div",Lt,[e("div",At,[s[6]||(s[6]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" اسم الخصم "),e("span",{class:"text-red-500"},"*")],-1)),e("div",Et,[e("input",{value:a.value,type:"text",readonly:"",placeholder:"اختار",class:$(["w-full px-3 py-3 pr-10 border rounded-md text-sm text-[#54524F] placeholder-gray-400 cursor-pointer bg-gray-50 focus:outline-none",t.errors.opponentName?"border-red-500":"border-gray-300"]),onClick:d},null,10,St),s[5]||(s[5]=e("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1))]),t.errors.opponentName?(r(),l("p",jt,f(t.errors.opponentName),1)):x("",!0)]),e("div",Bt,[s[7]||(s[7]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," محامي الخصم ",-1)),b(e("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>n.value.opponentLawyer=i),type:"text",placeholder:"اختار",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,512),[[M,n.value.opponentLawyer]])]),e("div",Ut,[s[8]||(s[8]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," هاتف محامي الخصم ",-1)),b(e("input",{"onUpdate:modelValue":s[1]||(s[1]=i=>n.value.opponentLawyerPhone=i),type:"tel",placeholder:"اختار",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,512),[[M,n.value.opponentLawyerPhone]])]),e("div",Nt,[s[10]||(s[10]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," كفيل الخصم ",-1)),e("div",Ht,[e("input",{value:h.value,type:"text",readonly:"",placeholder:"اختار",class:"w-full px-3 py-3 pr-10 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 cursor-pointer bg-gray-50 focus:outline-none",onClick:o},null,8,Ot),s[9]||(s[9]=e("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1))])])])]))]))}}),zt={class:"bg-white"},Pt={class:"bg-gray-100 px-6 py-4 flex items-center justify-between"},It={key:0,class:"p-6"},Zt={class:"grid grid-cols-4 gap-6 mb-6"},Gt={class:"flex flex-col"},Jt=["value"],Rt={key:0,class:"mt-1 text-xs text-red-500"},qt={class:"flex flex-col"},Kt={key:0,class:"mt-1 text-xs text-red-500"},Qt={class:"flex flex-col"},Xt={key:0,class:"mt-1 text-xs text-red-500"},Wt={class:"flex flex-col"},Yt={key:0,class:"mt-1 text-xs text-red-500"},eo={class:"grid grid-cols-4 gap-6 mb-6"},to={class:"flex flex-col"},oo={key:0,class:"mt-1 text-xs text-red-500"},so={class:"flex flex-col"},lo={key:0,class:"mt-1 text-xs text-red-500"},ro={class:"flex flex-col"},no={class:"relative"},ao=["value"],io={key:0,class:"mt-1 text-xs text-red-500"},uo={class:"flex flex-col"},po={key:0,class:"mt-1 text-xs text-red-500"},co={class:"grid grid-cols-4 gap-6 mb-6"},mo={class:"flex flex-col"},fo={class:"flex flex-col"},vo={class:"flex flex-col"},go={class:"flex flex-col"},xo={class:"grid grid-cols-4 gap-6 mb-6"},bo={class:"flex flex-col"},yo={class:"flex flex-col"},wo={class:"flex flex-col"},ho={class:"grid grid-cols-1 gap-6"},ko={class:"flex flex-col"},$o=z({__name:"CaseDataSection",props:{modelValue:{},errors:{},lookupsData:{}},emits:["update:modelValue","open-lawyer-selection"],setup(S,{emit:E}){const y=S,w=E,m=D([]),n=D(!1),p=B({get:()=>y.modelValue,set:o=>w("update:modelValue",o)}),v=()=>{n.value=!n.value},a=B(()=>p.value.assignedEmployee?p.value.assignedEmployee.name||"محامي غير محدد":""),h=()=>{w("open-lawyer-selection")},d=async()=>{try{const o=await Y.getEmployees({per_page:100});o.success&&o.data&&(m.value=o.data)}catch(o){console.error("Failed to load employees:",o)}};return Z(()=>{d()}),(o,t)=>{var s;return r(),l("div",zt,[e("div",Pt,[t[16]||(t[16]=e("h3",{class:"text-lg font-semibold text-gray-600"},"بيانات القضية",-1)),e("button",{onClick:v,class:"text-gray-500 hover:text-[#273F62] hover:bg-[#273F62]/10 rounded p-1 transition-all duration-200"},[(r(),l("svg",{class:$(["w-4 h-4 transition-transform",n.value?"rotate-180":"rotate-0"]),fill:"currentColor",viewBox:"0 0 24 24"},t[15]||(t[15]=[e("path",{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},null,-1)]),2))])]),n.value?x("",!0):(r(),l("div",It,[e("div",Zt,[e("div",Gt,[t[18]||(t[18]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" تصنيفات القضية "),e("span",{class:"text-red-500"},"*")],-1)),b(e("select",{"onUpdate:modelValue":t[0]||(t[0]=i=>p.value.caseType=i),class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] bg-white focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",o.errors.caseType?"border-red-500":"border-gray-300"])},[t[17]||(t[17]=e("option",{value:""},"مرتفعة",-1)),(r(!0),l(H,null,O((s=y.lookupsData)==null?void 0:s.lookup_options.case_types,i=>(r(),l("option",{key:i.id,value:i.code},f(i.name_ar),9,Jt))),128))],2),[[U,p.value.caseType]]),o.errors.caseType?(r(),l("p",Rt,f(o.errors.caseType),1)):x("",!0)]),e("div",qt,[t[20]||(t[20]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" نوع القضية "),e("span",{class:"text-red-500"},"*")],-1)),b(e("select",{"onUpdate:modelValue":t[1]||(t[1]=i=>p.value.subCaseType=i),class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] bg-white focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",o.errors.subCaseType?"border-red-500":"border-gray-300"])},t[19]||(t[19]=[e("option",{value:""},"اختار",-1),e("option",{value:"civil"},"مدنية",-1),e("option",{value:"commercial"},"تجارية",-1),e("option",{value:"criminal"},"جنائية",-1)]),2),[[U,p.value.subCaseType]]),o.errors.subCaseType?(r(),l("p",Kt,f(o.errors.subCaseType),1)):x("",!0)]),e("div",Qt,[t[21]||(t[21]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" القضية الرئيسية "),e("span",{class:"text-red-500"},"*")],-1)),b(e("input",{"onUpdate:modelValue":t[2]||(t[2]=i=>p.value.mainCase=i),type:"text",placeholder:"رقم القضية",class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",o.errors.mainCase?"border-red-500":"border-gray-300"])},null,2),[[M,p.value.mainCase]]),o.errors.mainCase?(r(),l("p",Xt,f(o.errors.mainCase),1)):x("",!0)]),e("div",Wt,[t[22]||(t[22]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" رقم الدعوى "),e("span",{class:"text-red-500"},"*")],-1)),b(e("input",{"onUpdate:modelValue":t[3]||(t[3]=i=>p.value.caseNumber=i),type:"text",placeholder:"اختار",class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",o.errors.caseNumber?"border-red-500":"border-gray-300"])},null,2),[[M,p.value.caseNumber]]),o.errors.caseNumber?(r(),l("p",Yt,f(o.errors.caseNumber),1)):x("",!0)])]),e("div",eo,[e("div",to,[t[24]||(t[24]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" المحكمة "),e("span",{class:"text-red-500"},"*")],-1)),b(e("select",{"onUpdate:modelValue":t[4]||(t[4]=i=>p.value.court=i),class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] bg-white focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",o.errors.court?"border-red-500":"border-gray-300"])},t[23]||(t[23]=[e("option",{value:""},"اختار",-1),e("option",{value:"high_court"},"المحكمة العليا",-1),e("option",{value:"appeal_court"},"محكمة الاستئناف",-1),e("option",{value:"first_instance"},"محكمة أول درجة",-1)]),2),[[U,p.value.court]]),o.errors.court?(r(),l("p",oo,f(o.errors.court),1)):x("",!0)]),e("div",so,[t[26]||(t[26]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" درجة القاضي "),e("span",{class:"text-red-500"},"*")],-1)),b(e("select",{"onUpdate:modelValue":t[5]||(t[5]=i=>p.value.judgeLevel=i),class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] bg-white focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",o.errors.judgeLevel?"border-red-500":"border-gray-300"])},t[25]||(t[25]=[e("option",{value:""},"عالي",-1),e("option",{value:"high"},"عالي",-1),e("option",{value:"medium"},"متوسط",-1),e("option",{value:"junior"},"مبتدئ",-1)]),2),[[U,p.value.judgeLevel]]),o.errors.judgeLevel?(r(),l("p",lo,f(o.errors.judgeLevel),1)):x("",!0)]),e("div",ro,[t[28]||(t[28]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" محامي القضية "),e("span",{class:"text-red-500"},"*")],-1)),e("div",no,[e("input",{value:a.value,type:"text",readonly:"",placeholder:"اختار",class:$(["w-full px-3 py-3 pr-10 border rounded-md text-sm text-[#54524F] placeholder-gray-400 cursor-pointer bg-gray-50 focus:outline-none",o.errors.assignedEmployee?"border-red-500":"border-gray-300"]),onClick:h},null,10,ao),t[27]||(t[27]=e("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1))]),o.errors.assignedEmployee?(r(),l("p",io,f(o.errors.assignedEmployee),1)):x("",!0)]),e("div",uo,[t[29]||(t[29]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" أرقام الجلسة "),e("span",{class:"text-red-500"},"*")],-1)),b(e("input",{"onUpdate:modelValue":t[6]||(t[6]=i=>p.value.sessionNumbers=i),type:"text",placeholder:"اختار",class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",o.errors.sessionNumbers?"border-red-500":"border-gray-300"])},null,2),[[M,p.value.sessionNumbers]]),o.errors.sessionNumbers?(r(),l("p",po,f(o.errors.sessionNumbers),1)):x("",!0)])]),e("div",co,[e("div",mo,[t[30]||(t[30]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," الدور ",-1)),b(e("input",{"onUpdate:modelValue":t[7]||(t[7]=i=>p.value.role=i),type:"text",placeholder:"من مختلف أسم المحامي",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,512),[[M,p.value.role]])]),e("div",fo,[t[31]||(t[31]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," المستشار ",-1)),b(e("input",{"onUpdate:modelValue":t[8]||(t[8]=i=>p.value.advisor=i),type:"text",placeholder:"من مختلف أسم المستشار",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,512),[[M,p.value.advisor]])]),e("div",vo,[t[32]||(t[32]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," القاضي ",-1)),b(e("input",{"onUpdate:modelValue":t[9]||(t[9]=i=>p.value.judge=i),type:"text",placeholder:"قم بكتابة اسم القاضي",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,512),[[M,p.value.judge]])]),e("div",go,[t[33]||(t[33]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," وكيل النيابة ",-1)),b(e("input",{"onUpdate:modelValue":t[10]||(t[10]=i=>p.value.prosecutor=i),type:"text",placeholder:"من مختلف وكيل النيابة",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,512),[[M,p.value.prosecutor]])])]),e("div",xo,[e("div",bo,[t[34]||(t[34]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," المحقق ",-1)),b(e("input",{"onUpdate:modelValue":t[11]||(t[11]=i=>p.value.investigator=i),type:"text",placeholder:"قم بادخال اسم المحقق",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,512),[[M,p.value.investigator]])]),e("div",yo,[t[35]||(t[35]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," المستشار ",-1)),b(e("input",{"onUpdate:modelValue":t[12]||(t[12]=i=>p.value.consultant=i),type:"text",placeholder:"من مختلف اسم المستشار",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,512),[[M,p.value.consultant]])]),e("div",wo,[t[36]||(t[36]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," القاضي ",-1)),b(e("input",{"onUpdate:modelValue":t[13]||(t[13]=i=>p.value.secondJudge=i),type:"text",placeholder:"قم بكتابة اسم القاضي",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,512),[[M,p.value.secondJudge]])]),t[37]||(t[37]=e("div",null,null,-1))]),e("div",ho,[e("div",ko,[t[38]||(t[38]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," ملحقات ",-1)),b(e("textarea",{"onUpdate:modelValue":t[14]||(t[14]=i=>p.value.attachments=i),rows:"3",placeholder:"",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent resize-vertical"},null,512),[[M,p.value.attachments]])])])]))])}}}),Co={class:"bg-white"},Do={class:"bg-gray-100 px-6 py-4 flex items-center justify-between"},Fo={key:0,class:"p-6"},Vo={class:"grid grid-cols-4 gap-6 mb-6"},_o={class:"flex flex-col"},Mo={key:0,class:"mt-1 text-xs text-red-500"},Lo={class:"flex flex-col"},Ao={key:0,class:"mt-1 text-xs text-red-500"},Eo={class:"flex flex-col"},So={key:0,class:"mt-1 text-xs text-red-500"},jo={class:"flex flex-col"},Bo={key:0,class:"mb-6"},Uo={key:0,class:"space-y-3"},No={class:"flex-1"},Ho=["onUpdate:modelValue"],Oo={class:"flex-1"},To=["onUpdate:modelValue"],zo=["onClick"],Po={key:1,class:"text-center py-8 text-gray-500"},Io={class:"grid grid-cols-1 gap-6"},Zo={class:"flex flex-col"},Go=z({__name:"ContractDataSection",props:{modelValue:{},errors:{},lookupsData:{}},emits:["update:modelValue"],setup(S,{emit:E}){const y=S,w=E,m=D(!1),n=B({get:()=>y.modelValue,set:h=>w("update:modelValue",h)}),p=()=>{m.value=!m.value},v=()=>{const h={...n.value,installments:[...n.value.installments,{amount:0,dueDate:""}]};w("update:modelValue",h)},a=h=>{const d=[...n.value.installments];d.splice(h,1);const o={...n.value,installments:d};w("update:modelValue",o)};return(h,d)=>(r(),l("div",Co,[e("div",Do,[d[6]||(d[6]=e("h3",{class:"text-lg font-semibold text-gray-600"},"بيانات التعاقد",-1)),e("button",{onClick:p,class:"text-gray-500 hover:text-[#273F62] hover:bg-[#273F62]/10 rounded p-1 transition-all duration-200"},[(r(),l("svg",{class:$(["w-4 h-4 transition-transform",m.value?"rotate-180":"rotate-0"]),fill:"currentColor",viewBox:"0 0 24 24"},d[5]||(d[5]=[e("path",{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},null,-1)]),2))])]),m.value?x("",!0):(r(),l("div",Fo,[e("div",Vo,[e("div",_o,[d[8]||(d[8]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" نوع التعاقد "),e("span",{class:"text-red-500"},"*")],-1)),b(e("select",{"onUpdate:modelValue":d[0]||(d[0]=o=>n.value.contractType=o),class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] bg-white focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",h.errors.contractType?"border-red-500":"border-gray-300"])},d[7]||(d[7]=[K('<option value="">اختر نوع التعاقد</option><option value="fixed_fee">أتعاب ثابتة</option><option value="hourly">أتعاب بالساعة</option><option value="percentage">نسبة من المبلغ</option><option value="mixed">مختلط</option>',5)]),2),[[U,n.value.contractType]]),h.errors.contractType?(r(),l("p",Mo,f(h.errors.contractType),1)):x("",!0)]),e("div",Lo,[d[9]||(d[9]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" تاريخ التعاقد "),e("span",{class:"text-red-500"},"*")],-1)),b(e("input",{"onUpdate:modelValue":d[1]||(d[1]=o=>n.value.contractDate=o),type:"date",class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",h.errors.contractDate?"border-red-500":"border-gray-300"])},null,2),[[M,n.value.contractDate]]),h.errors.contractDate?(r(),l("p",Ao,f(h.errors.contractDate),1)):x("",!0)]),e("div",Eo,[d[10]||(d[10]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"},[A(" مبلغ التعاقد "),e("span",{class:"text-red-500"},"*")],-1)),b(e("input",{"onUpdate:modelValue":d[2]||(d[2]=o=>n.value.contractAmount=o),type:"number",step:"0.01",min:"0",placeholder:"0.00",class:$(["w-full px-3 py-3 border rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",h.errors.contractAmount?"border-red-500":"border-gray-300"])},null,2),[[M,n.value.contractAmount,void 0,{number:!0}]]),h.errors.contractAmount?(r(),l("p",So,f(h.errors.contractAmount),1)):x("",!0)]),e("div",jo,[d[12]||(d[12]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," طريقة الدفع ",-1)),b(e("select",{"onUpdate:modelValue":d[3]||(d[3]=o=>n.value.paymentMethod=o),class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] bg-white focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},d[11]||(d[11]=[K('<option value="">اختر طريقة الدفع</option><option value="cash">نقداً</option><option value="bank_transfer">تحويل بنكي</option><option value="check">شيك</option><option value="installments">أقساط</option>',5)]),512),[[U,n.value.paymentMethod]])])]),n.value.paymentMethod==="installments"?(r(),l("div",Bo,[e("div",{class:"flex items-center justify-between mb-4"},[d[14]||(d[14]=e("h4",{class:"text-md font-semibold text-[#273F62]"},"تفاصيل الأقساط",-1)),e("button",{type:"button",onClick:v,class:"flex items-center gap-2 px-4 py-2 bg-[#DA7E13] text-white text-sm rounded hover:bg-[#c5711a] transition-colors"},d[13]||(d[13]=[e("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})],-1),A(" إضافة قسط ")]))]),n.value.installments.length>0?(r(),l("div",Uo,[(r(!0),l(H,null,O(n.value.installments,(o,t)=>(r(),l("div",{key:t,class:"flex items-center gap-4 p-4 bg-gray-50 rounded-lg"},[e("div",No,[d[15]||(d[15]=e("label",{class:"text-xs text-gray-500"},"مبلغ القسط",-1)),b(e("input",{"onUpdate:modelValue":s=>o.amount=s,type:"number",step:"0.01",min:"0",class:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,8,Ho),[[M,o.amount,void 0,{number:!0}]])]),e("div",Oo,[d[16]||(d[16]=e("label",{class:"text-xs text-gray-500"},"تاريخ الاستحقاق",-1)),b(e("input",{"onUpdate:modelValue":s=>o.dueDate=s,type:"date",class:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent"},null,8,To),[[M,o.dueDate]])]),e("button",{type:"button",onClick:s=>a(t),class:"text-red-500 hover:text-red-700 transition-colors"},d[17]||(d[17]=[e("svg",{class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"})],-1)]),8,zo)]))),128))])):(r(),l("div",Po,d[18]||(d[18]=[e("p",{class:"text-sm"},"لم يتم إضافة أقساط حتى الآن",-1)])))])):x("",!0),e("div",Io,[e("div",Zo,[d[19]||(d[19]=e("label",{class:"text-sm font-medium text-[#54524F] mb-2"}," شروط التعاقد الإضافية ",-1)),b(e("textarea",{"onUpdate:modelValue":d[4]||(d[4]=o=>n.value.terms=o),rows:"6",placeholder:"أدخل أي شروط أو ملاحظات إضافية حول التعاقد...",class:"w-full px-3 py-3 border border-gray-300 rounded-md text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent resize-vertical"},null,512),[[M,n.value.terms]])])])]))]))}}),Jo={class:"bg-white"},Ro={class:"bg-gray-100 px-6 py-4 flex items-center justify-between"},qo={key:0,class:"p-6"},Ko={class:"mb-8"},Qo={class:"flex items-center justify-between mb-4"},Xo={key:0,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},Wo={class:"flex items-center gap-3"},Yo={class:"flex-1 min-w-0"},es={class:"text-sm font-medium text-[#54524F] truncate"},ts={class:"text-xs text-gray-500"},os=["onClick"],ss={key:1,class:"flex flex-col items-center justify-center py-12 text-center border-2 border-dashed border-gray-300 rounded-lg"},ls={class:"border-t border-gray-200 pt-8"},rs={key:0,class:"mt-8 p-4 bg-green-50 rounded-lg border border-green-200"},ns={class:"grid grid-cols-2 gap-4 text-sm text-green-700"},as={class:"mr-2"},is={class:"mr-2"},ds=z({__name:"AttachmentsSection",props:{modelValue:{},errors:{},lookupsData:{}},emits:["update:modelValue","open-document-upload"],setup(S,{emit:E}){const y=S,w=E,m=D(!1),n=B({get:()=>y.modelValue,set:d=>w("update:modelValue",d)}),p=()=>{m.value=!m.value},v=d=>{if(d===0)return"0 Bytes";const o=1024,t=["Bytes","KB","MB","GB"],s=Math.floor(Math.log(d)/Math.log(o));return parseFloat((d/Math.pow(o,s)).toFixed(2))+" "+t[s]},a=B(()=>{const d=n.value.documents.reduce((o,t)=>o+(t.size||0),0);return v(d)}),h=d=>{const o=[...n.value.documents];o.splice(d,1),w("update:modelValue",{...n.value,documents:o})};return(d,o)=>(r(),l("div",Jo,[e("div",Ro,[o[3]||(o[3]=e("h3",{class:"text-lg font-semibold text-gray-600"},"مرفقات الدعوى",-1)),e("button",{onClick:p,class:"text-gray-500 hover:text-[#273F62] hover:bg-[#273F62]/10 rounded p-1 transition-all duration-200"},[(r(),l("svg",{class:$(["w-4 h-4 transition-transform",m.value?"rotate-180":"rotate-0"]),fill:"currentColor",viewBox:"0 0 24 24"},o[2]||(o[2]=[e("path",{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},null,-1)]),2))])]),m.value?x("",!0):(r(),l("div",qo,[e("div",Ko,[e("div",Qo,[o[5]||(o[5]=e("h4",{class:"text-md font-semibold text-[#273F62]"},"المستندات والملفات",-1)),e("button",{type:"button",onClick:o[0]||(o[0]=t=>d.$emit("open-document-upload")),class:"flex items-center gap-3 px-6 py-3 bg-[#DA7E13] text-white rounded-lg hover:bg-[#c5711a] focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:ring-offset-2 transition-colors"},o[4]||(o[4]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})],-1),e("span",null,"رفع المستندات",-1)]))]),n.value.documents.length>0?(r(),l("div",Xo,[(r(!0),l(H,null,O(n.value.documents,(t,s)=>(r(),l("div",{key:s,class:"flex items-center justify-between p-4 bg-white border border-gray-200 rounded-lg hover:shadow-sm transition-shadow"},[e("div",Wo,[o[6]||(o[6]=e("div",{class:"flex items-center justify-center w-10 h-10 bg-blue-100 rounded-lg"},[e("svg",{class:"w-5 h-5 text-blue-600",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})])],-1)),e("div",Yo,[e("p",es,f(t.name),1),e("p",ts,f(v(t.size)),1)])]),e("button",{type:"button",onClick:i=>h(s),class:"flex items-center justify-center w-8 h-8 text-red-500 hover:bg-red-50 rounded-full transition-colors"},o[7]||(o[7]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]),8,os)]))),128))])):(r(),l("div",ss,o[8]||(o[8]=[e("svg",{class:"w-16 h-16 text-gray-300 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1),e("p",{class:"text-gray-500 text-sm mb-2"},"لم يتم رفع أي مستندات حتى الآن",-1),e("p",{class:"text-gray-400 text-xs"},"يمكنك رفع ملفات PDF, DOC, DOCX, JPG, PNG",-1)])))]),e("div",ls,[o[9]||(o[9]=e("h4",{class:"text-md font-semibold text-[#273F62] mb-4"},"ملاحظات إضافية",-1)),b(e("textarea",{"onUpdate:modelValue":o[1]||(o[1]=t=>n.value.notes=t),rows:"6",placeholder:"أدخل أي ملاحظات أو معلومات إضافية حول مرفقات الدعوى...",class:"w-full px-4 py-3 border border-gray-300 rounded-lg text-sm text-[#54524F] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent resize-vertical"},null,512),[[M,n.value.notes]]),o[10]||(o[10]=e("p",{class:"text-xs text-gray-500 mt-2"},"هذه الملاحظات ستكون مرئية لجميع أعضاء الفريق العاملين على القضية",-1))]),n.value.documents.length>0?(r(),l("div",rs,[o[13]||(o[13]=e("h4",{class:"text-sm font-semibold text-green-800 mb-2"},"ملخص المرفقات",-1)),e("div",ns,[e("div",null,[o[11]||(o[11]=e("span",{class:"font-medium"},"عدد الملفات:",-1)),e("span",as,f(n.value.documents.length)+" ملف",1)]),e("div",null,[o[12]||(o[12]=e("span",{class:"font-medium"},"الحجم الإجمالي:",-1)),e("span",is,f(a.value),1)])])])):x("",!0)]))]))}}),us={key:0,class:"fixed inset-0 z-50 overflow-y-auto",dir:"rtl"},ps={class:"flex items-center justify-center min-h-screen p-4"},cs={class:"relative bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] flex flex-col"},ms={class:"flex items-center justify-between p-6 border-b border-gray-200"},fs={class:"text-lg font-semibold text-[#273F62]"},vs={class:"p-6 border-b border-gray-200"},gs={class:"relative"},xs={class:"flex-1 p-6 overflow-y-auto min-h-0"},bs={key:0,class:"flex justify-center py-8"},ys={key:1,class:"text-center py-8"},ws={class:"text-red-600 text-sm"},hs={key:2,class:"space-y-3"},ks=["onClick"],$s={class:"flex items-center gap-4"},Cs={key:0,class:"flex items-center"},Ds=["checked","onClick"],Fs={class:"flex items-center justify-center w-12 h-12 bg-[#DA7E13] text-white rounded-full"},Vs={class:"text-sm font-medium"},_s={class:"font-medium text-[#273F62]"},Ms={class:"text-sm text-gray-600"},Ls={class:"flex items-center gap-4 mt-1"},As={class:"text-xs text-gray-500"},Es={class:"text-xs text-gray-500"},Ss={key:0,class:"px-4 py-2 bg-[#DA7E13] text-white text-sm rounded hover:bg-[#c5711a] transition-colors"},js={key:3,class:"text-center py-8"},Bs={class:"text-gray-500 text-sm"},Us={class:"flex items-center justify-between p-6 bg-gray-50 border-t border-gray-200"},Ns={class:"flex items-center gap-3"},Hs={key:0,class:"text-sm text-gray-600"},Os=["disabled"],q=z({__name:"ClientSearchModal",props:{isVisible:{type:Boolean},multipleSelection:{type:Boolean},initialSelectedIds:{}},emits:["close","client-selected","clients-selected"],setup(S,{emit:E}){const y=S,w=E,m=D(!1),n=D(null),p=D(""),v=D([]),a=D([]),h=B(()=>{if(!p.value)return v.value;const g=p.value.toLowerCase();return v.value.filter(V=>{var L,T,G,J,R,I;return((L=V.name_ar)==null?void 0:L.toLowerCase().includes(g))||((T=V.name_en)==null?void 0:T.toLowerCase().includes(g))||((G=V.trade_name_ar)==null?void 0:G.toLowerCase().includes(g))||((J=V.trade_name_en)==null?void 0:J.toLowerCase().includes(g))||((R=V.email)==null?void 0:R.toLowerCase().includes(g))||((I=V.phone)==null?void 0:I.includes(g))})}),d=async()=>{m.value=!0,n.value=null;try{const g=await ee.getClients({per_page:100});if(g.success&&g.data)v.value=g.data;else throw new Error(g.message||"فشل في تحميل العملاء")}catch(g){n.value=g.message||"حدث خطأ في تحميل العملاء",console.error("Failed to load clients:",g)}finally{m.value=!1}},o=g=>g.client_type==="individual"?g.name_ar||g.name_en||"عميل غير محدد":g.trade_name_ar||g.trade_name_en||"شركة غير محددة",t=g=>o(g).split(" ").map(L=>L[0]).join("").substring(0,2).toUpperCase(),s=g=>{w("client-selected",g)},i=g=>{if(y.multipleSelection){const V=a.value.findIndex(L=>L.id===g.id);V>-1?a.value.splice(V,1):a.value.push(g)}else s(g)},u=g=>a.value.some(V=>V.id===g.id),F=()=>{y.multipleSelection&&w("clients-selected",[...a.value])},_=()=>{y.multipleSelection&&y.initialSelectedIds&&v.value.length>0&&(a.value=v.value.filter(g=>y.initialSelectedIds.includes(g.id)))};return Q(()=>y.isVisible,g=>{g&&(v.value.length===0?d():_()),g||(y.multipleSelection||(a.value=[]),p.value="")}),Q(()=>v.value,()=>{y.isVisible&&_()}),Z(()=>{y.isVisible&&d()}),(g,V)=>g.isVisible?(r(),l("div",us,[e("div",{class:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:V[0]||(V[0]=L=>g.$emit("close"))}),e("div",ps,[e("div",cs,[e("div",ms,[e("h2",fs,f(g.multipleSelection?"اختيار المواكيل":"اختيار العميل"),1),e("button",{onClick:V[1]||(V[1]=L=>g.$emit("close")),class:"text-gray-400 hover:text-gray-600 transition-colors"},V[4]||(V[4]=[e("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),e("div",vs,[e("div",gs,[b(e("input",{"onUpdate:modelValue":V[2]||(V[2]=L=>p.value=L),type:"text",class:"w-full px-4 py-3 pr-10 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",placeholder:"ابحث عن العميل بالاسم أو البريد الإلكتروني..."},null,512),[[M,p.value]]),V[5]||(V[5]=e("svg",{class:"absolute right-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))])]),e("div",xs,[m.value?(r(),l("div",bs,V[6]||(V[6]=[e("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#DA7E13]"},null,-1)]))):n.value?(r(),l("div",ys,[e("p",ws,f(n.value),1),e("button",{onClick:d,class:"mt-4 px-4 py-2 bg-[#DA7E13] text-white text-sm rounded hover:bg-[#c5711a] transition-colors"}," إعادة المحاولة ")])):h.value.length>0?(r(),l("div",hs,[(r(!0),l(H,null,O(h.value,L=>(r(),l("div",{key:L.id,class:"flex items-center justify-between p-4 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",onClick:T=>i(L)},[e("div",$s,[g.multipleSelection?(r(),l("div",Cs,[e("input",{type:"checkbox",checked:u(L),onClick:X(T=>i(L),["stop"]),class:"w-4 h-4 text-[#DA7E13] bg-gray-100 border-gray-300 rounded focus:ring-[#DA7E13] focus:ring-2"},null,8,Ds)])):x("",!0),e("div",Fs,[e("span",Vs,f(t(L)),1)]),e("div",null,[e("h3",_s,f(o(L)),1),e("p",Ms,f(L.email),1),e("div",Ls,[e("span",As,f(L.client_type==="individual"?"فرد":"شركة"),1),e("span",Es,f(L.phone||"لا يوجد هاتف"),1)])])]),g.multipleSelection?x("",!0):(r(),l("button",Ss," اختيار "))],8,ks))),128))])):(r(),l("div",js,[V[7]||(V[7]=e("svg",{class:"w-16 h-16 text-gray-300 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})],-1)),e("p",Bs,f(p.value?"لا توجد نتائج للبحث":"لا يوجد عملاء"),1)]))]),e("div",Us,[e("button",{onClick:V[3]||(V[3]=L=>g.$emit("close")),class:"px-6 py-2 bg-gray-100 text-[#54524F] rounded hover:bg-gray-200 transition-colors"}," إلغاء "),e("div",Ns,[g.multipleSelection&&a.value.length>0?(r(),l("span",Hs,f(a.value.length)+" مختار ",1)):x("",!0),g.multipleSelection?(r(),l("button",{key:1,onClick:F,disabled:a.value.length===0,class:$(["px-6 py-2 text-white rounded transition-colors",a.value.length===0?"bg-gray-400 cursor-not-allowed":"bg-[#DA7E13] hover:bg-[#c5711a]"])},f(a.value.length===0?"اختر مواكيل":`تأكيد (${a.value.length})`),11,Os)):x("",!0)])])])])])):x("",!0)}}),Ts={key:0,class:"fixed inset-0 z-50 overflow-y-auto",dir:"rtl"},zs={class:"flex items-center justify-center min-h-screen p-4"},Ps={class:"relative bg-white rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] overflow-hidden"},Is={class:"flex items-center justify-between p-6 border-b border-gray-200"},Zs={class:"p-6 border-b border-gray-200"},Gs={class:"relative"},Js={class:"p-6 max-h-96 overflow-y-auto"},Rs={key:0,class:"flex justify-center py-8"},qs={key:1,class:"text-center py-8"},Ks={class:"text-red-600 text-sm"},Qs={key:2,class:"space-y-3"},Xs=["onClick"],Ws={class:"flex items-center gap-4"},Ys={class:"font-medium text-[#273F62]"},el={class:"text-sm text-gray-600"},tl={class:"flex items-center gap-4 mt-1"},ol={class:"text-xs text-gray-500"},sl={class:"text-xs text-gray-500"},ll={key:3,class:"text-center py-8"},rl={class:"text-gray-500 text-sm"},nl={class:"flex items-center justify-end p-6 bg-gray-50 border-t border-gray-200"},al=z({__name:"CourtSelectionModal",props:{isVisible:{type:Boolean}},emits:["close","court-selected"],setup(S,{emit:E}){const y=S,w=E,m=D(!1),n=D(null),p=D(""),v=D([]),a=[{id:1,name_ar:"محكمة الجنح الكبرى",name_en:"Major Misdemeanors Court",type:"جنائية",location:"العدلية"},{id:2,name_ar:"محكمة الأحوال الشخصية",name_en:"Personal Status Court",type:"مدنية",location:"العدلية"},{id:3,name_ar:"المحكمة التجارية",name_en:"Commercial Court",type:"تجارية",location:"مدينة الكويت"},{id:4,name_ar:"محكمة العمل",name_en:"Labor Court",type:"عمالية",location:"الجهراء"},{id:5,name_ar:"محكمة الاستئناف",name_en:"Court of Appeals",type:"استئناف",location:"العدلية"}],h=B(()=>{if(!p.value)return v.value;const t=p.value.toLowerCase();return v.value.filter(s=>{var i,u,F,_;return((i=s.name_ar)==null?void 0:i.toLowerCase().includes(t))||((u=s.name_en)==null?void 0:u.toLowerCase().includes(t))||((F=s.type)==null?void 0:F.toLowerCase().includes(t))||((_=s.location)==null?void 0:_.toLowerCase().includes(t))})}),d=async()=>{m.value=!0,n.value=null;try{await new Promise(t=>setTimeout(t,500)),v.value=a}catch(t){n.value=t.message||"حدث خطأ في تحميل المحاكم",console.error("Failed to load courts:",t)}finally{m.value=!1}},o=t=>{w("court-selected",t)};return Q(()=>y.isVisible,t=>{t&&v.value.length===0&&d()}),Z(()=>{y.isVisible&&d()}),(t,s)=>t.isVisible?(r(),l("div",Ts,[e("div",{class:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:s[0]||(s[0]=i=>t.$emit("close"))}),e("div",zs,[e("div",Ps,[e("div",Is,[s[5]||(s[5]=e("h2",{class:"text-lg font-semibold text-[#273F62]"},"اختيار المحكمة",-1)),e("button",{onClick:s[1]||(s[1]=i=>t.$emit("close")),class:"text-gray-400 hover:text-gray-600 transition-colors"},s[4]||(s[4]=[e("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),e("div",Zs,[e("div",Gs,[b(e("input",{"onUpdate:modelValue":s[2]||(s[2]=i=>p.value=i),type:"text",class:"w-full px-4 py-3 pr-10 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:border-transparent",placeholder:"ابحث عن المحكمة..."},null,512),[[M,p.value]]),s[6]||(s[6]=e("svg",{class:"absolute right-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))])]),e("div",Js,[m.value?(r(),l("div",Rs,s[7]||(s[7]=[e("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#DA7E13]"},null,-1)]))):n.value?(r(),l("div",qs,[e("p",Ks,f(n.value),1),e("button",{onClick:d,class:"mt-4 px-4 py-2 bg-[#DA7E13] text-white text-sm rounded hover:bg-[#c5711a] transition-colors"}," إعادة المحاولة ")])):h.value.length>0?(r(),l("div",Qs,[(r(!0),l(H,null,O(h.value,i=>(r(),l("div",{key:i.id,class:"flex items-center justify-between p-4 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",onClick:u=>o(i)},[e("div",Ws,[s[8]||(s[8]=e("div",{class:"flex items-center justify-center w-12 h-12 bg-blue-100 text-blue-600 rounded-full"},[e("svg",{class:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})])],-1)),e("div",null,[e("h3",Ys,f(i.name_ar),1),e("p",el,f(i.name_en),1),e("div",tl,[e("span",ol,f(i.type||"محكمة عامة"),1),e("span",sl,f(i.location||"غير محدد"),1)])])]),s[9]||(s[9]=e("button",{class:"px-4 py-2 bg-[#DA7E13] text-white text-sm rounded hover:bg-[#c5711a] transition-colors"}," اختيار ",-1))],8,Xs))),128))])):(r(),l("div",ll,[s[10]||(s[10]=e("svg",{class:"w-16 h-16 text-gray-300 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1",d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})],-1)),e("p",rl,f(p.value?"لا توجد نتائج للبحث":"لا توجد محاكم"),1)]))]),e("div",nl,[e("button",{onClick:s[3]||(s[3]=i=>t.$emit("close")),class:"px-6 py-2 bg-gray-100 text-[#54524F] rounded hover:bg-gray-200 transition-colors"}," إلغاء ")])])])])):x("",!0)}}),il={key:0,class:"fixed inset-0 z-50 overflow-y-auto",dir:"rtl"},dl={class:"flex items-center justify-center min-h-screen p-4"},ul={class:"relative bg-white rounded-lg shadow-xl max-w-3xl w-full max-h-[90vh] overflow-hidden"},pl={class:"flex items-center justify-between p-6 border-b border-gray-200"},cl={class:"p-6"},ml={key:0,class:"mt-6"},fl={class:"text-md font-semibold text-[#273F62] mb-4"},vl={class:"space-y-3 max-h-64 overflow-y-auto"},gl={class:"flex items-center gap-3"},xl={class:"text-sm font-medium text-[#54524F]"},bl={class:"text-xs text-gray-500"},yl={class:"flex items-center gap-3"},wl={key:0,class:"flex items-center gap-2"},hl={class:"text-xs text-gray-500"},kl={key:1,class:"text-green-600"},$l={key:2,class:"text-red-600"},Cl=["onClick"],Dl={key:1,class:"mt-6"},Fl={class:"flex items-center justify-between mb-2"},Vl={class:"text-sm text-gray-500"},_l={class:"w-full bg-gray-200 rounded-full h-2"},Ml={class:"flex items-center justify-between p-6 bg-gray-50 border-t border-gray-200"},Ll={class:"flex items-center gap-3"},Al=["disabled"],El=z({__name:"DocumentUploadModal",props:{isVisible:{type:Boolean}},emits:["close","documents-uploaded"],setup(S,{emit:E}){const y=E,w=D(!1),m=D([]),n=D(!1),p=B(()=>{if(m.value.length===0)return 0;const i=m.value.reduce((u,F)=>u+(F.progress||0),0);return Math.round(i/m.value.length)}),v=i=>{var F;i.preventDefault(),w.value=!1;const u=Array.from(((F=i.dataTransfer)==null?void 0:F.files)||[]);h(u)},a=i=>{const u=i.target,F=Array.from(u.files||[]);h(F),u.value=""},h=i=>{const F=i.filter(_=>_.size>10485760?(alert(`الملف ${_.name} كبير جداً. الحد الأقصى 10 ميجابايت.`),!1):["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","image/jpeg","image/png","image/jpg"].includes(_.type)?!0:(alert(`نوع الملف ${_.name} غير مدعوم.`),!1)).map(_=>({file:_,name:_.name,size:_.size,type:_.type,progress:0,uploading:!1,uploaded:!1,error:null}));m.value.push(...F)},d=i=>{m.value.splice(i,1)},o=()=>{m.value=[]},t=i=>{if(i===0)return"0 Bytes";const u=1024,F=["Bytes","KB","MB","GB"],_=Math.floor(Math.log(i)/Math.log(u));return parseFloat((i/Math.pow(u,_)).toFixed(2))+" "+F[_]},s=async()=>{if(m.value.length!==0){n.value=!0;try{for(const u of m.value){u.uploading=!0,u.progress=0;for(let F=0;F<=100;F+=10)u.progress=F,await new Promise(_=>setTimeout(_,100));u.uploading=!1,u.uploaded=!0}const i=m.value.map(u=>({name:u.name,size:u.size,type:u.type,url:`https://example.com/uploads/${u.name}`,uploadedAt:new Date().toISOString()}));y("documents-uploaded",i),setTimeout(()=>{y("close"),m.value=[]},1e3)}catch(i){console.error("Upload failed:",i),m.value.forEach(u=>{u.uploading&&(u.uploading=!1,u.error="فشل في الرفع")})}finally{n.value=!1}}};return(i,u)=>i.isVisible?(r(),l("div",il,[e("div",{class:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:u[0]||(u[0]=F=>i.$emit("close"))}),e("div",dl,[e("div",ul,[e("div",pl,[u[7]||(u[7]=e("h2",{class:"text-lg font-semibold text-[#273F62]"},"رفع المستندات",-1)),e("button",{onClick:u[1]||(u[1]=F=>i.$emit("close")),class:"text-gray-400 hover:text-gray-600 transition-colors"},u[6]||(u[6]=[e("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),e("div",cl,[e("div",{onDrop:v,onDragover:u[3]||(u[3]=X(()=>{},["prevent"])),onDragenter:u[4]||(u[4]=X(()=>{},["prevent"])),class:$(["border-2 border-dashed rounded-lg p-8 text-center transition-colors",w.value?"border-[#DA7E13] bg-orange-50":"border-gray-300 hover:border-gray-400"])},[u[8]||(u[8]=K('<svg class="w-16 h-16 text-gray-300 mx-auto mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"></path></svg><h3 class="text-lg font-medium text-[#273F62] mb-2">اسحب الملفات هنا أو اضغط للاختيار</h3><p class="text-sm text-gray-600 mb-4">يمكنك رفع ملفات PDF, DOC, DOCX, JPG, PNG</p><p class="text-xs text-gray-500 mb-6">حد أقصى 10 ميجابايت لكل ملف</p>',4)),e("input",{ref:"fileInput",type:"file",multiple:"",accept:".pdf,.doc,.docx,.jpg,.jpeg,.png",onChange:a,class:"hidden"},null,544),e("button",{onClick:u[2]||(u[2]=F=>{var _;return(_=i.$refs.fileInput)==null?void 0:_.click()}),class:"px-6 py-3 bg-[#DA7E13] text-white rounded-lg hover:bg-[#c5711a] focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:ring-offset-2 transition-colors"}," اختيار الملفات ")],34),m.value.length>0?(r(),l("div",ml,[e("h4",fl,"الملفات المحددة ("+f(m.value.length)+")",1),e("div",vl,[(r(!0),l(H,null,O(m.value,(F,_)=>(r(),l("div",{key:_,class:"flex items-center justify-between p-3 bg-gray-50 border border-gray-200 rounded-lg"},[e("div",gl,[u[9]||(u[9]=e("div",{class:"flex items-center justify-center w-10 h-10 bg-blue-100 rounded-lg"},[e("svg",{class:"w-5 h-5 text-blue-600",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})])],-1)),e("div",null,[e("p",xl,f(F.name),1),e("p",bl,f(t(F.size)),1)])]),e("div",yl,[F.uploading?(r(),l("div",wl,[u[10]||(u[10]=e("div",{class:"w-4 h-4 border-2 border-[#DA7E13] border-t-transparent rounded-full animate-spin"},null,-1)),e("span",hl,f(F.progress||0)+"%",1)])):F.uploaded?(r(),l("div",kl,u[11]||(u[11]=[e("svg",{class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})],-1)]))):F.error?(r(),l("div",$l,u[12]||(u[12]=[e("svg",{class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})],-1)]))):x("",!0),e("button",{onClick:g=>d(_),class:"text-red-500 hover:text-red-700 transition-colors"},u[13]||(u[13]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]),8,Cl)])]))),128))])])):x("",!0),p.value>0&&p.value<100?(r(),l("div",Dl,[e("div",Fl,[u[14]||(u[14]=e("span",{class:"text-sm font-medium text-[#54524F]"},"تقدم الرفع",-1)),e("span",Vl,f(p.value)+"%",1)]),e("div",_l,[e("div",{class:"bg-[#DA7E13] h-2 rounded-full transition-all duration-300",style:he({width:`${p.value}%`})},null,4)])])):x("",!0)]),e("div",Ml,[e("button",{onClick:u[5]||(u[5]=F=>i.$emit("close")),class:"px-6 py-2 bg-gray-100 text-[#54524F] rounded hover:bg-gray-200 transition-colors"}," إلغاء "),e("div",Ll,[m.value.length>0&&!n.value?(r(),l("button",{key:0,onClick:o,class:"px-6 py-2 bg-red-100 text-red-600 rounded hover:bg-red-200 transition-colors"}," مسح الكل ")):x("",!0),e("button",{onClick:s,disabled:m.value.length===0||n.value,class:$(["px-6 py-2 rounded transition-colors",m.value.length===0||n.value?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"])},f(n.value?"جاري الرفع...":`رفع ${m.value.length} ملف`),11,Al)])])])])])):x("",!0)}}),Sl={class:"min-h-screen bg-[#F4F4F6]",dir:"rtl"},jl={class:"flex pt-16"},Bl={key:0,class:"p-6"},Ul={key:1,class:"p-6"},Nl={class:"bg-white rounded-lg shadow-sm border border-red-200 p-8"},Hl={class:"text-center text-red-600"},Ol={class:"text-sm text-gray-500 mb-4"},Tl={key:2,class:"p-6"},zl={class:"bg-white rounded-lg shadow-sm border border-gray-200"},Pl={class:""},Il={class:"flex gap-0.5 border-b border-gray-200",dir:"rtl"},Zl={class:"p-8"},Gl={key:0,class:"space-y-8"},Jl={key:1},Rl={key:2},ql={class:"flex items-center gap-4 px-8 py-6 border-t border-gray-200",dir:"rtl"},Kl=["disabled"],Ql={key:0,class:"flex items-center gap-2"},Xl={key:1,class:"flex items-center gap-2"},Wl={key:0,class:"fixed inset-0 z-50 overflow-y-auto",dir:"rtl"},Yl={class:"flex items-center justify-center min-h-screen p-4"},er={class:"relative bg-white rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] flex flex-col"},tr={class:"flex items-center justify-between p-6 border-b border-gray-200"},or={class:"flex-1 p-6 overflow-y-auto min-h-0"},sr={class:"space-y-3"},lr=["onClick"],rr={class:"flex items-center gap-4"},nr={class:"flex items-center justify-center w-12 h-12 bg-[#DA7E13] text-white rounded-full"},ar={class:"text-sm font-medium"},ir={class:"font-medium text-[#273F62]"},dr={class:"text-sm text-gray-600"},cr=z({__name:"index",setup(S){const E=Ce(),y=De(),{lookupsData:w,isLoading:m,error:n,refetchLookups:p}=Ve(),v=D([]),a=D(!1),h=()=>{a.value=!a.value},d=D(1),o=D({fileData:{branch:"",fileNumber:"",year:"",mainBranch:"",registrationDate:"",successRate:"",meetingDate:"",firstMeeting:"",caseSubject:"",oldOfficeNumber:"",performanceOrderType:"",fileStatus:""},clientMowakil:{hasClientData:!1,client:null,isClientMowakil:"",selectedMowakils:[],mowakilStatus:""},opponentData:{opponentName:null,opponentLawyer:"",opponentLawyerPhone:"",opponentDetails:null},caseData:{caseType:"",subCaseType:"",mainCase:"",caseNumber:"",court:"",judgeLevel:"",assignedEmployee:null,sessionNumbers:"",role:"",advisor:"",judge:"",prosecutor:"",investigator:"",consultant:"",secondJudge:"",attachments:"",priority:"medium"},contractData:{contractType:"",contractDate:"",contractAmount:null,paymentMethod:"",installments:[],terms:""},attachments:{documents:[],notes:""}}),t=D({fileData:{},clientMowakil:{},opponentData:{},caseData:{},contractData:{},attachments:{}}),s=D(!1),i=D(!1),u=D(!1),F=D(!1),_=D(!1),g=D(!1),V=D(!1),L=D(!1),T=D(!1),G=()=>{i.value=!0},J=()=>{u.value=!0},R=()=>{_.value=!0},I=()=>{g.value=!0},te=()=>{g.value=!1},oe=k=>{o.value.clientMowakil.client=k,g.value=!1,p(),console.log("New client created and added to form:",k)},se=k=>{console.error("Client modal error:",k)},le=k=>{o.value.clientMowakil.client=k,i.value=!1},re=k=>{o.value.clientMowakil.selectedMowakils=k.map(c=>c.id),u.value=!1},ne=k=>{o.value.caseData.court=k,F.value=!1},ae=k=>{o.value.attachments.documents=k,_.value=!1},ie=()=>{V.value=!0},de=()=>{L.value=!0},ue=k=>{o.value.opponentData.opponentName=k,V.value=!1},pe=k=>{o.value.opponentData.opponentDetails=k,L.value=!1},ce=()=>{T.value=!0},me=k=>{o.value.caseData.assignedEmployee=k,T.value=!1},fe=async()=>{s.value=!0;try{console.log("Submitting case:",o.value),await new Promise(k=>setTimeout(k,2e3)),alert("تم حفظ القضية بنجاح"),E.push("/cases")}catch(k){console.error("Failed to submit case:",k),alert("حدث خطأ في حفظ القضية")}finally{s.value=!1}},ve=async()=>{var c;const k=y.params.id;if(k)try{console.log("Loading client from route param:",k);const C=await ee.getClientById(parseInt(k));C.success&&C.data&&(o.value.clientMowakil.client=C.data,console.log("Pre-filled client from API:",C.data))}catch(C){if(console.error("Failed to load client from route:",C),(c=w.value)!=null&&c.lookup_options.clients){const P=w.value.lookup_options.clients.find(W=>W.id===parseInt(k));P&&(o.value.clientMowakil.client=P,console.log("Pre-filled client from lookups fallback:",P))}}},ge=async()=>{try{const k=await Y.getEmployees({per_page:100});k.success&&k.data&&(v.value=k.data)}catch(k){console.error("Failed to load employees:",k)}};Z(()=>{ve(),ge()});const xe=async()=>{s.value=!0;try{console.log("Saving and continuing case:",o.value),await new Promise(k=>setTimeout(k,2e3)),alert("تم حفظ القضية بنجاح وسيتم الانتقال لاستكمال البيانات"),E.push("/cases")}catch(k){console.error("Failed to save and continue case:",k),alert("حدث خطأ في حفظ القضية")}finally{s.value=!1}},be=()=>{E.push("/cases")};return(k,c)=>(r(),l("div",Sl,[j(ke,{sidebarCollapsed:a.value,onToggleSidebar:h},null,8,["sidebarCollapsed"]),e("div",jl,[j($e,{isCollapsed:a.value,onToggle:h},null,8,["isCollapsed"]),e("div",{class:$(["flex-1 min-h-full transition-all duration-300",a.value?"mr-16":"mr-64"])},[N(m)?(r(),l("div",Bl,c[18]||(c[18]=[e("div",{class:"bg-white rounded-lg shadow-sm border border-gray-200 p-8"},[e("div",{class:"flex items-center justify-center"},[e("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#DA7E13]"}),e("span",{class:"mr-3 text-gray-600"},"جاري تحميل بيانات النموذج...")])],-1)]))):N(n)?(r(),l("div",Ul,[e("div",Nl,[e("div",Hl,[c[19]||(c[19]=e("p",{class:"mb-4"},"حدث خطأ في تحميل بيانات النموذج",-1)),e("p",Ol,f(N(n)),1),e("button",{onClick:c[0]||(c[0]=(...C)=>N(p)&&N(p)(...C)),class:"px-4 py-2 bg-[#DA7E13] text-white rounded-lg hover:bg-[#c5711a] transition-colors"}," إعادة المحاولة ")])])])):(r(),l("div",Tl,[e("div",zl,[c[24]||(c[24]=e("div",{class:"p-6"},[e("h1",{class:"text-xl font-semibold text-[#273F62]"},"إضافة دعوى جديدة")],-1)),e("div",Pl,[e("nav",Il,[e("button",{onClick:c[1]||(c[1]=C=>d.value=1),class:$(["px-8 py-4 text-sm font-medium rounded-none",d.value===1?"bg-[#DA7E13] text-white":"bg-[#9CA3AF] text-white"])}," البيانات الاساسية ",2),e("button",{onClick:c[2]||(c[2]=C=>d.value=2),class:$(["px-8 py-4 text-sm font-medium rounded-none",d.value===2?"bg-[#DA7E13] text-white":"bg-[#9CA3AF] text-white"])}," بيانات التعاقد ",2),e("button",{onClick:c[3]||(c[3]=C=>d.value=3),class:$(["px-8 py-4 text-sm font-medium rounded-none",d.value===3?"bg-[#DA7E13] text-white":"bg-[#9CA3AF] text-white"])}," مرفقات الدعوى ",2)])]),e("div",Zl,[d.value===1?(r(),l("div",Gl,[j(rt,{modelValue:o.value.fileData,"onUpdate:modelValue":c[4]||(c[4]=C=>o.value.fileData=C),errors:t.value.fileData,"lookups-data":N(w)},null,8,["modelValue","errors","lookups-data"]),j(Dt,{modelValue:o.value.clientMowakil,"onUpdate:modelValue":c[5]||(c[5]=C=>o.value.clientMowakil=C),errors:t.value.clientMowakil,"lookups-data":N(w),onOpenClientSearch:G,onOpenMowakilSelection:J,onOpenAddClient:I},null,8,["modelValue","errors","lookups-data"]),j(Tt,{modelValue:o.value.opponentData,"onUpdate:modelValue":c[6]||(c[6]=C=>o.value.opponentData=C),errors:t.value.opponentData,"lookups-data":N(w),onOpenAddOpponent:I,onOpenOpponentNameSelection:ie,onOpenOpponentDetailsSelection:de},null,8,["modelValue","errors","lookups-data"]),j($o,{modelValue:o.value.caseData,"onUpdate:modelValue":c[7]||(c[7]=C=>o.value.caseData=C),errors:t.value.caseData,"lookups-data":N(w),onOpenLawyerSelection:ce},null,8,["modelValue","errors","lookups-data"])])):d.value===2?(r(),l("div",Jl,[j(Go,{modelValue:o.value.contractData,"onUpdate:modelValue":c[8]||(c[8]=C=>o.value.contractData=C),errors:t.value.contractData,"lookups-data":N(w)},null,8,["modelValue","errors","lookups-data"])])):d.value===3?(r(),l("div",Rl,[j(ds,{modelValue:o.value.attachments,"onUpdate:modelValue":c[9]||(c[9]=C=>o.value.attachments=C),errors:t.value.attachments,"lookups-data":N(w),onOpenDocumentUpload:R},null,8,["modelValue","errors","lookups-data"])])):x("",!0)]),e("div",ql,[e("button",{type:"button",onClick:be,class:"flex-1 flex items-center justify-center gap-2 py-4 bg-transparent border-2 border-[#273F62] text-[#273F62] text-sm font-medium rounded-lg hover:bg-[#273F62]/10 hover:border-[#273F62] focus:outline-none focus:ring-2 focus:ring-[#273F62] focus:ring-offset-2 transition-colors"},c[20]||(c[20]=[A(" إلغاء "),e("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"})],-1)])),e("button",{type:"submit",onClick:fe,disabled:s.value,class:$(["flex-1 flex items-center justify-center gap-2 py-4 text-sm font-medium rounded-lg focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors",s.value?"bg-gray-400 text-white cursor-not-allowed":"bg-[#374151] text-white hover:bg-gray-800 focus:ring-gray-500"])},[s.value?(r(),l("div",Ql,c[21]||(c[21]=[e("div",{class:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"},null,-1),e("span",null,"جاري الحفظ...",-1)]))):(r(),l("div",Xl,c[22]||(c[22]=[e("span",null,"حفظ",-1),e("svg",{class:"w-4 h-4 fill-current",viewBox:"0 0 24 24"},[e("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})],-1)])))],10,Kl),e("button",{type:"button",onClick:xe,class:"flex-1 flex items-center justify-center gap-2 py-4 bg-[#DA7E13] text-white text-sm font-medium rounded-lg hover:bg-[#c5711a] focus:outline-none focus:ring-2 focus:ring-[#DA7E13] focus:ring-offset-2 transition-colors"},c[23]||(c[23]=[e("span",null,"حفظ واستكمال بيانات القضية",-1),e("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"})],-1)]))])])]))],2)]),j(q,{isVisible:i.value,onClose:c[10]||(c[10]=C=>i.value=!1),onClientSelected:le},null,8,["isVisible"]),j(q,{isVisible:u.value,"multiple-selection":!0,"initial-selected-ids":o.value.clientMowakil.selectedMowakils,onClose:c[11]||(c[11]=C=>u.value=!1),onClientsSelected:re},null,8,["isVisible","initial-selected-ids"]),j(al,{isVisible:F.value,onClose:c[12]||(c[12]=C=>F.value=!1),onCourtSelected:ne},null,8,["isVisible"]),j(El,{isVisible:_.value,onClose:c[13]||(c[13]=C=>_.value=!1),onDocumentsUploaded:ae},null,8,["isVisible"]),j(Fe,{isVisible:g.value,mode:"add",onClose:te,onSuccess:oe,onError:se},null,8,["isVisible"]),j(q,{isVisible:V.value,onClose:c[14]||(c[14]=C=>V.value=!1),onClientSelected:ue},null,8,["isVisible"]),j(q,{isVisible:L.value,onClose:c[15]||(c[15]=C=>L.value=!1),onClientSelected:pe},null,8,["isVisible"]),T.value?(r(),l("div",Wl,[e("div",{class:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:c[16]||(c[16]=C=>T.value=!1)}),e("div",Yl,[e("div",er,[e("div",tr,[c[26]||(c[26]=e("h2",{class:"text-lg font-semibold text-[#273F62]"},"اختيار المحامي",-1)),e("button",{onClick:c[17]||(c[17]=C=>T.value=!1),class:"text-gray-400 hover:text-gray-600 transition-colors"},c[25]||(c[25]=[e("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),e("div",or,[e("div",sr,[(r(!0),l(H,null,O(v.value,C=>{var P;return r(),l("div",{key:C.id,class:"flex items-center justify-between p-4 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",onClick:W=>me(C)},[e("div",rr,[e("div",nr,[e("span",ar,f(((P=C.name)==null?void 0:P.substring(0,2).toUpperCase())||"م"),1)]),e("div",null,[e("h3",ir,f(C.name||"محامي غير محدد"),1),e("p",dr,f(C.email||"لا يوجد بريد إلكتروني"),1)])]),c[27]||(c[27]=e("button",{class:"px-4 py-2 bg-[#DA7E13] text-white text-sm rounded hover:bg-[#c5711a] transition-colors"}," اختيار ",-1))],8,lr)}),128))])])])])])):x("",!0)]))}});export{cr as default};
SAVE
CANCEL