import React from 'react';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/lib/locale/zh_CN';
import { createPlant, usePlantContext, Plant } from '@sensoro/plant';
import {
  fetchList,
  fetchCreate,
  fetchUpdate,
  fetchDetail,
  fetchRemove,
} from '../services/event-type';

export const plant = createPlant();

const model = {
  fetch: fetchList,
  update: fetchUpdate,
  detail: fetchDetail,
  create: fetchCreate,
  remove: fetchRemove,
};

const EventTypeData: React.FC = props => {
  const { children } = props;

  return (
    <Plant model={model} plant={plant}>
      {children}
    </Plant>
  );
};
export default EventTypeData;
