1import{J as R,a5 as h,a6 as a,a3 as b,ac as o,ae as c,az as C,a8 as v,i as w,u as B,b as N,e as f}from"./CPHMDxSy.js";import{_ as T}from"./DTKt8JxR.js";import{T as q}from"./D2kax4VM.js";import{q as x,r as A,s as V,l as I,b as S,u as H}from"./BCVOGkAC.js";import{B as g}from"./CwmQBgaN.js";import{_ as M}from"./DzxRlr7L.js";import{g as $,E as D,_ as F}from"./BqBEBrKT.js";import"./CdwwiKBJ.js";import{v as L}from"./DCzqB4Zg.js";import{a as O,b as z}from"./B7I8KK-k.js";import{u as U,t as j}from"./Dl9oAlex.js";import{l as G,a as J}from"./BF3xitTK.js";import"./CIpF2gQE.js";import"./C2g_QCx2.js";import"./DHTHiSDP.js";import"./1HxAjWj1.js";import"./DDQlkgxm.js";import"./DYvH4Tcc.js";const W={id:"customer"},fe=R({__name:"customer",setup(K){x("Class & Event Registration");const i=A("registration"),l=I(),e=U(),{customerProfile:t}=V(e),{showDialog:p}=H(),u=$(D.customer,{selectedEvent:e.selectedEvent,quantity:e.quantity,participants:e.participants,customerProfile:e.customerProfile});u&&l.push({name:u});const n=N({firstname:null,lastname:null,email:null,phone:null}),m=f(()=>t.value.firstname.length>0&&t.value.lastname.length>0&&t.value.email.length>0&&t.value.phone.length>=9),d=f(()=>m.value),_=()=>{l.push({name:"Events Register Participants"})},E=async()=>{m.value===!1?(G({logger:i,event:"registration.customer_validation_blocked",message:"Event registration customer validation blocked before submit",step:"customer",reason:"missing-required-fields"}),p("Please Complete All Fields")):await O(async()=>{await z(k,{logger:i,log:{server:{event:"registration.customer_verify.server_error_handled",message:"Handled event registration customer verification server error"},network:{event:"registration.customer_verify.network_error_handled",message:"Handled event registration customer verification network error"},unknown:{event:"registration.customer_verify.unknown_error_handled",message:"Handled event registration customer verification unknown error"}}})})},k=async()=>{const s=await L(t.value);P(),s.length===0?(i.debug({event:"registration.customer_verified",message:"Event registration customer profile verified",other:{targetRoute:"Events Register Payment"}}),j("customer_verified",{ticket_quantity:e.quantity,value:e.totalPrice,payment_required:e.totalPrice>0}),l.push({name:"Events Register Payment"})):J({logger:i,validationErrors:n,errors:s,failureEvent:"registration.customer_validation_failed",failureMessage:"Event registration customer validation failed after submit",unmappedEvent:"registration.customer_validation_key_unmapped",unmappedMessage:"Event registration customer validation returned unmapped keys",step:"customer"})},P=()=>{for(const s of Object.keys(n))n[s]=null};return(s,r)=>(b(),h(T,null,{header:a(()=>[o(q,{title:"Class & Event Registration"})]),default:a(()=>[v("div",W,[o(F),r[1]||(r[1]=v("h2",{class:"center"},"Customer Information",-1)),o(M,{customerProfile:B(t),"onUpdate:customerProfile":r[0]||(r[0]=y=>w(t)?t.value=y:null),validationErrors:n},null,8,["customerProfile","validationErrors"])])]),footer:a(()=>[o(S,null,{default:a(()=>[o(g,{onClick:_},{default:a(()=>[...r[2]||(r[2]=[c("Previous",-1)])]),_:1}),o(g,{class:C({disabled:!d.value}),disabled:!d.value,onClick:E},{default:a(()=>[...r[3]||(r[3]=[c("Next",-1)])]),_:1},8,["class","disabled"])]),_:1})]),_:1}))}});export{fe 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.