import { Col, Row } from 'antd';
import dayjs from 'dayjs';
import { useContext } from 'react';
import { VmTitle, VmWrapper } from "../../../_components";
import { BasicService } from "../../api";
import { CcCpContext } from "../../index";
import AllWork from "./AllWork";
import "./index.less";
import Info from "./Info";
import Rules from "./Rules";
import SyRecord from "./SyRecord";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var BaseInfo = function BaseInfo() {
  var _useContext = useContext(CcCpContext),
    id = _useContext.id,
    date = _useContext.date;
  var data = BasicService.useInfo({
    id: id
  });
  return /*#__PURE__*/_jsxs(Row, {
    gutter: [16, 16],
    style: {
      height: '100%'
    },
    children: [/*#__PURE__*/_jsx(Col, {
      flex: '400px',
      children: /*#__PURE__*/_jsx(VmWrapper, {
        title: "\u57FA\u672C\u4FE1\u606F",
        children: /*#__PURE__*/_jsxs("div", {
          children: [/*#__PURE__*/_jsx(Info, {
            data: data
          }), /*#__PURE__*/_jsx(VmTitle, {
            title: '收运规则'
          }), /*#__PURE__*/_jsx(Rules, {
            id: id
          })]
        })
      })
    }), /*#__PURE__*/_jsx(Col, {
      flex: '1',
      style: {
        minWidth: 0,
        height: '100%'
      },
      children: /*#__PURE__*/_jsxs("div", {
        className: 'vtx-cc-cp-info-right-wrap',
        children: [/*#__PURE__*/_jsx("div", {
          children: /*#__PURE__*/_jsx(AllWork, {})
        }), /*#__PURE__*/_jsx("div", {
          className: 'vtx-cc-cp-info-right-wrap-bottom',
          children: /*#__PURE__*/_jsx(VmWrapper, {
            title: '收运明细',
            children: /*#__PURE__*/_jsx(SyRecord, {
              startTime: dayjs(date).format('YYYY-MM-DD'),
              endTime: dayjs(date).format('YYYY-MM-DD'),
              pagination: false
            })
          })
        })]
      })
    })]
  });
};
export default BaseInfo;