import 'antd/es/button/style';
import _Button from 'antd/es/button';
import { _ as _extends } from './extends.js';
import { LoadingPlaceholder } from '@lm_fe/components_m';
import React__default, { useEffect } from 'react';
import { EditOutlined } from '@ant-design/icons';
import { MyBaseList } from '@lm_fe/pages';
import { SLocal_State } from '@lm_fe/service';
import { u as useConfigHook } from './utils.js';
import './index.js';
import '@lm_fe/env';
import 'antd/es/tabs/style';
import 'antd/es/tabs';
import 'lodash/size';
import 'lodash/get';
import '@lm_fe/utils';
import 'lodash/orderBy';
import 'lodash/map';
import '@lm_fe/components';
import 'antd/es/collapse/style';
import 'antd/es/collapse';
import 'antd/es/badge/style';
import 'antd/es/badge';
import 'lodash/assign';
function MyConfigTable(props) {
  useEffect(function () {
    return function () {};
  }, []);
  var _a = useConfigHook(props),
    config = _a[0],
    edit_config = _a[2],
    loading = _a[3];
  var isAdmin = SLocal_State.isAdmin;
  if (loading || !config) return /*#__PURE__*/React__default.createElement(LoadingPlaceholder, null);
  return /*#__PURE__*/React__default.createElement("div", {
    style: {
      position: 'relative',
      background: '#fff'
    }
  }, /*#__PURE__*/React__default.createElement(MyBaseList, _extends({
    baseTitle: config === null || config === void 0 ? void 0 : config.title
  }, props, {
    showExport: true,
    isJSONConfig: true,
    size: "small",
    modalFormConfig: {
      width: '80vw',
      modal_data: {
        targetLabelCol: 4
      }
    }
  }, config)), isAdmin ? /*#__PURE__*/React__default.createElement("div", {
    style: {
      position: 'absolute',
      top: 6,
      right: 6,
      cursor: 'help'
    }
  }, /*#__PURE__*/React__default.createElement(_Button, {
    size: "small",
    icon: /*#__PURE__*/React__default.createElement(EditOutlined, null),
    onClick: function onClick() {
      edit_config();
    }
  })) : null);
}
export { MyConfigTable as default };
//# sourceMappingURL=pages.config-table.list.js.map
