{"version":3,"file":"FormularDatenWiderruf.Upcdvpal.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/BPOkV6jivgT1fJtSAofj/PiqPwNMJLDJ6ikC2aKYZ/FormularDatenWiderruf.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{useEffect,useState}from\"react\";export const useStoreWiderruf=createStore({strom:false,gas:false,auftragsnummer:\"\",title:\"\",firstName:\"\",lastName:\"\",mail:\"\",note:\"\"});// ─── strom (Checkbox) ─────────────────────────────────────────────────────────\nexport function withStrom(Component){return props=>{const[store,setStore]=useStoreWiderruf();const isChecked=store.strom||false;const updateStore=newValue=>{setStore({strom:newValue});};return /*#__PURE__*/_jsx(Component,{...props,onValueChange:newValue=>{updateStore(newValue);},onClick:()=>{const newToggleValue=!isChecked;updateStore(newToggleValue);},checked:isChecked});};}// ─── gas (Checkbox) ───────────────────────────────────────────────────────────\nexport function withGas(Component){return props=>{const[store,setStore]=useStoreWiderruf();const isChecked=store.gas||false;const updateStore=newValue=>{setStore({gas:newValue});};return /*#__PURE__*/_jsx(Component,{...props,onValueChange:newValue=>{updateStore(newValue);},onClick:()=>{const newToggleValue=!isChecked;updateStore(newToggleValue);},checked:isChecked});};}// ─── Display Strom/Gas ────────────────────────────────────────────────────────\nexport function withDisplayStromGas(Component){return props=>{const[store]=useStoreWiderruf();const strom=store.strom||false;const gas=store.gas||false;let displayString=\"\";if(strom&&gas)displayString=\"Strom und Gas\";else if(strom)displayString=\"Strom\";else if(gas)displayString=\"Gas\";return /*#__PURE__*/_jsx(Component,{...props,text:displayString});};}// ─── auftragsnummer ───────────────────────────────────────────────────────────\nexport function withAuftragsnummer(Component){return props=>{const[store,setStore]=useStoreWiderruf();const storeValue=store.auftragsnummer??\"\";const[localValue,setLocalValue]=useState(storeValue);useEffect(()=>{setLocalValue(storeValue);},[storeValue]);return /*#__PURE__*/_jsx(Component,{...props,value:localValue,text:localValue,onChange:e=>{setLocalValue(e.target.value);},onBlur:()=>{setStore({auftragsnummer:localValue});}});};}export function withDisplayAuftragsnummer(Component){return props=>{const[store]=useStoreWiderruf();const displayString=String(store.auftragsnummer??\"\");return /*#__PURE__*/_jsx(Component,{...props,text:displayString});};}// ─── title ────────────────────────────────────────────────────────────────────\nexport function withTitle(Component){return props=>{const[store,setStore]=useStoreWiderruf();const storeValue=store.title??\"\";const[localValue,setLocalValue]=useState(storeValue);useEffect(()=>{setLocalValue(storeValue);},[storeValue]);return /*#__PURE__*/_jsx(Component,{...props,value:localValue,text:localValue,onChange:e=>{setLocalValue(e.target.value);},onBlur:()=>{setStore({title:localValue});}});};}export function withDisplayTitle(Component){return props=>{const[store]=useStoreWiderruf();const displayString=String(store.title??\"\");return /*#__PURE__*/_jsx(Component,{...props,text:displayString});};}// ─── firstName ────────────────────────────────────────────────────────────────\nexport function withFirstName(Component){return props=>{const[store,setStore]=useStoreWiderruf();const storeValue=store.firstName??\"\";const[localValue,setLocalValue]=useState(storeValue);useEffect(()=>{setLocalValue(storeValue);},[storeValue]);return /*#__PURE__*/_jsx(Component,{...props,value:localValue,text:localValue,onChange:e=>{setLocalValue(e.target.value);},onBlur:()=>{setStore({firstName:localValue});}});};}export function withDisplayFirstName(Component){return props=>{const[store]=useStoreWiderruf();const displayString=String(store.firstName??\"\");return /*#__PURE__*/_jsx(Component,{...props,text:displayString});};}// ─── lastName ─────────────────────────────────────────────────────────────────\nexport function withLastName(Component){return props=>{const[store,setStore]=useStoreWiderruf();const storeValue=store.lastName??\"\";const[localValue,setLocalValue]=useState(storeValue);useEffect(()=>{setLocalValue(storeValue);},[storeValue]);return /*#__PURE__*/_jsx(Component,{...props,value:localValue,text:localValue,onChange:e=>{setLocalValue(e.target.value);},onBlur:()=>{setStore({lastName:localValue});}});};}export function withDisplayLastName(Component){return props=>{const[store]=useStoreWiderruf();const displayString=String(store.lastName??\"\");return /*#__PURE__*/_jsx(Component,{...props,text:displayString});};}// ─── mail ─────────────────────────────────────────────────────────────────────\nexport function withMail(Component){return props=>{const[store,setStore]=useStoreWiderruf();const storeValue=store.mail??\"\";const[localValue,setLocalValue]=useState(storeValue);useEffect(()=>{setLocalValue(storeValue);},[storeValue]);return /*#__PURE__*/_jsx(Component,{...props,value:localValue,text:localValue,onChange:e=>{setLocalValue(e.target.value);},onBlur:()=>{setStore({mail:localValue});}});};}export function withDisplayMail(Component){return props=>{const[store]=useStoreWiderruf();const displayString=String(store.mail??\"\");return /*#__PURE__*/_jsx(Component,{...props,text:displayString});};}// ─── note ─────────────────────────────────────────────────────────────────────\nexport function withNote(Component){return props=>{const[store,setStore]=useStoreWiderruf();const storeValue=store.note??\"\";const[localValue,setLocalValue]=useState(storeValue);useEffect(()=>{setLocalValue(storeValue);},[storeValue]);return /*#__PURE__*/_jsx(Component,{...props,value:localValue,text:localValue,onChange:e=>{setLocalValue(e.target.value);},onBlur:()=>{setStore({note:localValue});}});};}export function withDisplayNote(Component){return props=>{const[store]=useStoreWiderruf();const displayString=String(store.note??\"\");return /*#__PURE__*/_jsx(Component,{...props,text:displayString});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withDisplayLastName\":{\"type\":\"reactHoc\",\"name\":\"withDisplayLastName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGas\":{\"type\":\"reactHoc\",\"name\":\"withGas\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDisplayAuftragsnummer\":{\"type\":\"reactHoc\",\"name\":\"withDisplayAuftragsnummer\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDisplayFirstName\":{\"type\":\"reactHoc\",\"name\":\"withDisplayFirstName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAuftragsnummer\":{\"type\":\"reactHoc\",\"name\":\"withAuftragsnummer\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDisplayMail\":{\"type\":\"reactHoc\",\"name\":\"withDisplayMail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStrom\":{\"type\":\"reactHoc\",\"name\":\"withStrom\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useStoreWiderruf\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTitle\":{\"type\":\"reactHoc\",\"name\":\"withTitle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMail\":{\"type\":\"reactHoc\",\"name\":\"withMail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDisplayTitle\":{\"type\":\"reactHoc\",\"name\":\"withDisplayTitle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDisplayStromGas\":{\"type\":\"reactHoc\",\"name\":\"withDisplayStromGas\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNote\":{\"type\":\"reactHoc\",\"name\":\"withNote\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLastName\":{\"type\":\"reactHoc\",\"name\":\"withLastName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDisplayNote\":{\"type\":\"reactHoc\",\"name\":\"withDisplayNote\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFirstName\":{\"type\":\"reactHoc\",\"name\":\"withFirstName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FormularDatenWiderruf.map"],"mappings":"8KACA,SAAgB,EAAU,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAU,EAAiB,EAAQ,EAAU,EAAM,OAAO,GAAY,EAAY,GAAU,CAAC,EAAS,CAAC,MAAM,CAAQ,CAAC,CAAE,EAAE,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,cAAc,GAAU,CAAC,EAAY,CAAQ,CAAE,EAAE,YAAY,CAAiC,EAAY,CAAtB,CAAoC,CAAE,EAAE,QAAQ,CAAS,CAAC,CAAE,CAAE,CACzX,SAAgB,EAAQ,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAU,EAAiB,EAAQ,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