1import{ac as E,ag as q,p as D,aQ as m,y as l,o as w,ay as z,aE as t,Z as v,x as I,al as a,aP as L,aI as M,r as N}from"./CT7wXifU.js";import{t as O,h as j}from"./BO7bjt2u.js";import Z from"./BO_wHg7V.js";import{u as B}from"./DOsPU9u1.js";import{u as H}from"./CSQgM3SS.js";import{aC as F,k as Q,j as G,ad as _,e as T,g as J,aD as K}from"./B9SPuWlS.js";import{C as W,z as X}from"#entry";import{i as y,f as Y,m as ee,a as te}from"./BP6KYo0g.js";import{_ as ae}from"./D6trejea.js";import"./CUCeyMWA.js";import"./Cp2c5yTg.js";const le={__name:"ProfileAddEdit",setup(S){const{isMemberLoggedIn:n,getUser:p}=B(),{getApiCalls:V,putApiCalls:C,secureEndpoint:c}=H(),P=W(),{$toast:d}=F(),f=a(null),o=a(null),r=a(null),u=a(null),i=a(null),g=a(null),R=a(null),b=a(null),k=a(null),A=a(null),h=a(null),U=a(null);E(async()=>{n()||(d.error("Please Login First as a member",{duration:15e3}),P.push("/"));const e=(await V(c.CUSTOMER,{id:p().id})).results;e&&e.length>0&&(f.value=e[0].id,g.value=e[0].first_name,R.value=e[0].last_name,o.value=e[0].phone,r.value=e[0].city,i.value=e[0].street,u.value=e[0].zipcode,b.value=e[0].email)});const $=async()=>{if(!await te({phone:k.value,city:A.value,zipcode:h.value,street:U.value})){d.error("Please fill out the required fields",{duration:15e3});return}const e={id:f.value,first_name:g.value,last_name:R.value,street:i.value,zipcode:u.value,city:r.value,phone:o.value,email:b.value};try{await C(c.CUSTOMER,e,{},"Could not update Profile"),d.success("Profile Updated Successfully",{duration:15e3})}catch{}};return(x,e)=>(q(),D(J,null,{default:m(()=>[l(Q,{class:""},{default:m(()=>[w("h2",null,z(t(g))+" "+z(t(R)),1)]),_:1}),l(G,{class:"pt-5"},{default:m(()=>[w("form",null,[l(_,{modelValue:t(o),"onUpdate:modelValue":e[0]||(e[0]=s=>v(o)?o.value=s:null),label:"Phone Number",rules:[t(y),t(Y)(10),t(ee)(11)],ref_key:"phoneRef",ref:k,"data-vv-name":"phone",required:"",color:"pink",outlined:"",variant:"outlined"},null,8,["modelValue","rules"]),l(_,{modelValue:t(r),"onUpdate:modelValue":e[1]||(e[1]=s=>v(r)?r.value=s:null),label:"City",rules:[t(y)],ref_key:"cityRef",ref:A,"data-vv-name":"city",required:"",color:"pink",variant:"outlined"},null,8,["modelValue","rules"]),l(_,{modelValue:t(u),"onUpdate:modelValue":e[2]||(e[2]=s=>v(u)?u.value=s:null),label:"ZIP",rules:[t(y)],ref_key:"zipcodeRef",ref:h,"data-vv-name":"zipcode",required:"",color:"pink",variant:"outlined"},null,8,["modelValue","rules"]),l(_,{modelValue:t(i),"onUpdate:modelValue":e[3]||(e[3]=s=>v(i)?i.value=s:null),label:"Street",rules:[t(y)],ref_key:"streetRef",ref:U,"data-vv-name":"street",required:"",color:"pink",variant:"outlined"},null,8,["modelValue","rules"]),l(T,{class:"save-button mr-4 update-btn text-white",onClick:e[4]||(e[4]=s=>$())},{default:m(()=>[...e[6]||(e[6]=[I("Update",-1)])]),_:1}),l(T,{class:"mr-4 cancel-btn text-white",onClick:e[5]||(e[5]=()=>x.$router.push("/"))},{default:m(()=>[...e[7]||(e[7]=[I("Cancel",-1)])]),_:1})])]),_:1})]),_:1}))}},se=ae(le,[["__scopeId","data-v-16f6f049"]]),oe="Profile",ye={__name:"index",async setup(S){let n,p;const V=K().public,{titleFromAPI:C,descriptionFromAPI:c,headlineFromAPI:P,cssText:d}=([n,p]=L(()=>O()),n=await n,p(),n);X(j(C,c,d,V));const{isMemberLoggedIn:f}=B(),o=M(),{$toast:r}=F();return E(()=>{f()||(r.error("Please Login First as a member",{duration:15e3}),o.push("/"))}),(u,i)=>(q(),N("div",null,[l(Z,{header:oe}),l(se)]))}};export{ye 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.