import {
  fmtMoneyYuan,
} from './data/pickup-receivable-list-data.js';
import {
  buildBatchPickupScheduleSummary,
  describePickupRule,
  buildCollectLinePreview,
  buildCollectSubmitPayload,
  buildCollectOrderTableRows,
  resolveCollectPlateLabel,
  PLATE_ACTUAL_DELIVERY_LABEL,
} from './pickup-receivable-bridge.js';

function displayText(value) {
  var text = value == null ? '' : String(value).trim();
  return text || '—';
}

function initLineQuantities(lines) {
  var map = {};
  (lines || []).forEach(function (line) {
    map[line.lineKey] = 0;
  });
  return map;
}

function formatBrandModelLabel(brand, model) {
  return [brand, model]
    .filter(function (part) {
      return part && String(part).trim() && part !== '-';
    })
    .join(' · ') || '—';
}

function DeliveryFieldIconLocation() {
  return React.createElement(
    'svg',
    {
      className: 'vpr-collect-delivery-field__icon',
      width: 16,
      height: 16,
      viewBox: '0 0 24 24',
      fill: 'none',
      stroke: 'currentColor',
      strokeWidth: 2,
      strokeLinecap: 'round',
      strokeLinejoin: 'round',
      'aria-hidden': true,
    },
    React.createElement('path', { d: 'M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z' }),
    React.createElement('circle', { cx: '12', cy: '10', r: '3' }),
  );
}

function DeliveryFieldIconCalendar() {
  return React.createElement(
    'svg',
    {
      className: 'vpr-collect-delivery-field__icon',
      width: 16,
      height: 16,
      viewBox: '0 0 24 24',
      fill: 'none',
      stroke: 'currentColor',
      strokeWidth: 2,
      strokeLinecap: 'round',
      strokeLinejoin: 'round',
      'aria-hidden': true,
    },
    React.createElement('rect', { x: '3', y: '4', width: '18', height: '18', rx: '2' }),
    React.createElement('line', { x1: '16', y1: '2', x2: '16', y2: '6' }),
    React.createElement('line', { x1: '8', y1: '2', x2: '8', y2: '6' }),
    React.createElement('line', { x1: '3', y1: '10', x2: '21', y2: '10' }),
  );
}

