1import{j as U,a as Z,w as H,F as M,b7 as Q,h as W,e as f,k as m,z as B,g as d,f as s,l as h,c as X,J as n,o as l,t as p,S as Y,Z as ee,ac as te,K as ae,aG as oe}from"./Da8mETzA.js";import{_ as ne}from"./B63fHq2S.js";import{_ as se}from"./Cda9eJU3.js";import{u as le}from"./Dn6gi-9W.js";import"./mn94cGKy.js";import"./C22Q5hjz.js";import"./BKWyNPGE.js";import"./0e3sImNK.js";import"./KzFf-jUO.js";import"./-HCH-7Do.js";import"./C-E83dC9.js";import"./C6Y-ieo6.js";import"./rt83C6P3.js";import"./bkUGrRXq.js";import"./CNDSEX3-.js";import"./Ct5gXNpZ.js";import"./BYrTWJN8.js";import"./DrjOzpLg.js";import"./BlptbogC.js";import"./D0HJR4-0.js";import"./sxqqTjU6.js";import"./0J83nmR1.js";const re={key:1},ue={class:"flex gap-1 md:gap-4 flex-col"},ie={class:"font-bold text-xl truncate"},ce={class:"col-span-2 flex flex-col truncate"},_e={class:"text-neutral-600 text-sm leading-7"},me={class:"notranslate truncate"},de={class:"flex items-center basis-6"},je={__name:"details",async setup(pe){let r,y;const x=U(),u=Z(),{refresh:E}=([r,y]=H(()=>le("/",{method:"GET",onResponse({response:o}){if(o.ok){const{_data:T}=o,{numbers:c}=T;c&&x.$patch({numbers:c})}},onResponseError(o){throw X(o.value)}})),r=await r,y(),r);M(()=>u.path,()=>{u.query.refetch_numbers&&E()});const{username:g,firstname:b,lastname:$,email:w,gender:k,date_of_birth:D,user_type:P,company_registration_number:R,company_vat_number:F,company_address:I,company_name:N,numbers:v}=Q(x),i=n(()=>v.value.find(o=>o.is_primary)||null),{t:e,localeProperties:S}=W(),a=e("account_details_add"),V=n(()=>b.value||$.value?`${b.value} ${$.value}`.trim():a),j=n(()=>k.value==="m"?e("male"):k.value==="f"?e("female"):a),t=n(()=>u.path),z=n(()=>{if(D.value){const o=new Date(D.value);return new Intl.DateTimeFormat(S.value.language,{day:"2-digit",month:"long",year:"numeric"}).format(o)}return a}),C=n(()=>[{field:e("account_details_username"),value:g||"",to:`${t.value}/edit/username`},{field:e("account_details_full_name"),value:V,to:`${t.value}/edit/fullname`},{field:e("account_details_email"),value:w.value||"",to:`${t.value}/edit/email`},{field:e("account_details_phone"),value:i.value?.phone_number||a,to:v.value.length||i.value?`${t.value}/edit/phone-select`:`${t.value}/edit/phone-add`},{field:e("account_details_gender"),value:j.value,to:`${t.value}/edit/gender`},{field:e("account_details_date_of_birth"),value:z.value,to:`${t.value}/edit/date-of-birth`}]),G=n(()=>[{field:e("account_details_company_name"),value:N.value||a,to:`${t.value}/edit/company-name`},{field:e("account_details_company_registration_number"),value:R.value||a,to:`${t.value}/edit/company-reg-number`},{field:e("account_details_company_vat_number"),value:F.value||a,to:`${t.value}/edit/company-tax-number`},{field:e("account_details_company_address"),value:I.value||a,to:`${t.value}/edit/company-address`},{field:e("account_details_email"),value:w.value||a,to:`${t.value}/edit/email`},{field:e("account_details_phone"),value:i.value?.phone_number||a,to:v.value.length||i.value?`${t.value}/edit/phone-select`:`${t.value}/edit/phone-add`}]),L=n(()=>P.value==="pro"?G.value:C.value),q=n(()=>u.path.includes("/edit/"));return(o,T)=>{const c=oe,J=ne,A=se,K=ae,O=te;return l(),f("div",null,[m(q)?(l(),B(c,{key:0})):(l(),f("div",re,[d(J),s("div",ue,[d(A,{class:"flex flex-col gap-4"},{default:h(()=>[s("h1",ie,p(o.$t("account_details_hi"))+" "+p(m(g)||m(N)),1)]),_:1}),d(A,{class:"divide-y divide-tertiary-100 *:py-4 *:first:pt-0 *:last:pb-0"},{default:h(()=>[(l(!0),f(Y,null,ee(m(L),_=>(l(),B(O,{key:_.to,to:_.to,class:"flex flex-row justify-between w-full"},{default:h(()=>[s("div",ce,[s("span",_e,p(_.field),1),s("span",me,p(_.value),1)]),s("div",de,[d(K,{name:"mdi:chevron-right",size:"1.5rem",class:"text-neutral-500"})])]),_:2},1032,["to"]))),128))]),_:1})])]))])}}};export{je as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.