{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/iXhvdtczWdlJjVClN12l/92HYjPpZorPMkm7RKiwF/ContactForm.js"],
  "sourcesContent": ["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers/\n/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function ContactForm(props){// This is a React component containing an Example component\n// - Replace <Example /> with your own code\n// - Find inspiration: https://www.framer.com/developers/\nconst[success,setSuccess]=useState();const[error,setError]=useState(null);const[formId,setFormId]=useState(props.isProductForm?props.generalFormId||\"A6HEe0O9\":props.generalFormId||\"03HGF2UO\");console.log(formId);const formRef=useRef();const areAllFieldsFilled=fieldsObj=>{return!Object.values(fieldsObj).some(fieldValue=>!fieldValue);};const handleInquiryTypeChange=event=>{setFormId(event.target.value);};const handleSubmit=async e=>{e.preventDefault();// Read the form data\nconst form=e.target;const formData=new FormData(form);const formJson=Object.fromEntries(formData.entries());if(!areAllFieldsFilled(formJson)){setError(\"Please fill out all the fields\");return;}const response=await fetch(`https://submit-form.com/${formId}`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\",Accept:\"application/json\"},body:JSON.stringify(formJson)});const data=await response.json();if(response.status===200){setSuccess(true);setError(null);formRef.current.reset();}else{setError(\"There was an error submitting the form.  Please try again.\");}};return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsxs(\"form\",{className:\"contactForm\",action:`https://submit-form.com/${props.generalFormId}`,style:formStyle,onSubmit:handleSubmit,ref:formRef,children:[!props.isProductForm&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:\"inquiry_type\",children:\"Inquiry Type\"}),/*#__PURE__*/_jsxs(\"select\",{name:\"inquiry_type\",value:formId,onChange:handleInquiryTypeChange,style:selectStyle,children:[/*#__PURE__*/_jsx(\"option\",{value:props.generalFormId||\"03HGF2UO\",children:\"General\"}),/*#__PURE__*/_jsx(\"option\",{value:props.productionRentalFormId||\"DYk1JX6z\",children:\"Production/Rental\"}),/*#__PURE__*/_jsx(\"option\",{value:props.salesInstallationFormId||\"MPM8JzFt\",children:\"Sales/Installation\"}),/*#__PURE__*/_jsx(\"option\",{value:props.usedEquipmentFormId||\"EbNoduNW\",children:\"Used Equipment\"})]})]}),/*#__PURE__*/_jsx(\"label\",{htmlFor:\"name\",children:\"Your Name\"}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",id:\"name\",name:\"name\",style:inputStyle,required:true}),/*#__PURE__*/_jsx(\"label\",{htmlFor:\"company\",children:\"Company\"}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",id:\"company\",name:\"company\",required:true,style:inputStyle}),/*#__PURE__*/_jsx(\"label\",{htmlFor:\"email\",children:\"Email Address\"}),/*#__PURE__*/_jsx(\"input\",{type:\"email\",id:\"email\",name:\"email\",style:inputStyle,required:true}),/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:numberInputStyle}}),/*#__PURE__*/_jsx(\"label\",{htmlFor:\"email\",children:\"Phone Number\"}),/*#__PURE__*/_jsx(\"input\",{type:\"number\",id:\"phone\",name:\"phone\",required:true,style:inputStyle}),props.isProductForm&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"label\",{htmlFor:\"product\",children:\"Product\"}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",id:\"product\",name:\"product\",required:true,readOnly:true,style:inputStyle,value:`${props.productBrand} -- ${props.productTitle}`})]}),/*#__PURE__*/_jsx(\"label\",{htmlFor:\"message\",children:\"Message\"}),/*#__PURE__*/_jsx(\"textarea\",{id:\"message\",name:\"message\",required:true,rows:\"4\",style:messageStyle}),/*#__PURE__*/_jsxs(\"div\",{style:bottomStyle,children:[/*#__PURE__*/_jsx(\"p\",{style:footNoteStyle,children:\"Please note: All Fields Are required\"}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:buttonStyle,children:\"Send Message\"})]})]}),success&&/*#__PURE__*/_jsx(\"p\",{style:successStyle,children:\"Thank you, your inquiry was submitted.\"}),error&&/*#__PURE__*/_jsx(\"p\",{style:errorStyle,children:\"Thank you, your inquiry was submitted.\"})]});}addPropertyControls(ContactForm,{isProductForm:{type:ControlType.Boolean,title:\"Is this a Product Form?\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},productTitle:{type:ControlType.String,title:\"Product Title\",hidden(props){return props.isProductForm===false;}},productBrand:{type:ControlType.String,title:\"Product Brand\",hidden(props){return props.isProductForm===false;}},generalFormId:{type:ControlType.String,title:\"General Inquiry Form ID\",hidden(props){return props.isProductForm===true;}},productionRentalFormId:{type:ControlType.String,title:\"Production/Rental Form ID\",hidden(props){return props.isProductForm===true;}},salesInstallationFormId:{type:ControlType.String,title:\"Sales/Installation Form ID\",hidden(props){return props.isProductForm===true;}},usedEquipmentFormId:{type:ControlType.String,title:\"Used Equipment Form ID\",hidden(props){return props.isProductForm===true;}},productFormId:{type:ControlType.String,title:\"Product Form ID\",hidden(props){return props.isProductForm===false;}}});// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst containerStyle={height:\"100%\",width:\"100%\",fontFamily:\"Tomato Grotesk Regular, sans-serif\",position:\"relative\"};const formStyle={display:\"flex\",flexDirection:\"column\",justifyContent:\"stretch\",alignItems:\"flex-start\",width:\"100%\"};const inputStyle={borderRadius:\"8px\",background:\"#F5F5F5\",border:\"none\",width:\"100%\",minHeight:\"37px\",padding:\"8px\",margin:\"5px 0 19px 0 \"};const numberInputStyle=`\n    .contactForm input::-webkit-outer-spin-button,\n    .contactForm input::-webkit-inner-spin-button {\n      -webkit-appearance: none;\n      margin: 0;\n    }\n\n    .contactForm input[type=number] {\n      -moz-appearance: textfield;\n    }\n  `;const selectStyle={...inputStyle,appearance:\"none\",backgroundImage:`url(\"data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e\")`,backgroundRepeat:\"no-repeat\",backgroundPosition:\"right 1rem center\",backgroundSize:\"1em\"};const messageStyle={borderRadius:\"8px\",background:\"#F5F5F5\",border:\"none\",width:\"100%\",rows:\"10\",padding:\"8px\",margin:\"8px 0 19px 0 \"};const buttonStyle={borderRadius:\"4px\",background:\"#005DC8\",color:\"#FFFFFF\",border:\"none\",padding:\"12px 16px\",marginLeft:\"5px\",cursor:\"pointer\"};const footNoteStyle={fontSize:\"12px\"};const bottomStyle={width:\"100%\",display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\"};const successStyle={position:\"absolute\",bottom:\"-20px\",left:\"0\",transform:\"translateY(100%)\"};const errorStyle={position:\"absolute\",bottom:\"-20px\",left:\"0\",transform:\"translateY(100%)\",color:\"red\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ContactForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ContactForm.map"],
  "mappings": "gHAQwL,SAARA,EAA6BC,EAAM,CAGnN,GAAK,CAACC,EAAQC,CAAU,EAAEC,EAAS,EAAO,CAACC,EAAMC,CAAQ,EAAEF,EAAS,IAAI,EAAO,CAACG,EAAOC,CAAS,EAAEJ,EAASH,EAAM,cAAcA,EAAM,eAAe,WAAWA,EAAM,eAAe,UAAU,EAAE,QAAQ,IAAIM,CAAM,EAAE,IAAME,EAAQC,EAAO,EAAQC,EAAmBC,GAAkB,CAAC,OAAO,OAAOA,CAAS,EAAE,KAAKC,GAAY,CAACA,CAAU,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AAO,WAAW,qCAAqC,SAAS,UAAU,EAAQC,EAAU,CAAC,QAAQ,OAAO,cAAc,SAAS,eAAe,UAAU,WAAW,aAAa,MAAM,MAAM,EAAQI,EAAW,CAAC,aAAa,MAAM,WAAW,UAAU,OAAO,OAAO,MAAM,OAAO,UAAU,OAAO,QAAQ,MAAM,OAAO,eAAe,EAAQC,EAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUrYF,EAAY,CAAC,GAAGC,EAAW,WAAW,OAAO,gBAAgB,4QAA4Q,iBAAiB,YAAY,mBAAmB,oBAAoB,eAAe,KAAK,EAAQE,EAAa,CAAC,aAAa,MAAM,WAAW,UAAU,OAAO,OAAO,MAAM,OAAO,KAAK,KAAK,QAAQ,MAAM,OAAO,eAAe,EAAQG,EAAY,CAAC,aAAa,MAAM,WAAW,UAAU,MAAM,UAAU,OAAO,OAAO,QAAQ,YAAY,WAAW,MAAM,OAAO,SAAS,EAAQD,EAAc,CAAC,SAAS,MAAM,EAAQD,EAAY,CAAC,MAAM,OAAO,QAAQ,OAAO,eAAe,gBAAgB,WAAW,QAAQ,EAAQG,EAAa,CAAC,SAAS,WAAW,OAAO,QAAQ,KAAK,IAAI,UAAU,kBAAkB,EAAQC,EAAW,CAAC,SAAS,WAAW,OAAO,QAAQ,KAAK,IAAI,UAAU,mBAAmB,MAAM,KAAK",
  "names": ["ContactForm", "props", "success", "setSuccess", "ye", "error", "setError", "formId", "setFormId", "formRef", "pe", "areAllFieldsFilled", "fieldsObj", "fieldValue", "handleInquiryTypeChange", "event", "handleSubmit", "e", "form", "formData", "formJson", "response", "data", "u", "containerStyle", "formStyle", "l", "p", "selectStyle", "inputStyle", "numberInputStyle", "messageStyle", "bottomStyle", "footNoteStyle", "buttonStyle", "successStyle", "errorStyle", "addPropertyControls", "ControlType"]
}
