1import{b as R}from"/build/_shared/chunk-436JBFW6.js";import{a as z}from"/build/_shared/chunk-OQ2BOC7V.js";import"/build/_shared/chunk-V24SJQVR.js";import{a as Q}from"/build/_shared/chunk-OMT54JRL.js";import{a as w}from"/build/_shared/chunk-UDJ5T7TM.js";import{a as it}from"/build/_shared/chunk-KR2TKKTR.js";import{a as D}from"/build/_shared/chunk-HAKENL6M.js";import"/build/_shared/chunk-LFUTLBR3.js";import{e as F}from"/build/_shared/chunk-NH5M5SP5.js";import"/build/_shared/chunk-J3LAEMVG.js";import"/build/_shared/chunk-YUNMMZO6.js";import{a as L}from"/build/_shared/chunk-F6I26SOB.js";import{a as A}from"/build/_shared/chunk-Z6J2HG2B.js";import{a as rt}from"/build/_shared/chunk-GRTEO3EB.js";import{b as U}from"/build/_shared/chunk-FHNQKSCA.js";import"/build/_shared/chunk-JWFMXZSW.js";import{h as f}from"/build/_shared/chunk-L6GH5KTC.js";import"/build/_shared/chunk-T4TFS3CC.js";import{$ as S,E as h,Ma as _,Pa as E,Ra as B,W as T,X as x,Y as C,ha as k,j as g,la as I,ma as M,sa as v,ua as c,w as l,x as P,z as b}from"/build/_shared/chunk-YMKKZPDR.js";import{E as d,J as y,a as ot,t as u}from"/build/_shared/chunk-BEVEQTPJ.js";import{d as n}from"/build/_shared/chunk-W6WK5VNR.js";var nt=n(rt());var q=n(it());var N=n(ot());var t=n(y());var lt=e=>{var r;let{data:i}=e,a=A(e);return[{title:`${(r=i==null?void 0:i.title)!=null?r:"Unknown Title"} - ${a}`}]};function V(){let{participant:e,tbUser:i,event:a}=d(),r=E(),O=v(),$=u(),H=B(),{session:s}=U(),{register:W,handleSubmit:j,formState:{errors:Y,isSubmitting:Z}}=F({defaultValues:{acompany:e==null?void 0:e.acompany}}),{isOpen:G,onOpen:X,onClose:J}=g(),[m,K]=(0,N.useState)(""),p=()=>{_(o=>{K(o==null?void 0:o.result.result),o!=null&&o.result.result&&X()})},[tt]=f(R,{...L((s==null?void 0:s.payloadToken)||"")}),et=async({acompany:o})=>{e!=null&&e.id?tt({variables:{id:e.id,data:{acompany:o,attendedAt:(0,q.default)().toISOString()}}}).then(()=>{H(`/participants/${$.id}`)}):O({description:r("organizerProfile.check_in.error"),status:"error",isClosable:!0,duration:2e3})},at=[{label:r("organizerProfile.check_in.acompany.none"),value:"none"},{label:r("organizerProfile.check_in.acompany.elderly"),value:"elderly"},{label:r("organizerProfile.check_in.acompany.child"),value:"child"}];return(0,t.jsxs)(t.Fragment,{children:[!m&&(0,t.jsxs)(l,{mx:"auto",w:"full",maxW:"container.md",as:"form",onSubmit:j(et),children:[(0,t.jsx)(M,{px:4,py:5,marginBottom:4,children:(0,t.jsxs)(l,{flex:1,children:[(0,t.jsx)(h,{w:"100%",gap:3,children:(0,t.jsx)(c,{flex:1,fontSize:"xs",color:"gray.500",children:r(`event.${a.type}`)})},a==null?void 0:a.id),(0,t.jsx)(c,{fontSize:"lg",fontWeight:"bold",children:a.name}),(0,t.jsx)(c,{fontSize:"xs",children:(0,t.jsx)(w,{startDate:a==null?void 0:a.startDateTime,endDate:a==null?void 0:a.endDateTime})})]})}),(0,t.jsx)(Q,{}),(0,t.jsx)(l,{py:5,children:(0,t.jsx)(z,{payloadUser:e==null?void 0:e.member,tbUser:i})}),(0,t.jsx)(b,{isInvalid:!!Y.acompany,children:(0,t.jsxs)(I,{px:4,children:[(0,t.jsx)(c,{fontSize:"sm",children:r("organizerProfile.check_in.acompany.title")}),(0,t.jsx)(k,{variant:"flushed",borderColor:"#999999",focusBorderColor:"teal.500",...W("acompany",{required:!0}),children:at.map(o=>(0,t.jsx)("option",{value:o.value,children:o.label},o.value))})]})}),(0,t.jsx)(l,{p:4,mt:2,children:(0,t.jsx)(P,{w:"full",colorScheme:"teal",type:"submit",isLoading:Z,children:r("organizerProfile.check_in.submit")})})]}),(0,t.jsxs)(T,{isOpen:G,onClose:()=>p(),isCentered:!0,children:[(0,t.jsx)(S,{}),(0,t.jsx)(x,{children:(0,t.jsx)(C,{children:(0,t.jsx)(D,{qrCode:m,prevParticipant:e,onCloseButton:()=>p(),closeModal:J})})})]})]})}export{V as default,lt as meta};
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.