{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/heREQeWt0fPDvG5hNLG3/qSnsofLVZF5lU6LdRdZY/OldToNewCode.js"],
  "sourcesContent": ["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport { useState, useEffect } from \"react\";\nfunction useWindowSize() {\n  // Use the useState hook to store the screen size\n  const [windowSize, setWindowSize] = useState({\n    width: undefined,\n    height: undefined\n  }); // Use the useEffect hook to add an event listener to the window resize event\n  useEffect(() => {\n    // Define a handler function to update the screen size\n    function handleResize() {\n      setWindowSize({\n        width: window.innerWidth,\n        height: window.innerHeight\n      });\n    } // Add the event listener\n    window.addEventListener(\"resize\", handleResize); // Call the handler function once to get the initial screen size\n    handleResize(); // Return a cleanup function to remove the event listener\n    return () => window.removeEventListener(\"resize\", handleResize);\n  }, []) // Empty array means this effect will only run once\n  ; // Return the screen size\n  return windowSize;\n}\nexport default function OldToNewCode(props) {\n  const size = useWindowSize().width;\n  const containerStyle = {\n    maxWidth: \"100vw\",\n    display: \"flex\",\n    flexDirection: size > 900 ? \"row\" : \"column\",\n    justifyContent: \"center\",\n    alignItems: \"center\",\n    overflow: \"hidden\",\n    gap: \"2rem\",\n    flexWrap: \"nowrap\"\n  };\n  const imgArrowStyle = {\n    maxHeight: \"200px\",\n    maxWidth: \"200px\",\n    transform: size > 900 ? \"rotate(-30deg)\" : \"rotate(60deg)\"\n  };\n  return /*#__PURE__*/_jsxs(\"div\", {\n    style: containerStyle,\n    children: [/*#__PURE__*/_jsx(\"div\", {\n      style: imgContainerStyle,\n      children: /*#__PURE__*/_jsx(\"img\", {\n        src: props.imageOld,\n        style: imgStyle,\n        alt: \"alter Tresor\"\n      })\n    }), /*#__PURE__*/_jsx(\"div\", {\n      children: /*#__PURE__*/_jsx(\"img\", {\n        src: size > 900 ? props.imageArrow : props.imageArrowSmall,\n        style: imgArrowStyle,\n        alt: \"Pfeil\"\n      })\n    }), /*#__PURE__*/_jsx(\"div\", {\n      style: imgContainerStyle,\n      children: /*#__PURE__*/_jsx(\"img\", {\n        src: props.imageNew,\n        style: imgStyle,\n        alt: \"neuer Tresor\"\n      })\n    })]\n  });\n}\n;\nOldToNewCode.defaultProps = {\n  imageOld: \"http://placekitten.com/200/200\",\n  imageNew: \"http://placekitten.com/201/301\",\n  imageArrow: \"http://placekitten.com/50/50\",\n  imageArrowSmall: \"http://placekitten.com/51/51\"\n};\naddPropertyControls(OldToNewCode, {\n  imageOld: {\n    type: ControlType.Image\n  },\n  imageNew: {\n    type: ControlType.Image\n  },\n  imageArrow: {\n    type: ControlType.Image\n  },\n  imageArrowSmall: {\n    type: ControlType.Image\n  }\n});\nconst imgStyle = {\n  maxHeight: \"250px\",\n  maxWidth: \"250px\",\n  objectFit: \"contain\"\n};\nconst imgContainerStyle = {\n  background: \"#f8f8f8\",\n  padding: \"2rem\",\n  borderRadius: \"1rem\",\n  display: \"grid\",\n  placeItems: \"center\"\n};\nexport const __FramerMetadata__ = {\n  \"exports\": {\n    \"default\": {\n      \"type\": \"reactComponent\",\n      \"name\": \"OldToNewCode\",\n      \"slots\": [],\n      \"annotations\": {\n        \"framerContractVersion\": \"1\"\n      }\n    },\n    \"__FramerMetadata__\": {\n      \"type\": \"variable\"\n    }\n  }\n};\n//# sourceMappingURL=./OldToNewCode.map"],
  "mappings": "uJAGA,SAASA,GAAgB,CAEvB,GAAM,CAACC,EAAYC,CAAa,EAAIC,EAAS,CAC3C,MAAO,OACP,OAAQ,MACV,CAAC,EACD,OAAAC,EAAU,IAAM,CAEd,SAASC,GAAe,CACtBH,EAAc,CACZ,MAAOI,EAAO,WACd,OAAQA,EAAO,WACjB,CAAC,CACH,CACA,OAAAA,EAAO,iBAAiB,SAAUD,CAAY,EAC9CA,EAAa,EACN,IAAMC,EAAO,oBAAoB,SAAUD,CAAY,CAChE,EAAG,CAAC,CAAC,EAEEJ,CACT,CACe,SAARM,EAA8BC,EAAO,CAC1C,IAAMC,EAAOT,EAAc,EAAE,MACvBU,EAAiB,CACrB,SAAU,QACV,QAAS,OACT,cAAeD,EAAO,IAAM,MAAQ,SACpC,eAAgB,SAChB,WAAY,SACZ,SAAU,SACV,IAAK,OACL,SAAU,QACZ,EACME,EAAgB,CACpB,UAAW,QACX,SAAU,QACV,UAAWF,EAAO,IAAM,iBAAmB,eAC7C,EACA,OAAoBG,EAAM,MAAO,CAC/B,MAAOF,EACP,SAAU,CAAcG,EAAK,MAAO,CAClC,MAAOC,EACP,SAAuBD,EAAK,MAAO,CACjC,IAAKL,EAAM,SACX,MAAOO,EACP,IAAK,cACP,CAAC,CACH,CAAC,EAAgBF,EAAK,MAAO,CAC3B,SAAuBA,EAAK,MAAO,CACjC,IAAKJ,EAAO,IAAMD,EAAM,WAAaA,EAAM,gBAC3C,MAAOG,EACP,IAAK,OACP,CAAC,CACH,CAAC,EAAgBE,EAAK,MAAO,CAC3B,MAAOC,EACP,SAAuBD,EAAK,MAAO,CACjC,IAAKL,EAAM,SACX,MAAOO,EACP,IAAK,cACP,CAAC,CACH,CAAC,CAAC,CACJ,CAAC,CACH,CAEAR,EAAa,aAAe,CAC1B,SAAU,iCACV,SAAU,iCACV,WAAY,+BACZ,gBAAiB,8BACnB,EACAS,EAAoBT,EAAc,CAChC,SAAU,CACR,KAAMU,EAAY,KACpB,EACA,SAAU,CACR,KAAMA,EAAY,KACpB,EACA,WAAY,CACV,KAAMA,EAAY,KACpB,EACA,gBAAiB,CACf,KAAMA,EAAY,KACpB,CACF,CAAC,EACD,IAAMF,EAAW,CACf,UAAW,QACX,SAAU,QACV,UAAW,SACb,EACMD,EAAoB,CACxB,WAAY,UACZ,QAAS,OACT,aAAc,OACd,QAAS,OACT,WAAY,QACd",
  "names": ["useWindowSize", "windowSize", "setWindowSize", "ye", "ue", "handleResize", "window", "OldToNewCode", "props", "size", "containerStyle", "imgArrowStyle", "u", "p", "imgContainerStyle", "imgStyle", "addPropertyControls", "ControlType"]
}
