{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/T1E99Vv0Au5YqkwsGw6W/FbEzjLQpx7fiADOKYt5i/EmbedScenePacks.js"],
  "sourcesContent": ["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useState, useEffect, useRef, useMemo } from \"react\";\nimport { addPropertyControls, ControlType } from \"framer\";\nconst scenePackListUrl = \"https://accounts.detail.co/embed/scenes\";\nconst scenePackDetailsUrl = id => `https://accounts.detail.co/embed/scenes/${id}`;\nexport default function EmbedScenePacks(props) {\n  const {\n    scenePackId\n  } = props;\n  const ref = useRef();\n  const url = useMemo(() => {\n    if (scenePackId) {\n      return scenePackDetailsUrl(scenePackId);\n    } else {\n      return scenePackListUrl;\n    }\n  }, [scenePackId]);\n  const [height, setHeight] = useState(0);\n  useEffect(() => {\n    window.addEventListener(\"message\", event => {\n      if (event.data.type === \"iframeHeightChanged\") {\n        setHeight(event.data.height + 20);\n      }\n    });\n  });\n  return /*#__PURE__*/_jsx(\"iframe\", {\n    ref: ref,\n    src: url,\n    sandbox: \"allow-same-origin allow-scripts allow-popups\",\n    scrolling: \"no\",\n    seamless: true,\n    style: {\n      ...iframeStyle,\n      height\n    }\n  });\n}\n;\nconst iframeStyle = {\n  border: \"0\",\n  width: \"100%\",\n  overflow: \"hidden\"\n};\naddPropertyControls(EmbedScenePacks, {\n  scenePackId: {\n    title: \"Scene pack ID\",\n    type: ControlType.String\n  }\n});\nexport const __FramerMetadata__ = {\n  \"exports\": {\n    \"default\": {\n      \"type\": \"reactComponent\",\n      \"name\": \"EmbedScenePacks\",\n      \"slots\": [],\n      \"annotations\": {\n        \"framerContractVersion\": \"1\"\n      }\n    },\n    \"__FramerMetadata__\": {\n      \"type\": \"variable\"\n    }\n  }\n};\n//# sourceMappingURL=./EmbedScenePacks.map"],
  "mappings": "gKAGA,IAAMA,EAAmB,0CACnBC,EAAsBC,GAAM,2CAA2CA,IAC9D,SAARC,EAAiCC,EAAO,CAC7C,GAAM,CACJ,YAAAC,CACF,EAAID,EACEE,EAAMC,EAAO,EACbC,EAAMC,EAAQ,IACdJ,EACKJ,EAAoBI,CAAW,EAE/BL,EAER,CAACK,CAAW,CAAC,EACV,CAACK,EAAQC,CAAS,EAAIC,EAAS,CAAC,EACtC,OAAAC,EAAU,IAAM,CACdC,EAAO,iBAAiB,UAAWC,GAAS,CACtCA,EAAM,KAAK,OAAS,uBACtBJ,EAAUI,EAAM,KAAK,OAAS,EAAE,CAEpC,CAAC,CACH,CAAC,EACmBC,EAAK,SAAU,CACjC,IAAKV,EACL,IAAKE,EACL,QAAS,+CACT,UAAW,KACX,SAAU,GACV,MAAO,CACL,GAAGS,EACH,OAAAP,CACF,CACF,CAAC,CACH,CAEA,IAAMO,EAAc,CAClB,OAAQ,IACR,MAAO,OACP,SAAU,QACZ,EACAC,EAAoBf,EAAiB,CACnC,YAAa,CACX,MAAO,gBACP,KAAMgB,EAAY,MACpB,CACF,CAAC",
  "names": ["scenePackListUrl", "scenePackDetailsUrl", "id", "EmbedScenePacks", "props", "scenePackId", "ref", "pe", "url", "se", "height", "setHeight", "ye", "ue", "window", "event", "p", "iframeStyle", "addPropertyControls", "ControlType"]
}
