{"ast":null,"code":"var _jsxFileName = \"/Users/atanasster/component-controls/examples/starter/pages/[doctype].tsx\";\nvar __jsx = React.createElement;\nimport React from 'react';\nimport { defDocType } from '@component-controls/core';\nimport { DocumentHomePage } from '@component-controls/app';\nimport { Layout, store, getHomePagesPaths, getDocHomePage } from '@component-controls/nextjs-plugin';\n\nconst DocHomeTemplate = ({\n  type = defDocType,\n  docId,\n  storyId\n}) => {\n  return __jsx(Layout, {\n    docId: docId,\n    storyId: storyId,\n    __self: this,\n    __source: {\n      fileName: _jsxFileName,\n      lineNumber: 24,\n      columnNumber: 5\n    }\n  }, __jsx(DocumentHomePage, {\n    type: type,\n    __self: this,\n    __source: {\n      fileName: _jsxFileName,\n      lineNumber: 25,\n      columnNumber: 7\n    }\n  }));\n};\n\nexport const getStaticPaths = async () => {\n  return {\n    paths: getHomePagesPaths(store),\n    fallback: false\n  };\n};\nexport const getStaticProps = async ({\n  params\n}) => {\n  const {\n    doctype: basepath\n  } = params;\n  const page = getDocHomePage(store, basepath);\n  const {\n    type = null,\n    docId = null,\n    storyId = null\n  } = page || {};\n  return {\n    props: {\n      docId,\n      storyId,\n      type\n    }\n  };\n};\nexport default DocHomeTemplate;","map":{"version":3,"sources":["/Users/atanasster/component-controls/examples/starter/pages/[doctype].tsx"],"names":["React","defDocType","DocumentHomePage","Layout","store","getHomePagesPaths","getDocHomePage","DocHomeTemplate","type","docId","storyId","getStaticPaths","paths","fallback","getStaticProps","params","doctype","basepath","page","props"],"mappings":";;AAAA,OAAOA,KAAP,MAA0B,OAA1B;AAEA,SAAkBC,UAAlB,QAAoC,0BAApC;AACA,SAASC,gBAAT,QAAiC,yBAAjC;AACA,SACEC,MADF,EAEEC,KAFF,EAGEC,iBAHF,EAIEC,cAJF,QAKO,mCALP;;AAaA,MAAMC,eAAkC,GAAG,CAAC;AAC1CC,EAAAA,IAAI,GAAGP,UADmC;AAE1CQ,EAAAA,KAF0C;AAG1CC,EAAAA;AAH0C,CAAD,KAIrC;AACJ,SACE,MAAC,MAAD;AAAQ,IAAA,KAAK,EAAED,KAAf;AAAsB,IAAA,OAAO,EAAEC,OAA/B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACE,MAAC,gBAAD;AAAkB,IAAA,IAAI,EAAEF,IAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IADF,CADF;AAKD,CAVD;;AAYA,OAAO,MAAMG,cAA8B,GAAG,YAAY;AACxD,SAAO;AAAEC,IAAAA,KAAK,EAAEP,iBAAiB,CAACD,KAAD,CAA1B;AAAmCS,IAAAA,QAAQ,EAAE;AAA7C,GAAP;AACD,CAFM;AAIP,OAAO,MAAMC,cAA8B,GAAG,OAAO;AAAEC,EAAAA;AAAF,CAAP,KAAsB;AAClE,QAAM;AAAEC,IAAAA,OAAO,EAAEC;AAAX,MAAwBF,MAA9B;AACA,QAAMG,IAAI,GAAGZ,cAAc,CAACF,KAAD,EAAQa,QAAR,CAA3B;AACA,QAAM;AAAET,IAAAA,IAAI,GAAG,IAAT;AAAeC,IAAAA,KAAK,GAAG,IAAvB;AAA6BC,IAAAA,OAAO,GAAG;AAAvC,MAAgDQ,IAAI,IAAI,EAA9D;AACA,SAAO;AAAEC,IAAAA,KAAK,EAAE;AAAEV,MAAAA,KAAF;AAASC,MAAAA,OAAT;AAAkBF,MAAAA;AAAlB;AAAT,GAAP;AACD,CALM;AAOP,eAAeD,eAAf","sourcesContent":["import React, { FC } from 'react';\nimport { GetStaticProps, GetStaticPaths } from 'next';\nimport { DocType, defDocType } from '@component-controls/core';\nimport { DocumentHomePage } from '@component-controls/app';\nimport {\n  Layout,\n  store,\n  getHomePagesPaths,\n  getDocHomePage,\n} from '@component-controls/nextjs-plugin';\n\ninterface PageListProps {\n  type: DocType;\n  docId?: string;\n  storyId?: string;\n}\n\nconst DocHomeTemplate: FC<PageListProps> = ({\n  type = defDocType,\n  docId,\n  storyId,\n}) => {\n  return (\n    <Layout docId={docId} storyId={storyId}>\n      <DocumentHomePage type={type} />\n    </Layout>\n  );\n};\n\nexport const getStaticPaths: GetStaticPaths = async () => {\n  return { paths: getHomePagesPaths(store), fallback: false };\n};\n\nexport const getStaticProps: GetStaticProps = async ({ params }) => {\n  const { doctype: basepath } = params as { doctype: string };\n  const page = getDocHomePage(store, basepath);\n  const { type = null, docId = null, storyId = null } = page || {};\n  return { props: { docId, storyId, type } };\n};\n\nexport default DocHomeTemplate;\n"]},"metadata":{},"sourceType":"module"}