{"version":3,"file":"PreorderTestSteps.D69kErUb.mjs","names":["React.forwardRef","useRef","__esmMin","de","init_jsx_runtime","J","c","init_npm_react_18_3_1","ce","motion","addPropertyControls","useSVGTemplate","cx","withCSS","ControlType","init_framer_DKgW_P28","mask","Base","MotionSVG","SVG","svg","getProps","Icon","init_MRp3P10aE","props","rest","animated","width1","color","restProps","href","className","P_DcoRcrY","JEeZYcamG","style","mark","Component","attrs","withReservationDetails","withVenmoPayment","withNextToPayment","withBackToDetails","withPreorderSteps","root","paymentVisible","originalDisplay","find","step","setStep","details","payment","showPayment","focus","next","fields","field","button","node","ref","action","event","init_PreorderTestSteps"],"sources":["https:/framerusercontent.com/modules/BO5wiJq1V5ZunT8iPSjo/SeHxyrmIkCJJ8pIxUV3H/MRp3P10aE.js","https:/framerusercontent.com/modules/rPBFw5ZSruJAvExddPPm/8LbSKUqmX2bycwambVzH/PreorderTestSteps.js"],"sourcesContent":["// Generated by Framer (85eaff3)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7 14 L 0 7 L 7 0\" fill=\"transparent\" height=\"14px\" id=\"MZQyihG1W\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--js9iwy, 2)\" stroke=\"var(--1m973uw, rgb(0,0,0))\" transform=\"translate(5 5)\" width=\"7px\"/><path d=\"M 14 0 L 0 0\" fill=\"transparent\" height=\"1px\" id=\"Icbu9SXUE\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--js9iwy, 2)\" stroke=\"var(--1m973uw, rgb(0,0,0))\" transform=\"translate(5 12)\" width=\"14px\"/></svg>';const getProps=({color,height,id,width,width1,...props})=>{return{...props,JEeZYcamG:width1??props.JEeZYcamG??2,P_DcoRcrY:color??props.P_DcoRcrY??\"rgb(0, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,P_DcoRcrY,JEeZYcamG,...restProps}=getProps(props);const href=useSVGTemplate(\"3838275970\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-kVQN1\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1m973uw\":P_DcoRcrY,\"--js9iwy\":JEeZYcamG,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-kVQN1 { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"P_DcoRcrY\":\"color\",\"JEeZYcamG\":\"width1\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Arrow Left\",\"color\":{\"type\":\"variable\",\"value\":\"1m973uw\"},\"set\":{\"localId\":\"vectorSet/ZsiCCGPvG\",\"id\":\"ZsiCCGPvG\",\"moduleId\":\"Y7SpbVH16cWqMhj75z1M\"}}\n */const Icon=withCSS(Component,css,\"framer-kVQN1\");Icon.displayName=\"Arrow Left\";export default Icon;addPropertyControls(Icon,{P_DcoRcrY:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Color\",type:ControlType.Color},JEeZYcamG:{defaultValue:2,displayStepper:true,hidden:false,max:16,min:1,title:\"Width\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerVariables\":\"{\\\"P_DcoRcrY\\\":\\\"color\\\",\\\"JEeZYcamG\\\":\\\"width1\\\"}\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerVector\":\"{\\\"name\\\":\\\"Arrow Left\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"1m973uw\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/ZsiCCGPvG\\\",\\\"id\\\":\\\"ZsiCCGPvG\\\",\\\"moduleId\\\":\\\"Y7SpbVH16cWqMhj75z1M\\\"}}\",\"framerIntrinsicWidth\":\"24\",\"framerIntrinsicHeight\":\"24\",\"framerImmutableVariables\":\"true\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";function mark(Component,attrs){return /*#__PURE__*/forwardRef(function MarkedLayer(props,ref){return /*#__PURE__*/_jsx(Component,{...props,...attrs,ref:ref});});}export function withReservationDetails(Component){return mark(Component,{\"data-preorder-step\":\"details\",tabIndex:-1});}export function withVenmoPayment(Component){return mark(Component,{\"data-preorder-step\":\"payment\",tabIndex:-1});}export function withNextToPayment(Component){return mark(Component,{\"data-preorder-action\":\"next\",type:\"button\"});}export function withBackToDetails(Component){return mark(Component,{\"data-preorder-action\":\"back\",type:\"button\"});}export function withPreorderSteps(Component){return /*#__PURE__*/forwardRef(function PreorderSteps(props,ref){const root=useRef(null);const paymentVisible=useRef(false);const originalDisplay=useRef(\"\");function find(step){return root.current?.querySelector('[data-preorder-step=\"'+step+'\"]');}function setStep(showPayment,focus=true){const details=find(\"details\");const payment=find(\"payment\");if(!details||!payment)return;paymentVisible.current=showPayment;details.style.display=showPayment?\"none\":originalDisplay.current;payment.style.display=showPayment?\"flex\":\"none\";if(focus)(showPayment?payment:details).focus();}function next(){const details=find(\"details\");if(!details)return;const fields=details.querySelectorAll(\"input, select, textarea\");for(const field of fields){if(!field.reportValidity())return;}setStep(true);}useEffect(()=>{const details=find(\"details\");if(details)originalDisplay.current=details.style.display;setStep(false,false);for(const button of root.current?.querySelectorAll(\"button[data-preorder-action]\")??[]){button.type=\"button\";}},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:node=>{root.current=node;if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;},onClickCapture:event=>{const action=event.target instanceof Element?event.target.closest(\"[data-preorder-action]\")?.getAttribute(\"data-preorder-action\"):null;if(!action)return props.onClickCapture?.(event);event.preventDefault();if(action===\"next\")next();else setStep(false);},onKeyDownCapture:event=>{props.onKeyDownCapture?.(event);if(event.defaultPrevented||paymentVisible.current||event.key!==\"Enter\"||!(event.target instanceof HTMLInputElement))return;event.preventDefault();next();},onSubmitCapture:event=>{if(paymentVisible.current)return props.onSubmitCapture?.(event);event.preventDefault();event.stopPropagation();next();}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withNextToPayment\":{\"type\":\"reactHoc\",\"name\":\"withNextToPayment\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withReservationDetails\":{\"type\":\"reactHoc\",\"name\":\"withReservationDetails\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPreorderSteps\":{\"type\":\"reactHoc\",\"name\":\"withPreorderSteps\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVenmoPayment\":{\"type\":\"reactHoc\",\"name\":\"withVenmoPayment\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBackToDetails\":{\"type\":\"reactHoc\",\"name\":\"withBackToDetails\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable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