{"version":3,"file":"Typeform_1.xS0-5bO2.mjs","names":["Widget","useRef"],"sources":["https:/framerusercontent.com/modules/1mKz2XQojXOa0iRaneAf/C8M7Vn4fzu8WMSnJOOqq/Typeform_1.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef,useEffect}from\"react\";import{addPropertyControls,ControlType,withCSS}from\"framer\";import{motion}from\"framer-motion\";import{containerStyles}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";import{createWidget}from\"https://cdn.skypack.dev/@typeform/embed@1.32.0\";import{emptyStateStyle,stateParagraphStyle,stateTitleStyle}from\"https://framer.com/m/framer/integrations-styles.js@0.2.0\";const Widget=withCSS(function Widget({id,style,onSubmit,hideFooter,hideHeaders,disableAutoFocus,...props}){const container=useRef(null);useEffect(()=>{if(container.current){const widget=createWidget(id,{width:\"100%\",height:\"100%\",container:container.current,transitiveSearchParams:[\"utm_source\",\"utm_medium\",\"utm_campaign\"],onSubmit,hideFooter,hideHeaders,disableAutoFocus});return()=>{widget.unmount();};}},[id,onSubmit,hideFooter,hideHeaders,disableAutoFocus]);return /*#__PURE__*/_jsx(\"div\",{style:style,className:\"framer-typeform\",ref:container,...props});},[\".framer-typeform div, .framer-typeform iframe { width: 100%; height: 100%; border: none !important; }\"]);/**\n * TYPEFORM\n *\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 600\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function Typeform({formId,style,onSubmit,hideFooter,hideHeaders,autoFocus,...props}){function handleSubmit(e){if(onSubmit!==undefined){onSubmit(e);}if(globalThis.__send_framer_conversion__){globalThis.__send_framer_conversion__(\"typeform\");}}return formId?/*#__PURE__*/_jsx(motion.div,{style:{...containerStyles,...style},...props,children:/*#__PURE__*/_jsx(Widget,{id:formId,style:{width:\"100%\",height:\"100%\"},onSubmit:handleSubmit,hideFooter:hideFooter,hideHeaders:hideHeaders,disableAutoFocus:!autoFocus})}):/*#__PURE__*/_jsxs(motion.div,{style:{...emptyStateStyle,...style},...props,children:[/*#__PURE__*/_jsx(\"h1\",{style:stateTitleStyle,children:\"Typeform\"}),/*#__PURE__*/_jsx(\"p\",{style:stateParagraphStyle,children:\"Set a form ID in the Properties.\"})]});}addPropertyControls(Typeform,{formId:{title:\"ID\",type:ControlType.String,placeholder:\"12ABCD34\",defaultValue:\"R2s5BM\",description:\"Create a [Typeform](https://www.typeform.com/) account, add a form and copy its ID. [Learn more…](https://www.framer.com/sites/integrations/typeform/)\"},hideFooter:{title:\"Footer\",type:ControlType.Boolean,enabledTitle:\"Hide\",disabledTitle:\"Show\",defaultValue:false},hideHeaders:{title:\"Headers\",type:ControlType.Boolean,enabledTitle:\"Hide\",disabledTitle:\"Show\",defaultValue:false},autoFocus:{title:\"Auto-focus\",type:ControlType.Boolean,enabledTitle:\"On\",disabledTitle:\"Off\",defaultValue:true},onSubmit:{type:ControlType.EventHandler}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Typeform\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"800\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"600\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Typeform_1.map"],"mappings":"mYAQG,SAAwB,EAAS,CAAC,SAAO,QAAM,WAAS,aAAW,cAAY,YAAU,GAAG,GAAO,CAAC,SAAS,EAAa,EAAE,CAAI,IAAW,IAAA,IAAW,EAAS,EAAE,CAAK,WAAW,4BAA4B,WAAW,2BAA2B,WAAW,CAAG,OAAO,EAAoB,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,GAAG,EAAgB,GAAG,EAAM,CAAC,GAAG,EAAM,SAAsB,EAAK,EAAO,CAAC,GAAG,EAAO,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,CAAC,SA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