import { startCase } from "lodash";
import pluralize from "pluralize";
import React, { useEffect, useState } from "react";
import { compose } from "recompose";
import { DataTable, DialogFooter, withSelectedEntities, withSelectTableRecords } from "teselagen-react-components";
import { hideDialog } from "./GlobalDialogUtils";
import { typeField } from "./helperComponents/PropertiesDialog/typeField";
import { FileUploadField, InfoHelper, showConfirmationDialog, wrapDialog } from "teselagen-react-components";
import { showDialog } from "./GlobalDialogUtils";
import withEditorProps from "./withEditorProps";
import { Colors, Tab, Tabs } from "@blueprintjs/core";
import { reduxForm, SubmissionError } from "redux-form";
import { getFeatureToColorMap, getFeatureTypes, convertApELikeRegexToRegex, autoAnnotate, tidyUpAnnotation } from "@teselagen/sequence-utils";
import shortid from "shortid";
window.addOnGlobals = {
  tidyUpAnnotation: tidyUpAnnotation,
  wrapDialog: wrapDialog,
  withEditorProps: withEditorProps,
  reduxForm: reduxForm,
  shortid: shortid,
  FileUploadField: FileUploadField,
  Colors: Colors,
  Tab: Tab,
  Tabs: Tabs,
  convertApELikeRegexToRegex: convertApELikeRegexToRegex,
  autoAnnotate: autoAnnotate,
  SubmissionError: SubmissionError,
  getFeatureToColorMap: getFeatureToColorMap,
  getFeatureTypes: getFeatureTypes,
  InfoHelper: InfoHelper,
  showConfirmationDialog: showConfirmationDialog,
  showDialog: showDialog,
  DialogFooter: DialogFooter,
  useState: useState,
  startCase: startCase,
  compose: compose,
  hideDialog: hideDialog,
  typeField: typeField,
  pluralize: pluralize,
  React: React,
  useEffect: useEffect,
  DataTable: DataTable,
  withSelectedEntities: withSelectedEntities,
  withSelectTableRecords: withSelectTableRecords
};