import {
  render,
  Renderer,
  getRendererByName,
  getRenderers,
  registerRenderer,
  unRegisterRenderer,
  resolveRenderer,
  filterSchema,
  addSchemaFilter,
  clearStoresCache,
  updateEnv
} from './factory';
import {wrapFetcher, buildApi, defaultFetcher} from './utils/api';
import {
  filter,
  registerTplEnginer,
  evalExpression,
  evalJS,
  setCustomEvalJs,
  setCustomEvalExpression
} from './utils/tpl';
import * as utils from './utils/helper';
import {resizeSensor} from './utils/resize-sensor';
import {setIconVendor} from './renderers/Form/IconPickerIcons';
import {Icon, registerIcon} from './components/icons';
import {RegisterStore} from './store';
import {
  setDefaultLocale,
  getDefaultLocale,
  makeTranslator,
  register as registerLocale
} from './locale';

import './locale/zh-CN';

import animation from './utils/Animation';

export * from './Schema';

// 注册渲染器
import './renderers/Action';
import './renderers/Alert';
import './renderers/App';
import './renderers/Remark';
import './renderers/Form/ButtonToolbar';
import './renderers/DropDownButton';
import './renderers/Color';
import './renderers/CRUD';
import './renderers/Record';
import './renderers/Pagination';
import './renderers/Dialog';
import './renderers/Divider';
import './renderers/Each';
import './renderers/Date';
import './renderers/Flex';
import './renderers/Form/index';
import './renderers/Form/wrapControl';
import './renderers/Form/Control';
import './renderers/Form/Hidden';
import './renderers/Form/InputText';
import './renderers/Form/InputTag';
import './renderers/Form/InputNumber';
import './renderers/Form/Textarea';
import './renderers/Form/Checkboxes';
import './renderers/Form/Checkbox';
import './renderers/Form/Switch';
import './renderers/Form/Radios';
import './renderers/Form/ListSelect';
import './renderers/Form/Select';
import './renderers/Form/Static';
import './renderers/Form/InputImage';
import './renderers/Form/InputFile';
import './renderers/Form/InputDate';
import './renderers/Form/InputDateRange';
import './renderers/Form/UUID';
import './renderers/Form/Combo';
import './renderers/Form/InputSubForm';
import './renderers/Form/InputRichText';
import './renderers/Form/inputMd';
import './renderers/Form/InputColor';
import './renderers/Form/Group';
import './renderers/Form/FieldSet';
import './renderers/Form/InputTree';
import './renderers/Form/TabsTransfer';
import './renderers/Form/TabsTransferPicker';
import './renderers/Form//TransferPicker';
import './renderers/Form//TreeSelect';
import './renderers/HBox';
import './renderers/VBox';
import './renderers/Image';
import './renderers/Images';
import './renderers/Operation';
import './renderers/Page';
import './renderers/PaginationWrapper';
import './renderers/Panel';
import './renderers/Plain';
import './renderers/Spinner';
import './renderers/Table/index';
import './renderers/Tabs';
import './renderers/Tpl';
import './renderers/Mapping';
import './renderers/Status';
import './renderers/Link';
import './renderers/Container';
import './renderers/SearchBox';
import './renderers/Service';
import './renderers/Drawer';
import './renderers/Wrapper';
import './renderers/IFrame';
import './renderers/Icon';
import './renderers/Markdown';
import './renderers/TableView';
import './renderers/Json';
import './renderers/Grid';
import './renderers/Nav';



import Scoped, {ScopedContext} from './Scoped';

import {FormItem, FormItemWrap, registerFormItem} from './renderers/Form/Item';


// 兼容旧版本用法
import './compat';

import './themes/amis';
import './themes/pandora';
import './themes/blue';
import './themes/gray';
import './themes/green';
import './themes/classics';
import './themes/chinaRed';
import {
  registerFilter,
  filterDate,
  relativeValueRe,
  resolveVariable,
  resolveVariableAndFilter,
  tokenize
} from './utils/tpl-builtin';
import {
  addRule,
  str2rules,
  validate,
  validateObject
} from './utils/validations';
import {normalizeOptions} from './components/Select';
import {OptionsControl, registerOptionsControl} from './renderers/Form/Options';

import {
  classnames,
  getClassPrefix,
  setDefaultTheme,
  theme,
  getTheme
} from './theme';
const classPrefix = getClassPrefix();

export * from './components/index';
export * from './renderers/Table/AdvancedFilter';
export { default as TableRowInfo } from './renderers/Table/TableRowInfo'

export {
  render,
  clearStoresCache,
  updateEnv,
  Renderer as Renderer,
  RegisterStore,
  FormItem,
  FormItemWrap,
  OptionsControl,
  wrapFetcher,
  buildApi,
  defaultFetcher,
  filter,
  // 其他功能类方法
  utils,
  tokenize,
  resizeSensor,
  registerFilter,
  registerTplEnginer,
  evalExpression,
  evalJS,
  setCustomEvalJs,
  setCustomEvalExpression,
  addRule,
  str2rules,
  normalizeOptions,
  getRendererByName,
  registerRenderer,
  unRegisterRenderer,
  getRenderers,
  registerFormItem,
  registerOptionsControl,
  resolveRenderer,
  filterSchema,
  filterDate,
  relativeValueRe,
  resolveVariable,
  resolveVariableAndFilter,
  setIconVendor,
  Icon,
  registerIcon,
  Scoped,
  ScopedContext,
  validate,
  validateObject,
  setDefaultTheme,
  theme,
  getTheme,
  classPrefix,
  getClassPrefix,
  classnames,
  // 多语言相关
  getDefaultLocale,
  setDefaultLocale,
  registerLocale,
  makeTranslator,
  animation
};