const Component = function () {
  var useState = React.useState;
  var useMemo = React.useMemo;
  var useEffect = React.useEffect;

  var antd = window.antd;
  var Card = antd.Card;
  var Button = antd.Button;
  var Input = antd.Input;
  var InputNumber = antd.InputNumber;
  var DatePicker = antd.DatePicker;
  var Modal = antd.Modal;
  var message = antd.message;
  var dayjs = window.dayjs;

  var handleCtx = typeof window !== 'undefined' ? window.__pickupHandleContext : null;
  var project = handleCtx || {};
  var orderLines = project.leaseOrderLines || [];
  var paymentCycleMonths = project.paymentCycleMonths || 1;

  var deliveryLocationState = useState(project.defaultDeliveryLocation || '');
  var deliveryLocation = deliveryLocationState[0];
  var setDeliveryLocation = deliveryLocationState[1];

  var deliveryDateState = useState(project.defaultPickupDate || '');
  var deliveryDate = deliveryDateState[0];
  var setDeliveryDate = deliveryDateState[1];

  var lineQuantitiesState = useState(function () {
    return initLineQuantities(orderLines);
  });
  var lineQuantities = lineQuantitiesState[0];
  var setLineQuantities = lineQuantitiesState[1];

  var dirtyState = useState(false);
  var dirty = dirtyState[0];
  var setDirty = dirtyState[1];

  var submitAttemptState = useState(false);
  var submitAttempted = submitAttemptState[0];
  var setSubmitAttempted = submitAttemptState[1];

  var submitConfirmState = useState(false);
  var submitConfirmVisible = submitConfirmState[0];
  var setSubmitConfirmVisible = submitConfirmState[1];

  useEffect(function () {
    setLineQuantities(initLineQuantities(orderLines));
  }, [project.contractCode]);

  var selectedCount = useMemo(function () {
    return (orderLines || []).reduce(function (sum, line) {
      var qty = Math.min(
        line.availableCount,
        Math.max(0, parseInt(lineQuantities[line.lineKey], 10) || 0),
      );
      return sum + qty;
    }, 0);
  }, [orderLines, lineQuantities]);

  var calcRows = useMemo(function () {
    var rows = [];
    (orderLines || []).forEach(function (line) {
      var qty = Math.min(
        line.availableCount,
        Math.max(0, parseInt(lineQuantities[line.lineKey], 10) || 0),
      );
      for (var i = 0; i < qty; i += 1) {
        rows.push({
          selected: true,
          receivableCompleted: false,
          monthRent: line.monthRent,
          serviceFeeTotal: line.serviceFeeTotal,
          deposit: line.deposit,
          receivableDeposit: line.deposit,
          receivableService: line.serviceFeeTotal,
        });
      }
    });
    return rows;
  }, [orderLines, lineQuantities]);

  var batchSummary = useMemo(function () {
    if (!deliveryDate || !calcRows.length) return null;
    return buildBatchPickupScheduleSummary(calcRows, deliveryDate, paymentCycleMonths);
  }, [calcRows, deliveryDate, paymentCycleMonths]);

  var amountBreakdown = useMemo(function () {
    if (!batchSummary) {
      return { rent: 0, deposit: 0, service: 0, total: 0 };
    }
    return {
      rent: (batchSummary.beforePickup.rent || 0) + (batchSummary.month25.rent || 0),
      deposit: batchSummary.beforePickup.deposit || 0,
      service: (batchSummary.beforePickup.service || 0) + (batchSummary.month25.service || 0),
      total: batchSummary.totalReceivable || 0,
    };
  }, [batchSummary]);

  var orderTableRows = useMemo(function () {
    return buildCollectOrderTableRows(orderLines);
  }, [orderLines]);

  var ruleText = useMemo(function () {
    return describePickupRule(batchSummary && batchSummary.rule);
  }, [batchSummary]);

  var formReady = Boolean(deliveryDate && String(deliveryLocation || '').trim() && selectedCount > 0);

  var submitHint = useMemo(function () {
    if (!deliveryDate) return '请先设置车辆交付时间';
    if (!String(deliveryLocation || '').trim()) return '请先填写车辆交付地点';
    if (!selectedCount) return '请至少选择 1 辆本次交车数量';
    return '';
  }, [deliveryDate, deliveryLocation, selectedCount]);

  function markDirty() {
    setDirty(true);
  }

  function handleBack() {
    if (dirty) {
      Modal.confirm({
        title: '确认离开',
        content: '当前办理信息尚未提交，确定返回列表吗？',
        okText: '返回列表',
        cancelText: '继续编辑',
        onOk: function () {
          if (window.__receivableBack) window.__receivableBack();
        },
      });
      return;
    }
    if (window.__receivableBack) window.__receivableBack();
  }

  function fillLineQuantity(lineKey, quantity) {
    setLineQuantities(function (prev) {
      var next = Object.assign({}, prev);
      next[lineKey] = quantity;
      return next;
    });
    markDirty();
  }

  function fillAllPending() {
    setLineQuantities(function () {
      var next = {};
      (orderLines || []).forEach(function (line) {
        next[line.lineKey] = line.availableCount;
      });
      return next;
    });
    markDirty();
  }

  function clearAllQuantities() {
    setLineQuantities(initLineQuantities(orderLines));
    markDirty();
  }

  function handleSubmit() {
    setSubmitAttempted(true);
    if (!deliveryDate) {
      message.warning('请设置车辆交付时间');
      return;
    }
    if (!String(deliveryLocation || '').trim()) {
      message.warning('请填写车辆交付（交还）地点');
      return;
    }
    if (!selectedCount) {
      message.warning('请至少选择 1 辆本次交车数量');
      return;
    }
    setSubmitConfirmVisible(true);
  }

  function confirmSubmit() {
    var payload = buildCollectSubmitPayload(project, {
      deliveryDate: deliveryDate,
      deliveryLocation: deliveryLocation,
      lineQuantities: lineQuantities,
    });
    if (window.__pickupHandleSubmit) window.__pickupHandleSubmit(payload);
    if (window.__pickupBuildSubmitCcMessage) {
      message.success(window.__pickupBuildSubmitCcMessage());
    } else {
      message.success('已提交办理并生成提车应收款单据');
    }
    setSubmitConfirmVisible(false);
    setDirty(false);
    if (window.__receivableBack) window.__receivableBack();
  }

  function renderContractStat(label, value, options) {
    var opts = options || {};
    var valueClass = 'vm-detail-stat-value';
    if (opts.mono) valueClass += ' mono tabular-nums';

    return React.createElement(
      'div',
      { className: 'vm-detail-stat', key: label },
      React.createElement(
        'div',
        { className: 'vm-detail-stat-main' },
        React.createElement('span', { className: 'vm-detail-stat-label' }, label),
        React.createElement(
          'span',
          { className: valueClass, title: displayText(value) },
          displayText(value),
        ),
      ),
    );
  }

  function renderCollectPlateCell(vehicle) {
    var label = resolveCollectPlateLabel(vehicle);
    var isPending = label === PLATE_ACTUAL_DELIVERY_LABEL;
    return React.createElement(
      'span',
      {
        className: 'vpr-pickup-subtable__plate-no tabular-nums'
          + (isPending ? ' vpr-pickup-subtable__plate-no--pending' : ''),
        title: label,
      },
      label,
    );
  }

  function renderCollectModelGroupCell(line) {
    var label = formatBrandModelLabel(line.brand, line.model);
    return React.createElement(
      'div',
      { className: 'vpr-collect-td--model', title: label },
      label,
    );
  }

  function renderKpiStat(label, value, highlight) {
    return React.createElement(
      'div',
      {
        className: 'vm-detail-stat vpr-collect-kpi-stat'
          + (highlight ? ' vpr-collect-kpi-stat--active' : ''),
        key: label,
      },
      React.createElement(
        'div',
        { className: 'vm-detail-stat-main' },
        React.createElement('span', { className: 'vm-detail-stat-label' }, label),
        React.createElement(
          'div',
          { className: 'vm-detail-stat-value vpr-collect-kpi-stat__value tabular-nums' },
          value,
        ),
      ),
    );
  }

  var businessMeta = [project.businessDept, project.businessPerson]
    .filter(function (part) {
      return part && String(part).trim();
    })
    .join(' · ');

  var contractStats = [
    renderContractStat('签约公司', project.signingCompany),
    renderContractStat('付款方式', project.paymentMethodLabel || project.paymentMethod),
    renderContractStat('付款周期', project.paymentCycleLabel || project.paymentCycle),
    renderContractStat('氢费支付方式', project.hydrogenPaymentMethodLabel || project.hydrogenPaymentMethod),
  ];
  if (project.hydrogenPrepayAmount != null) {
    contractStats.push(renderContractStat('预付款金额', fmtMoneyYuan(project.hydrogenPrepayAmount), { mono: true }));
  }

  return React.createElement(
    'div',
    { className: 'vm-page lc-page vpr-page vpr-collect-page' },
    React.createElement(
      'header',
      {
        className: 'vm-detail-topbar vpr-collect-topbar',
        'data-annotation-id': 'vpr-collect-topbar',
      },
      React.createElement(
        'button',
        {
          type: 'button',
          className: 'vm-btn vm-btn-back',
          onClick: handleBack,
        },
        '返回列表',
      ),
    ),
    React.createElement(
      'main',
      { className: 'vpr-collect-main' },
      React.createElement(
        'section',
        {
          className: 'vm-detail-card vpr-collect-contract-card',
          'data-annotation-id': 'vpr-collect-project',
        },
        React.createElement(
          'div',
          { className: 'vm-detail-hero vpr-collect-contract-hero' },
          React.createElement(
            'div',
            null,
            React.createElement(
              'div',
              { className: 'vm-detail-plate', title: displayText(project.customerName) },
              displayText(project.customerName),
            ),
            React.createElement(
              'p',
              { className: 'vm-detail-meta mono tabular-nums' },
              displayText(project.contractCode),
            ),
            React.createElement(
              'p',
              { className: 'vm-detail-meta', title: displayText(project.projectName) },
              displayText(project.projectName),
            ),
          ),
          React.createElement(
            'div',
            { className: 'vm-detail-aside' },
            React.createElement(
              'p',
              { className: 'vpr-collect-contract-hero__aside-main', title: displayText(project.signingCompany) },
              displayText(project.signingCompany),
            ),
            businessMeta
              ? React.createElement('p', { className: 'vm-detail-meta' }, businessMeta)
              : null,
            React.createElement(
              'p',
              { className: 'vm-detail-meta' },
              displayText(project.contractType || '正式合同'),
            ),
          ),
        ),
        React.createElement(
          'div',
          { className: 'vm-detail-stats vpr-collect-contract-stats' },
          contractStats,
        ),
      ),
      React.createElement(
        'div',
        {
          className: 'vm-detail-stats vpr-collect-summary-stats',
          'data-annotation-id': 'vpr-collect-kpi',
        },
        renderKpiStat('已选车辆数', selectedCount + ' 辆', selectedCount > 0),
        renderKpiStat('应收总额', fmtMoneyYuan(amountBreakdown.total), amountBreakdown.total > 0),
        renderKpiStat('租金总额', fmtMoneyYuan(amountBreakdown.rent), amountBreakdown.rent > 0),
        renderKpiStat('保证金总额', fmtMoneyYuan(amountBreakdown.deposit), amountBreakdown.deposit > 0),
        renderKpiStat('服务项总额', fmtMoneyYuan(amountBreakdown.service), amountBreakdown.service > 0),
      ),
      React.createElement(
        Card,
        {
          className: 'vpr-collect-card vpr-collect-card--order',
          title: '提车应收款',
          'data-annotation-id': 'vpr-collect-form',
          extra: orderLines.length
            ? React.createElement(
                'span',
                { className: 'vpr-collect-card__extra tabular-nums' },
                orderLines.length,
                ' 个待办型号',
              )
            : null,
        },
        React.createElement(
          'div',
          { className: 'vpr-collect-order-section' },
          React.createElement(
            'section',
            { className: 'vpr-collect-delivery-panel', 'aria-label': '交付信息' },
            React.createElement(
              'div',
              { className: 'vpr-collect-delivery-panel__head' },
              React.createElement('h3', { className: 'vpr-collect-delivery-panel__title' }, '交付信息'),
              React.createElement(
                'span',
                { className: 'vpr-collect-delivery-panel__hint' },
                '根据交付时间，自动计算提车应收款金额',
              ),
            ),
            React.createElement(
              'div',
              { className: 'vpr-collect-delivery-panel__grid' },
              React.createElement(
                'label',
                {
                  className:
                    'vpr-collect-delivery-field'
                    + (submitAttempted && !String(deliveryLocation || '').trim() ? ' vpr-collect-delivery-field--invalid' : ''),
                },
                React.createElement(
                  'span',
                  { className: 'vpr-collect-delivery-field__label' },
                  React.createElement(DeliveryFieldIconLocation),
                  '车辆交付（交还）地点',
                  React.createElement('span', { className: 'vpr-collect-form-item__required', 'aria-hidden': true }, ' *'),
                ),
                React.createElement(Input, {
                  value: deliveryLocation,
                  placeholder: '请输入本次交车地点',
                  className: 'vpr-collect-delivery-field__control',
                  status: submitAttempted && !String(deliveryLocation || '').trim() ? 'error' : undefined,
                  onChange: function (e) {
                    setDeliveryLocation(e.target.value);
                    markDirty();
                  },
                }),
                submitAttempted && !String(deliveryLocation || '').trim()
                  ? React.createElement('span', { className: 'vpr-collect-form-item__error', role: 'alert' }, '请填写交付地点')
                  : null,
              ),
              React.createElement(
                'label',
                {
                  className:
                    'vpr-collect-delivery-field'
                    + (submitAttempted && !deliveryDate ? ' vpr-collect-delivery-field--invalid' : ''),
                },
                React.createElement(
                  'span',
                  { className: 'vpr-collect-delivery-field__label' },
                  React.createElement(DeliveryFieldIconCalendar),
                  '车辆交付时间',
                  React.createElement('span', { className: 'vpr-collect-form-item__required', 'aria-hidden': true }, ' *'),
                ),
                React.createElement(DatePicker, {
                  className: 'vpr-collect-delivery-field__control vpr-collect-date-picker',
                  style: { width: '100%' },
                  placeholder: '请选择交付日期',
                  status: submitAttempted && !deliveryDate ? 'error' : undefined,
                  value: deliveryDate && dayjs ? dayjs(deliveryDate) : null,
                  onChange: function (_date, dateString) {
                    setDeliveryDate(dateString || '');
                    markDirty();
                  },
                }),
                submitAttempted && !deliveryDate
                  ? React.createElement('span', { className: 'vpr-collect-form-item__error', role: 'alert' }, '请选择交付时间')
                  : null,
              ),
            ),
          ),
          React.createElement(
            'div',
            { className: 'vpr-page-callout vpr-page-callout--rule vpr-collect-order-callout', role: 'note' },
            ruleText,
          ),
          React.createElement(
            'div',
            { className: 'vpr-collect-table-toolbar' },
            React.createElement(
              'div',
              { className: 'vpr-collect-table-toolbar__left' },
              React.createElement(
                'span',
                { className: 'vpr-collect-table-toolbar__badge tabular-nums' },
                '待办 ',
                orderLines.length,
                ' 行',
              ),
              React.createElement('span', { className: 'vpr-collect-table-toolbar__hint' }, '填写本次交车数后自动计算应收'),
            ),
            orderLines.length
              ? React.createElement(
                  'div',
                  { className: 'vpr-collect-table-toolbar__actions' },
                  React.createElement(Button, { size: 'small', type: 'primary', ghost: true, onClick: fillAllPending }, '填入全部待办'),
                  React.createElement(Button, { size: 'small', onClick: clearAllQuantities }, '清空数量'),
                )
              : null,
          ),
          React.createElement(
            'div',
            { className: 'vpr-collect-table-wrap', 'data-annotation-id': 'vpr-collect-table' },
            orderLines.length
              ? React.createElement(
                  'table',
                  { className: 'vpr-collect-table' },
                  React.createElement(
                    'thead',
                    null,
                    React.createElement(
                      'tr',
                      null,
                      React.createElement('th', null, '品牌型号'),
                      React.createElement('th', { className: 'vpr-collect-th--plate' }, '车牌号'),
                      React.createElement('th', { className: 'vpr-collect-th--num' }, '未交车辆数'),
                      React.createElement('th', { className: 'vpr-collect-th--num' }, '本次交车数'),
                      React.createElement('th', { className: 'vpr-collect-th--num' }, '租金总额'),
                      React.createElement('th', { className: 'vpr-collect-th--num' }, '保证金总额'),
                      React.createElement('th', { className: 'vpr-collect-th--num' }, '服务项总额'),
                      React.createElement('th', { className: 'vpr-collect-th--num' }, '应收总额'),
                    ),
                  ),
                  React.createElement(
                    'tbody',
                    null,
                    orderTableRows.map(function (row) {
                      var line = row.line;
                      var preview = buildCollectLinePreview(
                        line,
                        lineQuantities[line.lineKey],
                        deliveryDate,
                        paymentCycleMonths,
                      );
                      var rowClass = preview.quantity ? 'vpr-collect-row--selected' : 'vpr-collect-row--idle';
                      var cells = [];

                      if (row.isFirstInModelGroup) {
                        cells.push(
                          React.createElement(
                            'td',
                            {
                              key: 'model',
                              rowSpan: row.modelGroupRowSpan,
                              className: 'vpr-collect-td--model-cell',
                            },
                            renderCollectModelGroupCell(line),
                          ),
                        );
                      }

                      cells.push(
                        React.createElement(
                          'td',
                          { key: 'plateNo', className: 'vpr-pickup-subtable__plate-cell' },
                          renderCollectPlateCell(row.vehicle),
                        ),
                      );

                      if (row.isFirstInModelGroup) {
                        cells.push(
                          React.createElement(
                            'td',
                            {
                              key: 'pendingCount',
                              rowSpan: row.modelGroupRowSpan,
                              className: 'vpr-collect-td--num vpr-collect-td--action tabular-nums',
                              title: '点击填入该行全部未交车辆',
                              onClick: function () {
                                fillLineQuantity(line.lineKey, line.availableCount);
                              },
                            },
                            line.availableCount,
                          ),
                          React.createElement(
                            'td',
                            {
                              key: 'pickupQty',
                              rowSpan: row.modelGroupRowSpan,
                              className: 'vpr-collect-td--num',
                            },
                            React.createElement(InputNumber, {
                              min: 0,
                              max: line.availableCount,
                              value: lineQuantities[line.lineKey] || 0,
                              className: 'vpr-collect-qty-input',
                              onChange: function (value) {
                                setLineQuantities(function (prev) {
                                  var next = Object.assign({}, prev);
                                  next[line.lineKey] = value == null ? 0 : value;
                                  return next;
                                });
                                markDirty();
                              },
                            }),
                          ),
                          React.createElement(
                            'td',
                            {
                              key: 'rentTotal',
                              rowSpan: row.modelGroupRowSpan,
                              className: 'vpr-collect-td--num tabular-nums',
                            },
                            fmtMoneyYuan(preview.rentTotal),
                          ),
                          React.createElement(
                            'td',
                            {
                              key: 'depositTotal',
                              rowSpan: row.modelGroupRowSpan,
                              className: 'vpr-collect-td--num tabular-nums',
                            },
                            fmtMoneyYuan(preview.depositTotal),
                          ),
                          React.createElement(
                            'td',
                            {
                              key: 'serviceTotal',
                              rowSpan: row.modelGroupRowSpan,
                              className: 'vpr-collect-td--num tabular-nums',
                            },
                            fmtMoneyYuan(preview.serviceTotal),
                          ),
                          React.createElement(
                            'td',
                            {
                              key: 'lineTotal',
                              rowSpan: row.modelGroupRowSpan,
                              className: 'vpr-collect-td--num tabular-nums',
                            },
                            fmtMoneyYuan(preview.lineTotal),
                          ),
                        );
                      }

                      return React.createElement(
                        'tr',
                        { key: row.rowKey, className: rowClass },
                        cells,
                      );
                    }),
                  ),
                )
              : React.createElement(
                  'div',
                  { className: 'vpr-collect-table-toolbar vpr-collect-table-toolbar--warn vpr-page-empty' },
                  React.createElement('p', { className: 'vpr-page-empty__title' }, '暂无可办理的租赁订单明细'),
                  React.createElement('p', { className: 'vpr-page-empty__desc' }, '本合同车辆可能已全部办理，请返回列表确认。'),
                ),
          ),
          batchSummary && batchSummary.rule === 'on-or-before-15' && batchSummary.month25.amount > 0
            ? React.createElement(
                'div',
                { className: 'vpr-collect-batch-panel' },
                React.createElement('div', { className: 'vpr-collect-batch-panel__title' }, '当月 25 日应付（下周期租金及服务费）'),
                React.createElement(
                  'div',
                  { className: 'vpr-collect-batch-panel__amount tabular-nums' },
                  fmtMoneyYuan(batchSummary.month25.amount),
                ),
              )
            : null,
        ),
      ),
    ),
    React.createElement(
      'footer',
      { className: 'vpr-collect-footer', 'data-annotation-id': 'vpr-collect-footer' },
      React.createElement(
        'div',
        { className: 'vpr-collect-footer__left' },
        dirty
          ? React.createElement('span', { className: 'vpr-collect-draft-badge' }, '未提交')
          : null,
        React.createElement(
          'div',
          { className: 'vpr-collect-footer__summary' + (formReady ? '' : ' vpr-collect-footer__summary--warn') },
          formReady
            ? React.createElement(
                React.Fragment,
                null,
                '已选 ',
                React.createElement('strong', { className: 'tabular-nums' }, String(selectedCount)),
                ' 辆 · 应收合计 ',
                React.createElement(
                  'strong',
                  { className: 'tabular-nums' },
                  fmtMoneyYuan(amountBreakdown.total),
                ),
              )
            : React.createElement('span', null, submitHint || '请完善交付信息与交车数量'),
        ),
      ),
      React.createElement(
        'div',
        { className: 'vpr-collect-footer__actions' },
        React.createElement(Button, { onClick: handleBack }, '取消'),
        React.createElement(
          Button,
          {
            type: 'primary',
            className: 'vm-btn-primary',
            disabled: !formReady,
            onClick: handleSubmit,
            title: formReady ? '提交并生成提车应收款' : submitHint,
          },
          '提交生成',
        ),
      ),
    ),
    React.createElement(
      Modal,
      {
        title: '确认提交办理',
        open: submitConfirmVisible,
        okText: '确认提交',
        cancelText: '再检查一下',
        onOk: confirmSubmit,
        onCancel: function () {
          setSubmitConfirmVisible(false);
        },
      },
      React.createElement(
        'div',
        { className: 'vpr-submit-confirm' },
        React.createElement(
          'p',
          null,
          '将为 ',
          React.createElement('strong', null, String(selectedCount)),
          ' 辆车生成本次提车应收款。',
        ),
        React.createElement(
          'ul',
          { className: 'vpr-submit-confirm__list' },
          React.createElement('li', null, '交付时间：', React.createElement('strong', null, deliveryDate || '—')),
          React.createElement('li', null, '交付地点：', React.createElement('strong', null, deliveryLocation || '—')),
          React.createElement(
            'li',
            null,
            '应收合计：',
            React.createElement(
              'strong',
              { className: 'tabular-nums' },
              fmtMoneyYuan(amountBreakdown.total),
            ),
          ),
        ),
      ),
    ),
  );
};

export default Component;
