import * as React from "react";
import * as ReactDOM from "react-dom";
import ReadmePane from "./pages/readme-pane/readme-pane";
import PageList from "./pages/page-list/page-list";
import lscWindowConfig from "./utils/lscConfig";

const { route, isLibraryComponent } = lscWindowConfig;

ReactDOM.render(
  <>
    {isLibraryComponent && /^(docs\/)?index$/.test(route) ? (
      <PageList />
    ) : (
      <ReadmePane />
    )}
  </>,
  document.querySelector("#lsc-comp-root")
);
