{"version":3,"file":"CallbackForm.DNlxMENx.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/MjLqGv0SmUTkbzrsa8VE/zRgZOxAzXC19syQknuJy/CallbackForm.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,useReducedMotion}from\"framer-motion\";import{useState}from\"react\";/**\n * VintAi Callback Form\n *\n * Phone-first Lead-Magnet. User trägt nur Telefonnummer ein,\n * Modal-Webhook triggert ElevenLabs-Outbound-Call durch Mara (Ramona-Stimme).\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 560\n */export default function CallbackForm(props){const{endpoint,eyebrow,headline,subheadline,placeholder,buttonLabel,buttonLabelLoading,successHeadline,successBody,errorHeadline,errorBody,consentText,backgroundColor,accentColor,textColor,mutedColor,borderColor}=props;const[phone,setPhone]=useState(\"\");const[consent,setConsent]=useState(false);const[status,setStatus]=useState(\"idle\");const reduce=useReducedMotion();const clean=phone.replace(/[^\\d+]/g,\"\");const valid=clean.length>=7&&consent;async function submit(e){e.preventDefault();if(!valid||status===\"loading\")return;setStatus(\"loading\");try{const res=await fetch(endpoint,{method:\"POST\",headers:{\"content-type\":\"application/json\"},body:JSON.stringify({phone,consent})});if(!res.ok)throw new Error(`HTTP ${res.status}`);setStatus(\"success\");}catch{setStatus(\"error\");}}const spring=reduce?{duration:0}:{type:\"spring\",stiffness:260,damping:24};const containerStyle={background:backgroundColor,border:`1px solid ${borderColor}`,borderRadius:24,padding:\"40px\",display:\"flex\",flexDirection:\"column\",gap:20,width:\"100%\",boxSizing:\"border-box\",fontFamily:\"'General Sans', Inter, -apple-system, sans-serif\"};if(status===\"success\"){return /*#__PURE__*/_jsxs(motion.div,{style:containerStyle,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:spring,children:[/*#__PURE__*/_jsx(\"div\",{style:{width:48,height:48,borderRadius:999,background:accentColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#fff\",fontSize:22},\"aria-hidden\":true,children:\"✓\"}),/*#__PURE__*/_jsx(\"h3\",{style:{margin:0,color:textColor,fontSize:28,lineHeight:1.15,fontWeight:600},children:successHeadline}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:mutedColor,fontSize:16,lineHeight:1.5},children:successBody})]});}return /*#__PURE__*/_jsxs(motion.form,{onSubmit:submit,style:containerStyle,initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:true,margin:\"-80px\"},transition:spring,children:[eyebrow&&/*#__PURE__*/_jsx(\"span\",{style:{alignSelf:\"flex-start\",fontSize:12,fontWeight:600,letterSpacing:\"0.08em\",textTransform:\"uppercase\",color:accentColor,background:`${accentColor}1A`,padding:\"6px 12px\",borderRadius:999},children:eyebrow}),/*#__PURE__*/_jsx(\"h3\",{style:{margin:0,color:textColor,fontSize:32,lineHeight:1.15,fontWeight:600},children:headline}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:mutedColor,fontSize:16,lineHeight:1.5},children:subheadline}),/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",flexDirection:\"column\",gap:8},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontSize:13,fontWeight:500,color:mutedColor},children:\"Telefonnummer\"}),/*#__PURE__*/_jsx(\"input\",{type:\"tel\",value:phone,onChange:e=>setPhone(e.target.value),placeholder:placeholder,autoComplete:\"tel\",inputMode:\"tel\",required:true,style:{padding:\"16px 18px\",fontSize:18,fontFamily:\"inherit\",borderRadius:12,border:`1px solid ${borderColor}`,outline:\"none\",color:textColor,background:\"#fff\",boxSizing:\"border-box\"},onFocus:e=>e.currentTarget.style.borderColor=accentColor,onBlur:e=>e.currentTarget.style.borderColor=borderColor})]}),/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",gap:10,alignItems:\"flex-start\",cursor:\"pointer\",color:mutedColor,fontSize:13,lineHeight:1.5},children:[/*#__PURE__*/_jsx(\"input\",{type:\"checkbox\",checked:consent,onChange:e=>setConsent(e.target.checked),style:{marginTop:3,accentColor:accentColor,width:16,height:16,flexShrink:0}}),/*#__PURE__*/_jsx(\"span\",{children:consentText})]}),/*#__PURE__*/_jsx(motion.button,{type:\"submit\",disabled:!valid||status===\"loading\",whileHover:valid&&!reduce?{scale:1.015}:undefined,whileTap:valid&&!reduce?{scale:.985}:undefined,transition:spring,style:{marginTop:4,padding:\"18px 24px\",fontSize:17,fontWeight:600,fontFamily:\"inherit\",color:\"#fff\",background:valid?textColor:`${textColor}66`,border:\"none\",borderRadius:12,cursor:valid?\"pointer\":\"not-allowed\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:10,transition:\"background 200ms\"},children:status===\"loading\"?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Spinner,{}),buttonLabelLoading]}):/*#__PURE__*/_jsxs(_Fragment,{children:[buttonLabel,/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":true,children:\"→\"})]})}),status===\"error\"&&/*#__PURE__*/_jsxs(motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},style:{padding:\"12px 16px\",borderRadius:10,background:\"#FDECEC\",color:\"#8B1A1A\",fontSize:14,lineHeight:1.45},role:\"alert\",children:[/*#__PURE__*/_jsx(\"strong\",{children:errorHeadline}),\" \",errorBody]})]});}function Spinner(){return /*#__PURE__*/_jsx(motion.span,{\"aria-hidden\":true,animate:{rotate:360},transition:{repeat:Infinity,duration:.9,ease:\"linear\"},style:{width:18,height:18,border:\"2px solid rgba(255,255,255,0.3)\",borderTopColor:\"#fff\",borderRadius:\"50%\",display:\"inline-block\"}});}CallbackForm.defaultProps={endpoint:\"https://michalpawelan--trigger-callback.modal.run\",eyebrow:\"R\\xfcckruf in 30 Sekunden\",headline:\"Lass dich kostenlos zur\\xfcckrufen.\",subheadline:\"Trag deine Nummer ein — Mara, unsere KI-Assistentin, meldet sich in unter 30 Sekunden. Kurzer Discovery-Call, kein Verkauf.\",placeholder:\"+49 177 1234567\",buttonLabel:\"Ruft mich jetzt an\",buttonLabelLoading:\"Einen Moment…\",successHeadline:\"L\\xe4uft — dein Handy klingelt gleich.\",successBody:\"Halte es in der N\\xe4he. Der Anruf kommt aus Berlin unter +49 30 83795472.\",errorHeadline:\"Hmm, das hat nicht geklappt.\",errorBody:\"Versuch's gleich nochmal oder schreib uns kurz per WhatsApp — +49 177 3236699.\",consentText:\"Ich bin einverstanden, dass VintAi mich einmalig unter dieser Nummer zur\\xfcckruft. Meine Daten werden nicht weitergegeben.\",backgroundColor:\"#FFFFFF\",accentColor:\"#D37BFF\",textColor:\"#1B0C25\",mutedColor:\"#6E6B71\",borderColor:\"#EDEBEE\"};addPropertyControls(CallbackForm,{endpoint:{type:ControlType.String,title:\"Webhook URL\",defaultValue:\"https://michalpawelan--trigger-callback.modal.run\"},eyebrow:{type:ControlType.String,title:\"Eyebrow\"},headline:{type:ControlType.String,title:\"Headline\"},subheadline:{type:ControlType.String,title:\"Subheadline\",displayTextArea:true},placeholder:{type:ControlType.String,title:\"Input Placeholder\"},buttonLabel:{type:ControlType.String,title:\"Button\"},buttonLabelLoading:{type:ControlType.String,title:\"Button (loading)\"},consentText:{type:ControlType.String,title:\"Consent Text\",displayTextArea:true},successHeadline:{type:ControlType.String,title:\"Success Headline\"},successBody:{type:ControlType.String,title:\"Success Body\",displayTextArea:true},errorHeadline:{type:ControlType.String,title:\"Error Headline\"},errorBody:{type:ControlType.String,title:\"Error Body\",displayTextArea:true},backgroundColor:{type:ControlType.Color,title:\"Background\"},accentColor:{type:ControlType.Color,title:\"Accent\"},textColor:{type:ControlType.Color,title:\"Text\"},mutedColor:{type:ControlType.Color,title:\"Muted\"},borderColor:{type:ControlType.Color,title:\"Border\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CallbackForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framer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