1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{63704:(e,r,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/order/[type]/[slug]/checkout/name",function(){return l(67654)}])},67654:(e,r,l)=>{"use strict";l.r(r),l.d(r,{__N_SSG:()=>j,default:()=>g});var i=l(37876),u=l(89099),c=l(85426),t=l(94517),o=l(15039),s=l.n(o),n=l(89033),a=l(14232),d=l(95644),p=l(66497),m=l(69936),f=l(15380),v=l(4359),x=l(65155),h=l(76202),k=l(98234),y=l(90922),C=l(86596);function A(e){var r;let{initial:l="",onDismiss:c}=e,{t:o}=(0,n.Bd)(),A=(0,u.useRouter)(),_=(0,C.Y)(),{setCarryOutPickupName:j,order:g,updateLocalOrder:w}=(0,t.jg)(),{isBlockParty:N}=(0,f.Y)(),[b,I]=(0,a.useState)(l),[q,P]=(0,a.useState)(!1),[T,S]=(0,a.useState)(()=>{var e,r,l,i,u,c,t,o;return{...(null==g||null==(r=g.fulfillment)||null==(e=r.pickup)?void 0:e.customerArrivedCarColorHex)&&{customerArrivedCarColorHex:g.fulfillment.pickup.customerArrivedCarColorHex},...(null==g||null==(i=g.fulfillment)||null==(l=i.pickup)?void 0:l.customerArrivedCarType)&&{customerArrivedCarType:g.fulfillment.pickup.customerArrivedCarType},...(null==g||null==(c=g.fulfillment)||null==(u=c.pickup)?void 0:u.customerArrivedCarMake)&&{customerArrivedCarMake:g.fulfillment.pickup.customerArrivedCarMake},...(null==g||null==(o=g.fulfillment)||null==(t=o.pickup)?void 0:t.customerArrivedDescription)&&{customerArrivedDescription:g.fulfillment.pickup.customerArrivedDescription}}}),D=A.query.slug,H=A.query.type,Y="string"==typeof A.query.sourceId?"?sourceId=".concat(encodeURIComponent(A.query.sourceId)
1):"",E=(0,k.tW)(H)||(null==H?void 0:H.toUpperCase()),M=E!==h.Y14.Pickup||(0,k.Ff)(T),R=!b||E===h.Y14.Pickup&&!M,F=async()=>{_.medium(),P(!0);try{let e=E===h.Y14.Pickup?{name:b,customerArrivedCarColorHex:T.customerArrivedCarColorHex,customerArrivedCarType:T.customerArrivedCarType,customerArrivedCarMake:T.customerArrivedCarMake,customerArrivedDescription:T.customerArrivedDescription}:{name:b};w({order:g,pickupInfo:e}),j(b),await A.push("/order/".concat(H,"/").concat(D,"/checkout").concat(Y))}catch(e){console.error(e)}finally{P(!1)}};return(0,i.jsxs)("div",{id:"orderName",className:"flex h-[100dvh] w-full flex-col overflow-hidden relative",children:[(0,i.jsxs)("div",{className:"shrink-0 flex items-center justify-between pb-[10px] px-[30px] pt-[30px] bg-primary sm:bg-white",children:[(0,i.jsx)(m.A,{variant:"display3",children:o("order:pickup_details")}),(0,i.jsx)(d.A,{width:34,height:34,onClick:c,className:"cursor-pointer hidden lg:block"})]}),(0,i.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col px-[15px] py-[20px]",children:[(0,i.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:(0,i.jsxs)("div",{className:"flex w-full flex-col gap-[20px] pb-[20px]",children:[(0,i.jsxs)("div",{className:"flex flex-col items-start gap-2",children:[(0,i.jsx)(m.A,{variant:"smallHeader",children:o("order:who_will_pickup")}),(0,i.jsx)(p.A,{name:"name",value:b,onChange:e=>I(e.target.value),label:o("order:first_last_name"),autoFocus:!0})]}),E===h.Y14.Pickup&&(0,i.jsx)(x.A,{pickup:{...null==g||null==(r=g.fulfillment)?void 0:r.pickup,...T},onPickupInfoChange:e=>S(r=>({...r,...e})),disabled:q,manualFormSyncsToParent:!0})]})}),(0,i.jsx)("div",{className:"shrink-0 flex justify-center pt-[20px]",children:(0,i.jsx)(v.A,{id:"nextButton",className:s()("w-full",N&&y.S1),onClick:F,disabled:q||R,children:o("order:next")})})]})]})}var _=l(65432),j=!0;function g(){let e=(0,u.useRouter)(),{order:r,carryOutPickupName:l}=(0,t.jg)(),{customer:o}=(0,c.L)(),s=e.query.slug,n=e.query.type,a="string"==typeof e.query.sourceId?"?sourceId=".concat(encodeURIComponent(e.query.sourceId)
1):"";return r?(0,i.jsx)(A,{initial:l||(null==o?void 0:o.name),onDismiss:()=>{e.push("/order/".concat(n,"/").concat(s,"/").concat(a,"#cart"))}}):null}g.getLayout=e=>(0,i.jsx)(_.A,{cta:!1,footer:!1,header:!1,children:e})}},e=>{e.O(0,[4e3,9555,1221,5432,636,6593,8792],()=>e(e.s=63704)),_N_E=e.O()}]); 2//# sourceMappingURL=name-dadbf401a5b3cb69.js.map
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.