import React from "react";
import { styled } from "@material-ui/core/styles";
import APIKeyEntry from "./api-key-entry.js";
import PaperContainer from "../PaperContainer";
import LabelHelpDialogContent from "./label-help-dialog-content";
import { useAppConfig } from "../AppConfig";
export { LabelHelpProvider, LabelHelpContext } from "./LabelHelpProvider.js";
export { useLabelHelp } from "./use-label-help";
var Container = styled("div")({
  display: "flex",
  flexDirection: "column",
  alignItems: "center"
});
export var LabelHelpView = function LabelHelpView() {
  var _useAppConfig = useAppConfig(),
      fromConfig = _useAppConfig.fromConfig;

  var hasAPIKey = Boolean(fromConfig("labelhelp.apikey"));
  return /*#__PURE__*/React.createElement(Container, null, !hasAPIKey ? /*#__PURE__*/React.createElement(APIKeyEntry, {
    key: "apikeyentry"
  }) : /*#__PURE__*/React.createElement(PaperContainer, {
    key: "dialogcontent",
    style: {
      marginTop: 48,
      width: "100%",
      maxWidth: 800
    }
  }, /*#__PURE__*/React.createElement(LabelHelpDialogContent, null)));
};
export default LabelHelpView;