import { _ as _extends } from './extends.js';
import { mchcModal__, safe_navigate, IdNOButton, QuickDocButton, BF_Wrap2, MyBaseList } from '@lm_fe/pages';
import React__default, { useState, useRef, useEffect } from 'react';
import 'antd/es/popconfirm/style';
import _Popconfirm from 'antd/es/popconfirm';
import 'antd/es/button/style';
import _Button from 'antd/es/button';
import 'antd/es/space/style';
import _Space from 'antd/es/space';
import 'antd/es/form/style';
import _Form from 'antd/es/form';
import _get from 'lodash/get';
import { useMyEffectSafe } from '@lm_fe/components';
import { mchcEvent, mchcDriver } from '@lm_fe/env';
import { request, sleep } from '@lm_fe/utils';
import 'antd/es/checkbox/style';
import _Checkbox from 'antd/es/checkbox';
import _size from 'lodash/size';
import _remove from 'lodash/remove';
import _map from 'lodash/map';
import _includes from 'lodash/includes';
import _findIndex from 'lodash/findIndex';
import _cloneDeep from 'lodash/cloneDeep';
import { s as styleInject, f as __rest, b as __awaiter, c as __generator, d as __assign } from './index.js';
import { ArrowLeftOutlined, ArrowRightOutlined, CloseOutlined, PrinterOutlined } from '@ant-design/icons';
import classnames from 'classnames';
import { FetusCanvasNICHD, FetusCanvas, BmiCanvas, Pregnogram, PDFPreview_View } from '@lm_fe/components_m';
import 'antd/es/tabs/style';
import 'antd/es/tabs';
import 'lodash/orderBy';
import 'antd/es/collapse/style';
import 'antd/es/collapse';
import 'antd/es/badge/style';
import 'antd/es/badge';
import 'lodash/assign';
import '@lm_fe/service';
var _a;
var previewEnum;
(function (previewEnum) {
  previewEnum[previewEnum["singleView"] = 0] = "singleView";
  previewEnum[previewEnum["fullView"] = 1] = "fullView";
})(previewEnum || (previewEnum = {}));
var prenatalEnum;
(function (prenatalEnum) {
  prenatalEnum[prenatalEnum["firstInSpection"] = 0] = "firstInSpection";
  prenatalEnum[prenatalEnum["repetitionSpecton"] = 1] = "repetitionSpecton";
  prenatalEnum[prenatalEnum["growthCurve"] = 2] = "growthCurve";
  prenatalEnum[prenatalEnum["BMICurve"] = 3] = "BMICurve";
  prenatalEnum[prenatalEnum["fundalImage"] = 4] = "fundalImage";
  prenatalEnum[prenatalEnum["glucoseSupervise"] = 5] = "glucoseSupervise";
  prenatalEnum[prenatalEnum["pressureSupervise"] = 6] = "pressureSupervise";
  prenatalEnum[prenatalEnum["fetalSupervise"] = 7] = "fetalSupervise";
})(prenatalEnum || (prenatalEnum = {}));
var PRENATALLIST = [{
  type: prenatalEnum.firstInSpection,
  title: '首检病历'
}, {
  type: prenatalEnum.repetitionSpecton,
  title: '复诊记录'
}, {
  type: prenatalEnum.growthCurve,
  title: '胎儿生长曲线'
}, {
  type: prenatalEnum.BMICurve,
  title: 'BMI孕期管理曲线'
}, {
  type: prenatalEnum.fundalImage,
  title: '宫高腹围图'
}, {
  type: prenatalEnum.glucoseSupervise,
  title: '血糖检测'
}, {
  type: prenatalEnum.pressureSupervise,
  title: '血压监测'
}, {
  type: prenatalEnum.fetalSupervise,
  title: '胎动检测'
}];
var prenatalToResource = (_a = {}, _a[prenatalEnum.firstInSpection] = 'prenatalVisit', _a[prenatalEnum.repetitionSpecton] = 'prenatalRVisit', _a[prenatalEnum.growthCurve] = 'Image1', _a[prenatalEnum.BMICurve] = 'Image2', _a[prenatalEnum.fundalImage] = 'Image3', _a[prenatalEnum.glucoseSupervise] = 'BloodGlucoseInHome', _a[prenatalEnum.pressureSupervise] = 'BloodPressureInHome', _a[prenatalEnum.fetalSupervise] = 'FetalMovementInHome', _a);
var printapi = {
  single: 'api/pdf-preview',
  multipage: '/api/pdf-preview-document'
};
var css_248z$1 = ".prenatal-modal-container {\n  width: 100%;\n  height: 100%;\n  position: fixed;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  z-index: 1000;\n  background: rgba(0, 0, 0, 0.5);\n  display: flex;\n  flex-direction: column;\n}\n.prenatal-modal-container .prenatal-modal-container_mian {\n  flex: 1;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  position: relative;\n}\n.prenatal-modal-container .prenatal-modal-container_mian .mian-icon {\n  position: absolute;\n  top: 50%;\n  transform: translateY(-50%);\n  font-size: 50px;\n  color: #fff;\n  cursor: pointer;\n}\n.prenatal-modal-container .prenatal-modal-container_mian .mian-back {\n  left: 150px;\n}\n.prenatal-modal-container .prenatal-modal-container_mian .mian-last {\n  right: 150px;\n}\n.prenatal-modal-container .prenatal-modal-container_mian .icon-disabled {\n  display: none;\n}\n.prenatal-modal-container .prenatal-modal-container_mian .prenatal-modal-container_mian-content {\n  width: 1000px;\n  height: 700px;\n  display: flex;\n  flex-direction: column;\n  background-color: #fff;\n}\n.prenatal-modal-container .prenatal-modal-container_mian .prenatal-modal-container_mian-content .mian-content-footer {\n  width: 100%;\n  height: 50px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n.prenatal-modal-container .prenatal-modal-container_mian .prenatal-modal-container_mian-content .mian-content-details {\n  flex: 1;\n  width: 100%;\n  padding-left: 20px;\n  padding-right: 20px;\n}\n.prenatal-modal-container .prenatal-modal-container_mian .prenatal-modal-container_mian-content .mian-content-details .details_show {\n  background: #fff;\n  height: 100%;\n  position: relative;\n}\n.prenatal-modal-container .prenatal-modal-container_mian .prenatal-modal-container_mian-content .mian-content-details .details_show .spin {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  transform: translate(-50%, -50%);\n}\n.prenatal-modal-container .prenatal-modal-container_mian .prenatal-modal-container_mian-content .mian-content-details .details_show .pdf-container {\n  overflow-x: hidden;\n  width: calc(100% - 2px);\n  height: 550px;\n}\n.prenatal-modal-container .prenatal-modal-container_mian .prenatal-modal-container_mian-content .mian-content-details .details_show .bmi-wrapper,\n.prenatal-modal-container .prenatal-modal-container_mian .prenatal-modal-container_mian-content .mian-content-details .details_show .fetus-wrapper,\n.prenatal-modal-container .prenatal-modal-container_mian .prenatal-modal-container_mian-content .mian-content-details .details_show .pregnogram-wrapper {\n  width: 100%;\n  height: 550px;\n  overflow-y: auto;\n}\n.prenatal-modal-container .prenatal-modal-container_bottom {\n  width: 100%;\n  height: 160px;\n  min-height: 160px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n.prenatal-modal-container .prenatal-modal-container_bottom .bottom_item {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 140px;\n  height: 140px;\n  border-radius: 10px;\n  background: #fff;\n  position: relative;\n  margin-right: 20px;\n  font-size: 16px;\n  cursor: pointer;\n}\n.prenatal-modal-container .prenatal-modal-container_bottom .bottom_item .checkbox-custom {\n  position: absolute;\n  top: 10px;\n  right: 10px;\n  z-index: 1002;\n}\n.prenatal-modal-container .prenatal-modal-container_bottom .bottom_item .bottom_item-mask {\n  width: 100%;\n  height: 100%;\n  position: absolute;\n  top: 0;\n  z-index: 1001;\n  background: rgba(0, 0, 0, 0.3);\n}\n";
styleInject(css_248z$1);
function PrenatalModal(_a) {
  var props = __rest(_a, []);
  var _b = useState([]),
    selectPrenatal = _b[0],
    setSelectPrenatal = _b[1];
  var _c = useState(previewEnum.singleView),
    preview = _c[0];
  _c[1];
  var _d = useState(prenatalEnum.firstInSpection),
    curentPreviw = _d[0],
    setCurentPreview = _d[1];
  var _e = useState({}),
    previewData = _e[0],
    setPreviewData = _e[1];
  var _f = useState(),
    allPreviewData = _f[0],
    setAllPreviewData = _f[1];
  var _g = useState(0),
    currentCount = _g[0],
    setCurrentCount = _g[1];
  var _h = useState(false);
  _h[0];
  var setLoading = _h[1];
  var _j = useState(0),
    canvasCount = _j[0],
    setCanvasCount = _j[1];
  var _k = useState(printapi.multipage),
    printUrl = _k[0];
  _k[1];
  var _l = useState(true),
    isPrint = _l[0],
    setIsPrint = _l[1];
  var fetusRef = useRef();
  var bmiRef = useRef();
  var pregnogramRef = useRef();
  useEffect(function () {
    getPreviewPDF(curentPreviw);
  }, [curentPreviw]);
  useEffect(function () {
    console.log('abababab');
    if (canvasCount != 0) {
      getAllPreviewData();
    }
  }, [canvasCount]);
  function getPreviewPDF(type) {
    return __awaiter(this, void 0, void 0, function () {
      var url, imageArr, requestData, pdfdata;
      var _a;
      return __generator(this, function (_b) {
        switch (_b.label) {
          case 0:
            url = _get(previewData, "".concat(type));
            if (url) {
              return [2, url];
            }
            imageArr = [prenatalEnum.growthCurve, prenatalEnum.BMICurve, prenatalEnum.fundalImage];
            if (_includes(imageArr, type)) {
              return [2];
            }
            requestData = {
              resource: prenatalToResource[type],
              template: '',
              version: '',
              note: '',
              id: _get(props, 'id')
            };
            setLoading(true);
            _b.label = 1;
          case 1:
            _b.trys.push([1, 3,, 4]);
            return [4, request.post('/api/pdf-preview', requestData)];
          case 2:
            pdfdata = _b.sent().data.pdfdata;
            setPreviewData(__assign(__assign({}, previewData), (_a = {}, _a[type] = pdfdata, _a)));
            setLoading(false);
            return [3, 4];
          case 3:
            _b.sent();
            setLoading(false);
            return [3, 4];
          case 4:
            return [2];
        }
      });
    });
  }
  function getAllPreviewData() {
    return __awaiter(this, void 0, void 0, function () {
      var fetusImgBase64, bmiImageBase64, pregnogramImgBase64, requestData, pdfdata;
      return __generator(this, function (_a) {
        switch (_a.label) {
          case 0:
            if (allPreviewData) return [2];
            fetusImgBase64 = _get(fetusRef.current, "imageRef.current");
            bmiImageBase64 = _get(bmiRef.current, "imageRef.current");
            pregnogramImgBase64 = _get(pregnogramRef.current, "imageRef.current");
            if (!(fetusImgBase64 && bmiImageBase64 && pregnogramImgBase64)) {
              return [2];
            }
            requestData = _map(prenatalToResource, function (item, key) {
              var obj = {
                template: '',
                resource: item,
                id: _get(props, 'id')
              };
              if (key == prenatalEnum.growthCurve) {
                obj['img'] = fetusImgBase64;
              }
              if (key == prenatalEnum.BMICurve) {
                obj['img'] = bmiImageBase64;
              }
              if (key == prenatalEnum.fundalImage) {
                obj['img'] = pregnogramImgBase64;
              }
              return obj;
            });
            _a.label = 1;
          case 1:
            _a.trys.push([1, 3,, 4]);
            setLoading(true);
            return [4, request.post('/api/pdf-preview-document', requestData)];
          case 2:
            pdfdata = _a.sent().data.pdfdata;
            setLoading(false);
            setAllPreviewData(pdfdata);
            return [3, 4];
          case 3:
            _a.sent();
            setLoading(false);
            return [3, 4];
          case 4:
            return [2];
        }
      });
    });
  }
  function handleCheckPrenatal(type) {
    return function (e) {
      var check = e.target.checked;
      e.stopPropagation();
      var selectPrenatal_ = _cloneDeep(selectPrenatal);
      if (!check) {
        _remove(selectPrenatal_, function (item) {
          return item == type;
        });
        setIsPrint(false);
      } else {
        selectPrenatal_.push(type);
      }
      setSelectPrenatal(selectPrenatal_);
      if (selectPrenatal_.length > 0) {
        setIsPrint(false);
      } else {
        setIsPrint(true);
      }
    };
  }
  function handleIcon(type) {
    var _this = this;
    return function () {
      return __awaiter(_this, void 0, void 0, function () {
        var newCount, newCurrentPreview;
        return __generator(this, function (_a) {
          switch (_a.label) {
            case 0:
              newCount = currentCount;
              if (type == 'last') {
                newCount--;
              } else {
                newCount++;
              }
              newCurrentPreview = _get(PRENATALLIST, "[".concat(newCount, "].type"));
              setLoading(true);
              return [4, sleep(0.3)];
            case 1:
              _a.sent();
              setCurentPreview(newCurrentPreview);
              setCurrentCount(newCount);
              setLoading(false);
              return [2];
          }
        });
      });
    };
  }
  function handleClose() {
    props.onClose && props.onClose();
  }
  function handleClickItem(type) {
    var _this = this;
    return function () {
      return __awaiter(_this, void 0, void 0, function () {
        var index;
        return __generator(this, function (_a) {
          switch (_a.label) {
            case 0:
              index = _findIndex(PRENATALLIST, function (item) {
                return item.type == type;
              });
              setLoading(true);
              return [4, sleep(0.3)];
            case 1:
              _a.sent();
              setCurrentCount(index);
              setCurentPreview(type);
              setLoading(false);
              return [2];
          }
        });
      });
    };
  }
  function handlePrint() {
    var fetusImgBase64 = _get(fetusRef.current, "imageRef.current");
    var bmiImageBase64 = _get(bmiRef.current, "imageRef.current");
    var pregnogramImgBase64 = _get(pregnogramRef.current, "imageRef.current");
    var requestData = _map(selectPrenatal, function (item, index) {
      var obj = {
        template: '',
        resource: _get(prenatalToResource, "".concat(item)),
        id: _get(props, 'id')
      };
      if (item == prenatalEnum.growthCurve) {
        obj['img'] = fetusImgBase64;
      }
      if (item == prenatalEnum.BMICurve) {
        obj['img'] = bmiImageBase64;
      }
      if (item == prenatalEnum.fundalImage) {
        obj['img'] = pregnogramImgBase64;
      }
      return obj;
    });
    var printRequestData;
    if (_size(requestData) == 0) {
      var obj = {
        template: '',
        resource: _get(prenatalToResource, "".concat(curentPreviw)),
        id: _get(props, 'id')
      };
      if (curentPreviw == prenatalEnum.growthCurve) {
        obj['img'] = fetusImgBase64;
      }
      if (curentPreviw == prenatalEnum.BMICurve) {
        obj['img'] = bmiImageBase64;
      }
      if (curentPreviw == prenatalEnum.fundalImage) {
        obj['img'] = pregnogramImgBase64;
      }
      printRequestData = [obj];
    } else {
      printRequestData = requestData;
    }
    mchcModal__.open('print_modal', {
      modal_data: {
        requestConfig: {
          url: printUrl,
          data: printRequestData
        }
      }
    });
  }
  function canvasOnLoad() {
    var newconut = canvasCount + 1;
    setCanvasCount(newconut);
  }
  function showcanvas() {
    if (preview == previewEnum.fullView) {
      return true;
    }
    if (_size(selectPrenatal) > 0) {
      return true;
    }
  }
  function renderPrenatalItem() {
    return _map(PRENATALLIST, function (item) {
      return /*#__PURE__*/React__default.createElement("div", {
        className: "bottom_item",
        onClick: handleClickItem(_get(item, 'type'))
      }, /*#__PURE__*/React__default.createElement("span", null, _get(item, 'title')), /*#__PURE__*/React__default.createElement(_Checkbox, {
        className: "checkbox-custom",
        checked: _includes(selectPrenatal, _get(item, 'type')),
        onClick: handleCheckPrenatal(_get(item, 'type'))
      }), curentPreviw != _get(item, "type") && /*#__PURE__*/React__default.createElement("div", {
        className: "bottom_item-mask"
      }));
    });
  }
  function detailsShow() {
    if (preview == previewEnum.singleView) {
      if (curentPreviw == prenatalEnum.growthCurve) {
        var system = props.system;
        var Component = _get(system, 'config.curveVersion') === 'nichd' ? /*#__PURE__*/React__default.createElement(FetusCanvasNICHD, _extends({}, props, {
          hidePrintBtn: true
        })) : /*#__PURE__*/React__default.createElement(FetusCanvas, _extends({}, props, {
          hidePrintBtn: true
        }));
        return Component;
      } else if (curentPreviw == prenatalEnum.BMICurve) {
        return /*#__PURE__*/React__default.createElement(BmiCanvas, _extends({}, props, {
          hidePrintBtn: true
        }));
      } else if (curentPreviw == prenatalEnum.fundalImage) {
        return /*#__PURE__*/React__default.createElement(Pregnogram, _extends({}, props, {
          hidePrintBtn: true
        }));
      }
      return /*#__PURE__*/React__default.createElement(PDFPreview_View, {
        data: _get(previewData, "".concat(curentPreviw))
      });
    } else {
      return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(PDFPreview_View, {
        data: allPreviewData
      }));
    }
  }
  return /*#__PURE__*/React__default.createElement("div", {
    className: "prenatal-modal-container"
  }, /*#__PURE__*/React__default.createElement("div", {
    className: "prenatal-modal-container_mian"
  }, /*#__PURE__*/React__default.createElement(ArrowLeftOutlined, {
    type: "icon-backx",
    className: classnames('mian-icon mian-back', {
      'icon-disabled': currentCount == 0
    }),
    onClick: handleIcon('last')
  }), /*#__PURE__*/React__default.createElement(ArrowRightOutlined, {
    type: "icon-backx",
    className: classnames('mian-icon mian-last', {
      'icon-disabled': currentCount == 7
    }),
    onClick: handleIcon('next')
  }), /*#__PURE__*/React__default.createElement("div", {
    className: "prenatal-modal-container_mian-content"
  }, /*#__PURE__*/React__default.createElement("div", {
    style: {
      height: 40,
      padding: '12px 24px 0',
      display: 'flex',
      alignItems: 'center',
      justifyContent: 'space-between'
    }
  }, /*#__PURE__*/React__default.createElement("div", null), /*#__PURE__*/React__default.createElement(CloseOutlined, {
    style: {
      fontSize: 22
    },
    onClick: handleClose
  })), /*#__PURE__*/React__default.createElement("div", {
    className: "mian-content-details",
    style: {
      overflowY: 'scroll'
    }
  }, /*#__PURE__*/React__default.createElement("div", {
    className: "details_show"
  }, detailsShow())), /*#__PURE__*/React__default.createElement("div", {
    className: "mian-content-footer"
  }, /*#__PURE__*/React__default.createElement(_Button, {
    type: "primary",
    disabled: isPrint,
    onClick: handlePrint,
    icon: /*#__PURE__*/React__default.createElement(PrinterOutlined, {
      type: "icon-print"
    })
  }, "\u6253\u5370")))), /*#__PURE__*/React__default.createElement("div", {
    className: "prenatal-modal-container_bottom"
  }, renderPrenatalItem()), showcanvas() && /*#__PURE__*/React__default.createElement("div", {
    style: {
      display: 'none'
    }
  }, _get(props.system, 'config.curveVersion') === 'nichd' ? /*#__PURE__*/React__default.createElement(FetusCanvasNICHD, _extends({
    ref: fetusRef
  }, props, {
    hidePrintBtn: true,
    onLoad: canvasOnLoad
  })) : /*#__PURE__*/React__default.createElement(FetusCanvas, _extends({
    ref: fetusRef
  }, props, {
    hidePrintBtn: true,
    onLoad: canvasOnLoad
  })), /*#__PURE__*/React__default.createElement(BmiCanvas, _extends({
    ref: bmiRef
  }, props, {
    hidePrintBtn: true,
    onLoad: canvasOnLoad
  })), /*#__PURE__*/React__default.createElement(Pregnogram, _extends({
    ref: pregnogramRef
  }, props, {
    hidePrintBtn: true,
    onLoad: canvasOnLoad
  }))));
}
function useTableConfig(props) {
  props.is_modal;
  var form = _Form.useForm()[0];
  useEffect(function () {
    return mchcEvent.on_rm('my_form', function (e) {
      var _a;
      if (e.type === 'onSearch' && e.name === "outpatientNO") {
        var pregnancy = (_a = e.value) === null || _a === void 0 ? void 0 : _a.data;
        if (!pregnancy) return;
        var isUn = pregnancy.recordstate === '0';
        isUn ? handleCheck(pregnancy) : handleEdit(pregnancy);
      }
    });
  }, []);
  useEffect(function () {}, []);
  useMyEffectSafe(props)(function () {
    return mchcDriver.on_rm('data', function (e) {
      if (e.type === 'ReadCard') {
        var res = e.data;
        form.setFieldsValue({
          idNO: res.idNO,
          name: res.name
        });
        form.submit();
      }
    });
  }, []);
  function handleCheck(rowData) {
    var id = rowData.id;
    safe_navigate("/prenatal-visit/pregnancy/check?id=".concat(id), props, {
      id: id
    });
  }
  function handleView(rowData) {
    var id = rowData.id;
    safe_navigate("/prenatal-visit/pregnancy/doctor-end?id=".concat(id), props, {
      id: id
    });
  }
  function handleEdit(rowData) {
    var id = rowData.id;
    safe_navigate("/prenatal-visit/pregnancy/nurse-end?id=".concat(id), props, {
      id: id
    });
  }
  function handlePrenatal(rowData) {
    mchcModal__.open('test', {
      modal_data: {
        content: /*#__PURE__*/React__default.createElement(PrenatalModal, _extends({
          selectedRowData: rowData
        }, props, {
          onClose: function onClose() {
            return mchcModal__.pop();
          },
          id: _get(rowData, "id")
        }))
      }
    });
  }
  function handleDoubleClickRow(record) {
    var id = record.id,
      recordstate = record.recordstate;
    if (recordstate === '1' || recordstate === '6') {
      safe_navigate("/prenatal-visit/pregnancy/nurse-end?id=".concat(id), props, {
        id: id
      });
    }
    if (recordstate === '0') {
      safe_navigate("/prenatal-visit/pregnancy/check?id=".concat(id), props, {
        id: id
      });
    }
  }
  function onAdd() {
    safe_navigate('/prenatal-visit/pregnancy/add', props);
  }
  var config = {
    effect_ctx: props,
    name: '/pregnancies',
    baseTitle: '孕册',
    searchForm: form,
    handleDoubleClickRow: handleDoubleClickRow,
    RenderSearchBtns: function RenderSearchBtns(_a) {
      _a.handleSearch;
      _a.getSearchParams;
      return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
    },
    RenderBtns: function RenderBtns(_a) {
      return /*#__PURE__*/React__default.createElement(_Space, null, /*#__PURE__*/React__default.createElement(IdNOButton, null), /*#__PURE__*/React__default.createElement(QuickDocButton, {
        page_type: "\u975E\u5355\u9875"
      }));
    },
    onAdd: onAdd,
    RenderAction: function RenderAction(_a) {
      var rowData = _a.rowData,
        handleDelete = _a.handleDelete;
      return /*#__PURE__*/React__default.createElement(_Space, null, !!rowData.recordstate && rowData.recordstate !== '0' ? /*#__PURE__*/React__default.createElement(_Button, {
        type: "link",
        size: "small",
        onClick: function onClick() {
          return handlePrenatal(rowData);
        }
      }, "\u4EA7\u68C0\u672C") : /*#__PURE__*/React__default.createElement(_Button, {
        title: "\u5BA1\u6838\u901A\u8FC7\u540E\u53EF\u67E5\u770B",
        type: "link",
        size: "small",
        disabled: true
      }, "\u4EA7\u68C0\u672C"), !!rowData.recordstate && rowData.recordstate !== '0' ? /*#__PURE__*/React__default.createElement(_Button, {
        type: "link",
        size: "small",
        onClick: function onClick() {
          return handleView(rowData);
        }
      }, "\u67E5\u770B") : /*#__PURE__*/React__default.createElement(_Popconfirm, {
        placement: "topRight",
        title: "\u5EFA\u6863\u4FE1\u606F\u5C1A\u672A\u5BA1\u6838\uFF0C\u662F\u5426\u7EE7\u7EED\u63A5\u8BCA?",
        onConfirm: function onConfirm() {
          return handleView(rowData);
        },
        okText: "\u786E\u5B9A",
        cancelText: "\u53D6\u6D88"
      }, /*#__PURE__*/React__default.createElement(_Button, {
        type: "link",
        size: "small"
      }, "\u67E5\u770B")), /*#__PURE__*/React__default.createElement(_Popconfirm, {
        placement: "topRight",
        title: "\u786E\u5B9A\u8981\u5220\u9664\u5417?",
        onConfirm: function onConfirm() {
          return handleDelete(rowData);
        },
        okText: "\u786E\u5B9A",
        cancelText: "\u53D6\u6D88"
      }, /*#__PURE__*/React__default.createElement(_Button, {
        type: "link",
        size: "small"
      }, "\u5220\u9664")));
    }
  };
  return [config];
}
var css_248z = ".egister_ {\n  border: 1px solid #ccc;\n  border-radius: 12px;\n  display: inline-block;\n  width: 70px;\n  height: 24.22px;\n  line-height: 22px;\n  cursor: pointer;\n}\n.egister_1 {\n  border-color: #828c99;\n  color: #828c99;\n  border: 1px solid #7f8c9a;\n}\n.egister_2 {\n  border-color: #21ac8d;\n  color: #21ac8d;\n}\n";
styleInject(css_248z);
function Pregnancy_list(props) {
  var conf = useTableConfig(props)[0];
  var conf_fn = function conf_fn() {
    return import('./pregnancy.list.config.js');
  };
  var _a = BF_Wrap2({
      default_conf: {
        title: '孕册管理-列表',
        tableColumns: conf_fn,
        searchConfig: function searchConfig() {
          return import('./pregnancy.list.config2.js');
        }
      }
    }, props),
    config = _a.config,
    Wrap = _a.Wrap;
  useEffect(function () {
    return function () {};
  }, []);
  return /*#__PURE__*/React__default.createElement(Wrap, null, /*#__PURE__*/React__default.createElement(MyBaseList, _extends({}, conf, {
    searchConfig: config === null || config === void 0 ? void 0 : config.searchConfig,
    tableColumns: __DEV__ ? conf_fn : config === null || config === void 0 ? void 0 : config.tableColumns
  })));
}
export { Pregnancy_list as default };
//# sourceMappingURL=prenatal-visit.pregnancy.list.js.map
