{"ast":null,"code":"import { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from \"react\";\nimport Head from \"next/head\";\nimport ErrorPage from \"next/error\";\nimport { useRouter } from \"next/router\";\nimport PageLayout from \"../../components/page-layout\";\nimport { findExample, getExampleParams, getExamples } from \"../../lib/examples-api\";\n\nconst ExampleComponent = ({\n  example\n}) => {\n  const router = useRouter();\n  if (!router.isFallback && !(example !== null && example !== void 0 && example.name)) return /*#__PURE__*/_jsx(ErrorPage, {\n    statusCode: 404\n  });\n  return /*#__PURE__*/_jsxs(PageLayout, {\n    children: [/*#__PURE__*/_jsx(Head, {\n      children: /*#__PURE__*/_jsxs(\"title\", {\n        children: [\"Example \", example.name]\n      })\n    }), /*#__PURE__*/_jsxs(\"h1\", {\n      children: [\"Example \", example.name]\n    }), /*#__PURE__*/_jsxs(\"div\", {\n      className: \"example\",\n      children: [/*#__PURE__*/_jsx(\"pre\", {\n        children: /*#__PURE__*/_jsx(\"code\", {\n          dangerouslySetInnerHTML: {\n            __html: example.codeHTML\n          }\n        })\n      }), /*#__PURE__*/_jsx(\"iframe\", {\n        src: example.iframePath\n      })]\n    })]\n  });\n};\n\nexport default ExampleComponent;\nexport async function getStaticProps({\n  params\n}) {\n  const example = findExample(params.example);\n  return {\n    props: {\n      example\n    }\n  };\n}\nexport async function getStaticPaths() {\n  const examples = getExamples();\n  return {\n    paths: examples.map(example => ({\n      params: getExampleParams(example)\n    })),\n    fallback: false\n  };\n}\nexport const config = {\n  unstable_runtimeJS: false\n};","map":null,"metadata":{},"sourceType":"module"}