2 lines
39 KiB
JavaScript
2 lines
39 KiB
JavaScript
import{_ as le}from"./15rOo9Uq.js";import{e as ae,s as ne,g as ie,c as i,a as e,t as s,F as k,d as c,k as p,j as d,r as z,b as w,w as y,L as N,y as x,z as g,I as L,M as T,K as re,l as _,m as B,h as A,D as de,o as n}from"./BMplCfh_.js";const ce={key:0,class:"flex items-center justify-center py-20"},ue={class:"flex flex-col items-center gap-3"},pe={class:"text-slate-400 text-sm"},xe={key:1,class:"flex flex-col items-center justify-center py-20 text-center"},he={class:"text-red-400 text-sm mb-2"},_e={class:"mb-8"},me={class:"flex items-center justify-between"},be={class:"flex items-center gap-4"},ve={class:"flex items-center gap-3"},ge={class:"text-2xl font-bold text-white"},fe={key:0,class:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-purple-500/20 text-purple-300"},ke={key:1,class:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-500/20 text-red-300"},we={key:2,class:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-amber-500/20 text-amber-300"},ye={class:"text-sm text-slate-400 mt-0.5"},$e={key:0,class:"ml-2 text-slate-500"},Ce={class:"flex items-center gap-3"},Me={class:"border-b border-slate-700 mb-6"},je={class:"flex gap-6"},ze=["onClick"],Be={key:0,class:"space-y-6"},Ve={class:"bg-slate-800/50 border border-slate-700 rounded-xl p-6"},Ee={class:"flex items-center gap-3 mb-5"},He={class:"text-base font-semibold text-white"},Le={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},Ue={class:"block text-xs text-slate-400 mb-1"},De={class:"text-sm text-white font-mono"},Se={class:"block text-xs text-slate-400 mb-1"},Ie={class:"text-sm text-white font-mono text-xs"},Ne={class:"block text-xs text-slate-400 mb-1"},Te={class:"text-sm text-white"},Ae={class:"block text-xs text-slate-400 mb-1"},Fe={class:"text-sm text-white"},Pe={class:"block text-xs text-slate-400 mb-1"},Re={class:"text-sm text-white"},Oe={class:"block text-xs text-slate-400 mb-1"},Je={class:"text-sm text-white"},Ge={class:"block text-xs text-slate-400 mb-1"},Ke={class:"text-sm text-white"},qe={class:"block text-xs text-slate-400 mb-1"},Qe={class:"text-sm text-white"},We={key:0,class:"bg-slate-800/50 border border-slate-700 rounded-xl p-6"},Xe={class:"flex items-center gap-3 mb-5"},Ye={class:"text-base font-semibold text-white"},Ze={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},et={class:"block text-xs text-slate-400 mb-1"},tt={class:"text-sm text-white"},st={class:"block text-xs text-slate-400 mb-1"},ot={class:"text-sm text-white"},lt={class:"block text-xs text-slate-400 mb-1"},at={class:"text-sm text-white"},nt={class:"block text-xs text-slate-400 mb-1"},it={class:"text-sm text-white"},rt={class:"block text-xs text-slate-400 mb-1"},dt={class:"text-sm text-white"},ct={class:"block text-xs text-slate-400 mb-1"},ut={class:"text-sm text-white"},pt={class:"block text-xs text-slate-400 mb-1"},xt={class:"text-sm text-white"},ht={class:"block text-xs text-slate-400 mb-1"},_t={class:"text-sm text-white"},mt={key:0,class:"lg:col-span-3"},bt={class:"block text-xs text-slate-400 mb-1"},vt={class:"text-sm text-white"},gt={class:"bg-slate-800/50 border border-slate-700 rounded-xl p-6"},ft={class:"flex items-center gap-3 mb-5"},kt={class:"text-base font-semibold text-white"},wt={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},yt={class:"block text-xs text-slate-400 mb-1"},$t={class:"text-sm text-white"},Ct={class:"block text-xs text-slate-400 mb-1"},Mt={class:"text-sm text-white"},jt={class:"block text-xs text-slate-400 mb-1"},zt={class:"text-sm text-white"},Bt={class:"block text-xs text-slate-400 mb-1"},Vt={class:"text-sm text-white"},Et={class:"block text-xs text-slate-400 mb-1"},Ht={class:"text-sm text-white"},Lt={class:"block text-xs text-slate-400 mb-1"},Ut={class:"text-sm text-white"},Dt={key:0},St={class:"block text-xs text-slate-400 mb-1"},It={class:"text-sm text-red-400"},Nt={key:1,class:"bg-slate-800/50 border border-slate-700 rounded-xl p-6"},Tt={class:"flex items-center gap-3 mb-5"},At={class:"text-base font-semibold text-white"},Ft={class:"text-xs text-slate-300 bg-slate-900/50 rounded-lg p-4 overflow-x-auto"},Pt={key:2,class:"bg-slate-800/50 border border-slate-700 rounded-xl p-6"},Rt={class:"flex items-center gap-3 mb-5"},Ot={class:"text-base font-semibold text-white"},Jt={class:"text-xs text-slate-300 bg-slate-900/50 rounded-lg p-4 overflow-x-auto"},Gt={key:1,class:"space-y-6"},Kt={class:"flex items-center justify-between"},qt={class:"flex items-center gap-3"},Qt={class:"text-base font-semibold text-white"},Wt={class:"text-xs text-slate-400 mt-0.5"},Xt={key:0,class:"bg-slate-800/50 border border-slate-700 rounded-xl p-12 text-center"},Yt={class:"text-sm text-slate-400"},Zt={key:1,class:"bg-slate-800/50 border border-slate-700 rounded-xl overflow-hidden"},es={class:"overflow-x-auto"},ts={class:"w-full text-sm"},ss={class:"border-b border-slate-700"},os={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},ls={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},as={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},ns={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},is={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},rs={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},ds={class:"px-4 py-3"},cs={class:"px-4 py-3"},us={class:"px-4 py-3"},ps={class:"px-4 py-3"},xs={class:"px-4 py-3"},hs={class:"px-4 py-3 text-slate-300 text-xs"},_s={class:"px-4 py-3 text-slate-300 text-xs"},ms={key:2,class:"space-y-6"},bs={class:"flex items-center justify-between"},vs={class:"flex items-center gap-3"},gs={class:"text-base font-semibold text-white"},fs={class:"text-xs text-slate-400 mt-0.5"},ks={key:0,class:"bg-slate-800/50 border border-slate-700 rounded-xl p-12 text-center"},ws={class:"text-sm text-slate-400"},ys={key:1,class:"bg-slate-800/50 border border-slate-700 rounded-xl overflow-hidden"},$s={class:"overflow-x-auto"},Cs={class:"w-full text-sm"},Ms={class:"border-b border-slate-700"},js={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},zs={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},Bs={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},Vs={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},Es={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},Hs={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},Ls={class:"px-4 py-3"},Us={class:"px-4 py-3"},Ds={class:"text-xs text-slate-300"},Ss={class:"px-4 py-3"},Is={class:"px-4 py-3"},Ns={class:"px-4 py-3"},Ts={key:0,class:"inline-flex items-center gap-1 text-xs text-emerald-400"},As={key:1,class:"text-xs text-slate-500"},Fs={class:"px-4 py-3 text-slate-300 text-xs"},Ps={key:3,class:"space-y-6"},Rs={class:"flex items-center justify-between"},Os={class:"flex items-center gap-3"},Js={class:"text-base font-semibold text-white"},Gs={class:"text-xs text-slate-400 mt-0.5"},Ks={key:0,class:"bg-slate-800/50 border border-slate-700 rounded-xl p-12 text-center"},qs={class:"text-sm text-slate-400"},Qs={key:1,class:"bg-slate-800/50 border border-slate-700 rounded-xl overflow-hidden"},Ws={class:"overflow-x-auto"},Xs={class:"w-full text-sm"},Ys={class:"border-b border-slate-700"},Zs={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},eo={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},to={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},so={class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},oo={class:"px-4 py-3"},lo={class:"px-4 py-3"},ao={class:"text-xs text-slate-300"},no={class:"px-4 py-3"},io={class:"px-4 py-3 text-slate-300 text-xs"},ro={key:4,class:"space-y-6"},co={class:"flex items-center justify-between"},uo={class:"flex items-center gap-3"},po={class:"text-base font-semibold text-white"},xo={key:0,class:"bg-slate-800/50 border border-slate-700 rounded-xl p-12 text-center"},ho={class:"text-sm text-slate-400"},_o={key:1,class:"bg-slate-800/50 border border-slate-700 rounded-xl p-6"},mo={class:"flex items-center gap-4"},bo={class:"text-sm text-slate-300"},vo={class:"text-xs text-slate-500 mt-1"},go={key:0,class:"fixed inset-0 z-50 flex items-center justify-center"},fo={class:"relative bg-slate-800 border border-slate-700 rounded-xl w-full max-w-2xl max-h-[90vh] overflow-y-auto shadow-2xl"},ko={class:"sticky top-0 bg-slate-800 border-b border-slate-700 px-6 py-4 flex items-center justify-between"},wo={class:"text-lg font-semibold text-white"},yo={class:"p-6 space-y-5"},$o={class:"text-sm font-semibold text-slate-300 mb-3"},Co={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Mo={class:"block text-xs text-slate-400 mb-1"},jo=["placeholder"],zo={class:"block text-xs text-slate-400 mb-1"},Bo=["placeholder"],Vo={class:"block text-xs text-slate-400 mb-1"},Eo=["placeholder"],Ho={class:"block text-xs text-slate-400 mb-1"},Lo=["placeholder"],Uo={class:"block text-xs text-slate-400 mb-1"},Do={class:"block text-xs text-slate-400 mb-1"},So=["placeholder"],Io={class:"block text-xs text-slate-400 mb-1"},No=["placeholder"],To={class:"border-t border-slate-700 pt-5"},Ao={class:"text-sm font-semibold text-slate-300 mb-3"},Fo={class:"flex flex-wrap gap-6"},Po={class:"flex items-center gap-2 cursor-pointer"},Ro={class:"text-sm text-slate-300"},Oo={class:"flex items-center gap-2 cursor-pointer"},Jo={class:"text-sm text-slate-300"},Go={class:"flex items-center gap-2 cursor-pointer"},Ko={class:"text-sm text-slate-300"},qo={class:"sticky bottom-0 bg-slate-800 border-t border-slate-700 px-6 py-4 flex items-center justify-end gap-3"},Qo=["disabled"],Wo={key:0,class:"w-4 h-4 animate-spin",fill:"none",viewBox:"0 0 24 24"},Xo={key:0,class:"w-5 h-5 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Yo={key:1,class:"w-5 h-5 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Zo={class:"text-sm font-medium"},ol=ae({__name:"index",setup(el){const F=re(),P=de(),$=ne(),U=F.params.id,V=_(!0),C=_(null),a=_(null),m=_("profile"),E=_(!1),f=_(!1),r=_({last_name:"",first_name:"",phone:"",mothers_last_name:"",mothers_first_name:"",birth_place:"",birth_date:"",is_active:!0,is_ghost:!1,is_sales_agent:!1}),b=_({show:!1,type:"success",message:""}),R=[{key:"profile",label:"persons.details.profile_tab"},{key:"users",label:"persons.details.users_tab"},{key:"memberships",label:"persons.details.memberships_tab"},{key:"owned_orgs",label:"persons.details.owned_orgs_tab"},{key:"merge_history",label:"persons.details.merge_history_tab"}],H=B(()=>{if(!a.value)return"";const t=a.value;return t.last_name||t.first_name?[t.last_name,t.first_name].filter(Boolean).join(" "):"Person #"+t.id}),O=B(()=>$.isAdmin?!0:!!$.user?.system_capabilities?.["persons:edit"]),J=B(()=>{if(!a.value?.identity_docs)return!1;const t=a.value.identity_docs;return typeof t=="object"&&Object.keys(t).length>0}),G=B(()=>{if(!a.value?.ice_contact)return!1;const t=a.value.ice_contact;return typeof t=="object"&&Object.keys(t).length>0});async function D(){V.value=!0,C.value=null;try{const u={Authorization:`Bearer ${(A("access_token").value||$.token||"").trim()}`,"Content-Type":"application/json"},l=await fetch(`/api/v1/admin/persons/${U}`,{headers:u});if(!l.ok)throw l.status===404?new Error("Person not found"):l.status===403?new Error("Access denied"):new Error(`Failed to fetch person: ${l.status}`);const v=await l.json();a.value=v}catch(t){C.value=t.message||"Failed to load person details"}finally{V.value=!1}}function K(){if(!a.value)return;const t=a.value;r.value={last_name:t.last_name||"",first_name:t.first_name||"",phone:t.phone||"",mothers_last_name:t.mothers_last_name||"",mothers_first_name:t.mothers_first_name||"",birth_place:t.birth_place||"",birth_date:t.birth_date?t.birth_date.slice(0,10):"",is_active:t.is_active,is_ghost:t.is_ghost,is_sales_agent:t.is_sales_agent},E.value=!0}function M(){E.value=!1}async function q(){f.value=!0;try{const u={Authorization:`Bearer ${(A("access_token").value||$.token||"").trim()}`,"Content-Type":"application/json"},l={last_name:r.value.last_name||void 0,first_name:r.value.first_name||void 0,phone:r.value.phone||void 0,mothers_last_name:r.value.mothers_last_name||void 0,mothers_first_name:r.value.mothers_first_name||void 0,birth_place:r.value.birth_place||void 0,birth_date:r.value.birth_date?new Date(r.value.birth_date).toISOString():void 0,is_active:r.value.is_active,is_ghost:r.value.is_ghost,is_sales_agent:r.value.is_sales_agent};Object.keys(l).forEach(j=>{l[j]===void 0&&delete l[j]});const v=await fetch(`/api/v1/admin/persons/${U}`,{method:"PATCH",headers:u,body:JSON.stringify(l)});if(!v.ok){const j=await v.json().catch(()=>({}));throw new Error(j.detail||`Save failed: ${v.status}`)}const oe=await v.json();a.value=oe,M(),S("success","Person updated successfully")}catch(t){S("error",t.message||"Failed to save")}finally{f.value=!1}}function S(t,o){b.value={show:!0,type:t,message:o},setTimeout(()=>{b.value.show=!1},4e3)}function Q(){P.push("/persons")}function W(t){return t?t.split(" ").map(o=>o[0]).join("").toUpperCase().slice(0,2):"?"}function X(t){const o=["bg-red-500","bg-yellow-500","bg-green-500","bg-blue-500","bg-indigo-500","bg-purple-500","bg-pink-500","bg-teal-500"];let u=0;for(let l=0;l<(t||"").length;l++)u=t.charCodeAt(l)+((u<<5)-u);return o[Math.abs(u)%o.length]}function h(t){if(!t)return"";try{return new Date(t).toLocaleDateString("en-GB",{year:"numeric",month:"short",day:"numeric"})}catch{return String(t)}}function I(t){if(!t)return"";try{return JSON.stringify(t,null,2)}catch{return String(t)}}function Y(t){return{admin:"bg-purple-500/10 text-purple-400",user:"bg-blue-500/10 text-blue-400",staff:"bg-cyan-500/10 text-cyan-400",superadmin:"bg-amber-500/10 text-amber-400"}[t?.toLowerCase()]||"bg-slate-500/10 text-slate-400"}function Z(t){return{FREE:"bg-slate-500/10 text-slate-400",PREMIUM:"bg-emerald-500/10 text-emerald-400",ENTERPRISE:"bg-amber-500/10 text-amber-400"}[t?.toUpperCase()]||"bg-slate-500/10 text-slate-400"}function ee(t){return{admin:"bg-purple-500/10 text-purple-400",manager:"bg-blue-500/10 text-blue-400",member:"bg-slate-500/10 text-slate-400",owner:"bg-amber-500/10 text-amber-400"}[t?.toLowerCase()]||"bg-slate-500/10 text-slate-400"}function te(t){return{active:"bg-emerald-500/10 text-emerald-400",invited:"bg-blue-500/10 text-blue-400",suspended:"bg-red-500/10 text-red-400",inactive:"bg-slate-500/10 text-slate-400"}[t?.toLowerCase()]||"bg-slate-500/10 text-slate-400"}function se(t){return{active:"bg-emerald-400",invited:"bg-blue-400",suspended:"bg-red-400",inactive:"bg-slate-400"}[t?.toLowerCase()]||"bg-slate-400"}return ie(()=>{D()}),(t,o)=>{const u=le;return n(),i("div",null,[V.value?(n(),i("div",ce,[e("div",ue,[o[11]||(o[11]=e("svg",{class:"w-8 h-8 text-indigo-400 animate-spin",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),e("p",pe,s(t.$t("persons.details.loading")),1)])])):C.value?(n(),i("div",xe,[o[12]||(o[12]=e("svg",{class:"w-12 h-12 text-red-500 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),e("p",he,s(C.value),1),e("button",{onClick:D,class:"px-4 py-2 text-sm bg-indigo-600/20 text-indigo-300 hover:bg-indigo-600/30 rounded-lg transition"},s(t.$t("persons.details.retry")),1)])):a.value?(n(),i(k,{key:2},[e("div",_e,[e("button",{onClick:Q,class:"inline-flex items-center gap-1.5 text-sm text-slate-400 hover:text-white transition mb-4"},[o[13]||(o[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:"M15 19l-7-7 7-7"})],-1)),c(" "+s(t.$t("persons.details.back")),1)]),e("div",me,[e("div",be,[e("div",{class:p(["w-12 h-12 rounded-xl flex items-center justify-center text-lg font-bold text-white",X(H.value)])},s(W(H.value)),3),e("div",null,[e("div",ve,[e("h1",ge,s(H.value),1),e("span",{class:p(["inline-flex items-center px-3 py-1 rounded-full text-xs font-medium",a.value.is_active?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"])},[e("span",{class:p(["w-1.5 h-1.5 rounded-full mr-1.5",a.value.is_active?"bg-emerald-400":"bg-amber-400"])},null,2),c(" "+s(a.value.is_active?t.$t("persons.active"):t.$t("persons.inactive")),1)],2),a.value.is_ghost?(n(),i("span",fe,s(t.$t("persons.ghost")),1)):d("",!0),a.value.merged_into_id?(n(),i("span",ke,s(t.$t("persons.merged")),1)):d("",!0),a.value.is_sales_agent?(n(),i("span",we,s(t.$t("persons.details.sales_agent")),1)):d("",!0)]),e("p",ye,[c(" ID: "+s(a.value.id)+" ",1),a.value.phone?(n(),i("span",$e,"· "+s(a.value.phone),1)):d("",!0)])])]),e("div",Ce,[O.value?(n(),i("button",{key:0,onClick:K,class:"inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium bg-indigo-600/20 text-indigo-300 hover:bg-indigo-600/30 rounded-lg transition"},[o[14]||(o[14]=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:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)),c(" "+s(t.$t("persons.details.edit")),1)])):d("",!0)])])]),e("div",Me,[e("nav",je,[(n(),i(k,null,z(R,l=>e("button",{key:l.key,onClick:v=>m.value=l.key,class:p(["pb-3 text-sm font-medium transition border-b-2 -mb-px",m.value===l.key?"text-indigo-400 border-indigo-400":"text-slate-400 border-transparent hover:text-slate-300"])},s(t.$t(l.label)),11,ze)),64))])]),m.value==="profile"?(n(),i("div",Be,[e("div",Ve,[e("div",Ee,[o[15]||(o[15]=e("div",{class:"p-2 rounded-lg bg-indigo-500/10 text-indigo-400"},[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:"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("h3",He,s(t.$t("persons.details.personal_info")),1)]),e("div",Le,[e("div",null,[e("label",Ue,s(t.$t("persons.details.person_id")),1),e("p",De,s(a.value.id),1)]),e("div",null,[e("label",Se,s(t.$t("persons.details.uuid")),1),e("p",Ie,s(a.value.id_uuid),1)]),e("div",null,[e("label",Ne,s(t.$t("persons.details.last_name")),1),e("p",Te,s(a.value.last_name||"—"),1)]),e("div",null,[e("label",Ae,s(t.$t("persons.details.first_name")),1),e("p",Fe,s(a.value.first_name||"—"),1)]),e("div",null,[e("label",Pe,s(t.$t("persons.phone")),1),e("p",Re,s(a.value.phone||"—"),1)]),e("div",null,[e("label",Oe,s(t.$t("persons.details.birth_place")),1),e("p",Je,s(a.value.birth_place||"—"),1)]),e("div",null,[e("label",Ge,s(t.$t("persons.birth_date")),1),e("p",Ke,s(h(a.value.birth_date)||"—"),1)]),e("div",null,[e("label",qe,s(t.$t("persons.details.mothers_name")),1),e("p",Qe,s([a.value.mothers_last_name,a.value.mothers_first_name].filter(Boolean).join(" ")||"—"),1)])])]),a.value.address?(n(),i("div",We,[e("div",Xe,[o[16]||(o[16]=e("div",{class:"p-2 rounded-lg bg-cyan-500/10 text-cyan-400"},[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:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})])],-1)),e("h3",Ye,s(t.$t("persons.details.address")),1)]),e("div",Ze,[e("div",null,[e("label",et,s(t.$t("persons.details.zip")),1),e("p",tt,s(a.value.address.address_zip||"—"),1)]),e("div",null,[e("label",st,s(t.$t("persons.details.city")),1),e("p",ot,s(a.value.address.address_city||"—"),1)]),e("div",null,[e("label",lt,s(t.$t("persons.details.street")),1),e("p",at,s([a.value.address.address_street_type,a.value.address.address_street_name].filter(Boolean).join(" ")||"—"),1)]),e("div",null,[e("label",nt,s(t.$t("persons.details.house_number")),1),e("p",it,s(a.value.address.address_house_number||"—"),1)]),e("div",null,[e("label",rt,s(t.$t("persons.details.stairwell")),1),e("p",dt,s(a.value.address.address_stairwell||"—"),1)]),e("div",null,[e("label",ct,s(t.$t("persons.details.floor")),1),e("p",ut,s(a.value.address.address_floor||"—"),1)]),e("div",null,[e("label",pt,s(t.$t("persons.details.door")),1),e("p",xt,s(a.value.address.address_door||"—"),1)]),e("div",null,[e("label",ht,s(t.$t("persons.details.parcel_id")),1),e("p",_t,s(a.value.address.address_hrsz||"—"),1)]),a.value.address.full_address_text?(n(),i("div",mt,[e("label",bt,s(t.$t("persons.details.full_address")),1),e("p",vt,s(a.value.address.full_address_text),1)])):d("",!0)])])):d("",!0),e("div",gt,[e("div",ft,[o[17]||(o[17]=e("div",{class:"p-2 rounded-lg bg-slate-500/10 text-slate-400"},[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:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})])],-1)),e("h3",kt,s(t.$t("persons.details.system_info")),1)]),e("div",wt,[e("div",null,[e("label",yt,s(t.$t("persons.details.is_sales_agent")),1),e("p",$t,s(a.value.is_sales_agent?t.$t("persons.details.yes"):t.$t("persons.details.no")),1)]),e("div",null,[e("label",Ct,s(t.$t("persons.details.lifetime_xp")),1),e("p",Mt,s(a.value.lifetime_xp),1)]),e("div",null,[e("label",jt,s(t.$t("persons.details.penalty_points")),1),e("p",zt,s(a.value.penalty_points),1)]),e("div",null,[e("label",Bt,s(t.$t("persons.details.social_reputation")),1),e("p",Vt,s(a.value.social_reputation.toFixed(2)),1)]),e("div",null,[e("label",Et,s(t.$t("persons.details.created_at")),1),e("p",Ht,s(h(a.value.created_at)||"—"),1)]),e("div",null,[e("label",Lt,s(t.$t("persons.details.updated_at")),1),e("p",Ut,s(h(a.value.updated_at)||"—"),1)]),a.value.deleted_at?(n(),i("div",Dt,[e("label",St,s(t.$t("persons.details.deleted_at")),1),e("p",It,s(h(a.value.deleted_at)),1)])):d("",!0)])]),J.value?(n(),i("div",Nt,[e("div",Tt,[o[18]||(o[18]=e("div",{class:"p-2 rounded-lg bg-amber-500/10 text-amber-400"},[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:"M10 6H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V8a2 2 0 00-2-2h-5m-4 0V5a2 2 0 114 0v1m-4 0a2 2 0 104 0m-5 8a2 2 0 100-4 2 2 0 000 4zm0 0c1.306 0 2.417.835 2.83 2M9 14a3.001 3.001 0 00-2.83 2M15 11h3m-3 4h2"})])],-1)),e("h3",At,s(t.$t("persons.details.identity_docs")),1)]),e("pre",Ft,s(I(a.value.identity_docs)),1)])):d("",!0),G.value?(n(),i("div",Pt,[e("div",Rt,[o[19]||(o[19]=e("div",{class:"p-2 rounded-lg bg-red-500/10 text-red-400"},[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:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})])],-1)),e("h3",Ot,s(t.$t("persons.details.ice_contact")),1)]),e("pre",Jt,s(I(a.value.ice_contact)),1)])):d("",!0)])):d("",!0),m.value==="users"?(n(),i("div",Gt,[e("div",Kt,[e("div",qt,[o[20]||(o[20]=e("div",{class:"p-2 rounded-lg bg-blue-500/10 text-blue-400"},[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:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"})])],-1)),e("div",null,[e("h3",Qt,s(t.$t("persons.details.connected_users")),1),e("p",Wt,s(t.$t("persons.details.users_count",{count:a.value.users.length})),1)])])]),a.value.users.length===0?(n(),i("div",Xt,[o[21]||(o[21]=e("svg",{class:"w-10 h-10 text-slate-600 mx-auto mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),e("p",Yt,s(t.$t("persons.details.no_users")),1)])):(n(),i("div",Zt,[e("div",es,[e("table",ts,[e("thead",null,[e("tr",ss,[o[22]||(o[22]=e("th",{class:"text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider"},"ID",-1)),e("th",os,s(t.$t("persons.details.email")),1),e("th",ls,s(t.$t("persons.details.role")),1),e("th",as,s(t.$t("persons.details.status")),1),e("th",ns,s(t.$t("persons.details.plan")),1),e("th",is,s(t.$t("persons.details.language")),1),e("th",rs,s(t.$t("persons.details.registered_at")),1)])]),e("tbody",null,[(n(!0),i(k,null,z(a.value.users,l=>(n(),i("tr",{key:l.id,class:"border-b border-slate-700/50 last:border-b-0 hover:bg-slate-700/30 transition"},[e("td",ds,[w(u,{to:"/users/"+l.id,class:"text-sm font-mono text-indigo-400 hover:underline"},{default:y(()=>[c(s(l.id),1)]),_:2},1032,["to"])]),e("td",cs,[w(u,{to:"/users/"+l.id,class:"text-sm font-medium text-white hover:text-indigo-400 hover:underline transition-colors"},{default:y(()=>[c(s(l.email),1)]),_:2},1032,["to"])]),e("td",us,[e("span",{class:p(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",Y(l.role)])},s(l.role||"—"),3)]),e("td",ps,[e("span",{class:p(["inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium",l.is_active?"bg-emerald-500/10 text-emerald-400":"bg-red-500/10 text-red-400"])},[e("span",{class:p(["w-1.5 h-1.5 rounded-full",l.is_active?"bg-emerald-400":"bg-red-400"])},null,2),c(" "+s(l.is_active?t.$t("persons.active"):t.$t("persons.inactive")),1)],2)]),e("td",xs,[e("span",{class:p(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",Z(l.subscription_plan)])},s(l.subscription_plan),3)]),e("td",hs,s(l.preferred_language?.toUpperCase()||"—"),1),e("td",_s,s(h(l.created_at)||"—"),1)]))),128))])])])]))])):d("",!0),m.value==="memberships"?(n(),i("div",ms,[e("div",bs,[e("div",vs,[o[23]||(o[23]=e("div",{class:"p-2 rounded-lg bg-purple-500/10 text-purple-400"},[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:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16l3.5-2 3.5 2 3.5-2 3.5 2M10 8.5a.5.5 0 11-1 0 .5.5 0 011 0zm5 5a.5.5 0 11-1 0 .5.5 0 011 0z"})])],-1)),e("div",null,[e("h3",gs,s(t.$t("persons.details.memberships")),1),e("p",fs,s(t.$t("persons.details.memberships_count",{count:a.value.memberships.length})),1)])])]),a.value.memberships.length===0?(n(),i("div",ks,[o[24]||(o[24]=e("svg",{class:"w-10 h-10 text-slate-600 mx-auto mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),e("p",ws,s(t.$t("persons.details.no_memberships")),1)])):(n(),i("div",ys,[e("div",$s,[e("table",Cs,[e("thead",null,[e("tr",Ms,[e("th",js,s(t.$t("persons.details.org_name")),1),e("th",zs,s(t.$t("persons.details.org_type")),1),e("th",Bs,s(t.$t("persons.details.org_role")),1),e("th",Vs,s(t.$t("persons.details.member_status")),1),e("th",Es,s(t.$t("persons.details.verified")),1),e("th",Hs,s(t.$t("persons.details.joined_at")),1)])]),e("tbody",null,[(n(!0),i(k,null,z(a.value.memberships,l=>(n(),i("tr",{key:l.id,class:"border-b border-slate-700/50 last:border-b-0 hover:bg-slate-700/30 transition"},[e("td",Ls,[w(u,{to:"/garages/"+l.organization_id,class:"text-sm font-medium text-white hover:text-indigo-400 hover:underline transition-colors"},{default:y(()=>[c(s(l.organization_name),1)]),_:2},1032,["to"])]),e("td",Us,[e("span",Ds,s(l.organization_type||"—"),1)]),e("td",Ss,[e("span",{class:p(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",ee(l.role)])},s(l.role),3)]),e("td",Is,[e("span",{class:p(["inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium",te(l.status)])},[e("span",{class:p(["w-1.5 h-1.5 rounded-full",se(l.status)])},null,2),c(" "+s(l.status),1)],2)]),e("td",Ns,[l.is_verified?(n(),i("span",Ts,[o[25]||(o[25]=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:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),c(" "+s(t.$t("persons.details.verified_yes")),1)])):(n(),i("span",As,s(t.$t("persons.details.verified_no")),1))]),e("td",Fs,s(h(l.created_at)||"—"),1)]))),128))])])])]))])):d("",!0),m.value==="owned_orgs"?(n(),i("div",Ps,[e("div",Rs,[e("div",Os,[o[26]||(o[26]=e("div",{class:"p-2 rounded-lg bg-emerald-500/10 text-emerald-400"},[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:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16l3.5-2 3.5 2 3.5-2 3.5 2M10 8.5a.5.5 0 11-1 0 .5.5 0 011 0zm5 5a.5.5 0 11-1 0 .5.5 0 011 0z"})])],-1)),e("div",null,[e("h3",Js,s(t.$t("persons.details.owned_orgs")),1),e("p",Gs,s(t.$t("persons.details.owned_orgs_count",{count:a.value.owned_organizations.length})),1)])])]),a.value.owned_organizations.length===0?(n(),i("div",Ks,[o[27]||(o[27]=e("svg",{class:"w-10 h-10 text-slate-600 mx-auto mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),e("p",qs,s(t.$t("persons.details.no_owned_orgs")),1)])):(n(),i("div",Qs,[e("div",Ws,[e("table",Xs,[e("thead",null,[e("tr",Ys,[e("th",Zs,s(t.$t("persons.details.org_name")),1),e("th",eo,s(t.$t("persons.details.org_type")),1),e("th",to,s(t.$t("persons.details.status")),1),e("th",so,s(t.$t("persons.details.created_at")),1)])]),e("tbody",null,[(n(!0),i(k,null,z(a.value.owned_organizations,l=>(n(),i("tr",{key:l.id,class:"border-b border-slate-700/50 last:border-b-0 hover:bg-slate-700/30 transition"},[e("td",oo,[w(u,{to:"/garages/"+l.id,class:"text-sm font-medium text-white hover:text-indigo-400 hover:underline transition-colors"},{default:y(()=>[c(s(l.name),1)]),_:2},1032,["to"])]),e("td",lo,[e("span",ao,s(l.org_type||"—"),1)]),e("td",no,[e("span",{class:p(["inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium",l.is_active?"bg-emerald-500/10 text-emerald-400":"bg-slate-500/10 text-slate-400"])},[e("span",{class:p(["w-1.5 h-1.5 rounded-full",l.is_active?"bg-emerald-400":"bg-slate-400"])},null,2),c(" "+s(l.is_active?t.$t("persons.active"):t.$t("persons.inactive")),1)],2)]),e("td",io,s(h(l.created_at)||"—"),1)]))),128))])])])]))])):d("",!0),m.value==="merge_history"?(n(),i("div",ro,[e("div",co,[e("div",uo,[o[28]||(o[28]=e("div",{class:"p-2 rounded-lg bg-red-500/10 text-red-400"},[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:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})])],-1)),e("div",null,[e("h3",po,s(t.$t("persons.details.merge_history")),1)])])]),a.value.merge_history?(n(),i("div",_o,[e("div",mo,[o[30]||(o[30]=e("div",{class:"p-3 rounded-lg bg-red-500/10 text-red-400"},[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:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})])],-1)),e("div",null,[e("p",bo,[c(s(t.$t("persons.details.merged_into"))+" ",1),w(u,{to:"/persons/"+a.value.merge_history.merged_into_id,class:"text-indigo-400 hover:underline font-medium"},{default:y(()=>[c(s(a.value.merge_history.merged_into_name||"#"+a.value.merge_history.merged_into_id),1)]),_:1},8,["to"])]),e("p",vo,s(t.$t("persons.details.merged_at"))+": "+s(h(a.value.merge_history.merged_at)),1)])])])):(n(),i("div",xo,[o[29]||(o[29]=e("svg",{class:"w-10 h-10 text-slate-600 mx-auto mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),e("p",ho,s(t.$t("persons.details.no_merge_history")),1)]))])):d("",!0),(n(),N(T,{to:"body"},[E.value?(n(),i("div",go,[e("div",{class:"fixed inset-0 bg-black/60 backdrop-blur-sm",onClick:M}),e("div",fo,[e("div",ko,[e("h2",wo,s(t.$t("persons.details.edit_title")),1),e("button",{onClick:M,class:"text-slate-400 hover:text-white transition"},[...o[31]||(o[31]=[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:"M6 18L18 6M6 6l12 12"})],-1)])])]),e("div",yo,[e("div",null,[e("h3",$o,s(t.$t("persons.details.personal_info")),1),e("div",Co,[e("div",null,[e("label",Mo,s(t.$t("persons.details.last_name")),1),x(e("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>r.value.last_name=l),type:"text",class:"w-full px-3 py-2 text-sm bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:border-indigo-500 transition",placeholder:t.$t("persons.details.last_name")},null,8,jo),[[g,r.value.last_name]])]),e("div",null,[e("label",zo,s(t.$t("persons.details.first_name")),1),x(e("input",{"onUpdate:modelValue":o[1]||(o[1]=l=>r.value.first_name=l),type:"text",class:"w-full px-3 py-2 text-sm bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:border-indigo-500 transition",placeholder:t.$t("persons.details.first_name")},null,8,Bo),[[g,r.value.first_name]])]),e("div",null,[e("label",Vo,s(t.$t("persons.phone")),1),x(e("input",{"onUpdate:modelValue":o[2]||(o[2]=l=>r.value.phone=l),type:"text",class:"w-full px-3 py-2 text-sm bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:border-indigo-500 transition",placeholder:t.$t("persons.phone")},null,8,Eo),[[g,r.value.phone]])]),e("div",null,[e("label",Ho,s(t.$t("persons.details.birth_place")),1),x(e("input",{"onUpdate:modelValue":o[3]||(o[3]=l=>r.value.birth_place=l),type:"text",class:"w-full px-3 py-2 text-sm bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:border-indigo-500 transition",placeholder:t.$t("persons.details.birth_place")},null,8,Lo),[[g,r.value.birth_place]])]),e("div",null,[e("label",Uo,s(t.$t("persons.birth_date")),1),x(e("input",{"onUpdate:modelValue":o[4]||(o[4]=l=>r.value.birth_date=l),type:"date",class:"w-full px-3 py-2 text-sm bg-slate-900/50 border border-slate-600 rounded-lg text-white focus:outline-none focus:border-indigo-500 transition"},null,512),[[g,r.value.birth_date]])]),e("div",null,[e("label",Do,s(t.$t("persons.details.mothers_last_name")),1),x(e("input",{"onUpdate:modelValue":o[5]||(o[5]=l=>r.value.mothers_last_name=l),type:"text",class:"w-full px-3 py-2 text-sm bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:border-indigo-500 transition",placeholder:t.$t("persons.details.mothers_last_name")},null,8,So),[[g,r.value.mothers_last_name]])]),e("div",null,[e("label",Io,s(t.$t("persons.details.mothers_first_name")),1),x(e("input",{"onUpdate:modelValue":o[6]||(o[6]=l=>r.value.mothers_first_name=l),type:"text",class:"w-full px-3 py-2 text-sm bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:border-indigo-500 transition",placeholder:t.$t("persons.details.mothers_first_name")},null,8,No),[[g,r.value.mothers_first_name]])])])]),e("div",To,[e("h3",Ao,s(t.$t("persons.details.status_section")),1),e("div",Fo,[e("label",Po,[x(e("input",{"onUpdate:modelValue":o[7]||(o[7]=l=>r.value.is_active=l),type:"checkbox",class:"w-4 h-4 rounded border-slate-600 bg-slate-900/50 text-indigo-500 focus:ring-indigo-500"},null,512),[[L,r.value.is_active]]),e("span",Ro,s(t.$t("persons.details.is_active")),1)]),e("label",Oo,[x(e("input",{"onUpdate:modelValue":o[8]||(o[8]=l=>r.value.is_ghost=l),type:"checkbox",class:"w-4 h-4 rounded border-slate-600 bg-slate-900/50 text-purple-500 focus:ring-purple-500"},null,512),[[L,r.value.is_ghost]]),e("span",Jo,s(t.$t("persons.details.is_ghost")),1)]),e("label",Go,[x(e("input",{"onUpdate:modelValue":o[9]||(o[9]=l=>r.value.is_sales_agent=l),type:"checkbox",class:"w-4 h-4 rounded border-slate-600 bg-slate-900/50 text-amber-500 focus:ring-amber-500"},null,512),[[L,r.value.is_sales_agent]]),e("span",Ko,s(t.$t("persons.details.is_sales_agent")),1)])])])]),e("div",qo,[e("button",{onClick:M,class:"px-4 py-2 text-sm text-slate-400 hover:text-white transition"},s(t.$t("persons.details.cancel")),1),e("button",{onClick:q,disabled:f.value,class:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium bg-indigo-600 text-white hover:bg-indigo-500 rounded-lg transition disabled:opacity-50 disabled:cursor-not-allowed"},[f.value?(n(),i("svg",Wo,[...o[32]||(o[32]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):d("",!0),c(" "+s(f.value?t.$t("persons.details.saving"):t.$t("persons.details.save")),1)],8,Qo)])])])):d("",!0)])),(n(),N(T,{to:"body"},[b.value.show?(n(),i("div",{key:0,class:p(["fixed bottom-6 right-6 z-50 flex items-center gap-3 px-5 py-3 rounded-lg shadow-xl transition-all duration-300",b.value.type==="success"?"bg-emerald-600 text-white":"bg-red-600 text-white"])},[b.value.type==="success"?(n(),i("svg",Xo,[...o[33]||(o[33]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])])):(n(),i("svg",Yo,[...o[34]||(o[34]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])])),e("span",Zo,s(b.value.message),1),e("button",{onClick:o[10]||(o[10]=l=>b.value.show=!1),class:"ml-2 text-white/70 hover:text-white transition"},[...o[35]||(o[35]=[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)])])],2)):d("",!0)]))],64)):d("",!0)])}}});export{ol as default};
|