/**
 * @name 还车应结款-新
 * 任务驱动 · 待我处理优先 · 权责分角色
 */
import * as antd from 'antd';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/locale/zh_CN';
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
import React, { useEffect } from 'react';
import 'antd/dist/reset.css';
import '../vehicle-management/style.css';
import './styles/index.css';
import { clearHostPrototypeRouteInfo } from '../../common/useHashPage';
import VehicleReturnSettlementV2App from './VehicleReturnSettlementV2App.jsx';

declare global {
  interface Window {
    React: typeof React;
    antd: typeof antd;
    dayjs: typeof dayjs;
  }
}

window.React = React;
window.antd = antd;
window.dayjs = dayjs;

dayjs.locale('zh-cn');

const vmTheme = {
  token: {
    colorPrimary: '#32a06e',
    colorLink: '#32a06e',
    colorLinkHover: '#3fb87c',
    borderRadius: 8,
    fontFamily:
      'Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif',
    fontSize: 14,
    colorText: '#18181b',
    colorTextSecondary: '#52525b',
    colorBorder: '#e5e7eb',
    colorBgContainer: '#ffffff',
  },
  components: {
    Table: {
      headerBg: '#f6f7f7',
      headerColor: '#71717a',
      rowHoverBg: '#f6f7f7',
      borderColor: '#e5e7eb',
      cellPaddingBlock: 6,
      cellPaddingInline: 10,
    },
    Card: { borderRadiusLG: 12 },
  },
};

export default function VehicleReturnSettlementV2() {
  useEffect(() => {
    clearHostPrototypeRouteInfo();
  }, []);

  return (
    <ConfigProvider theme={vmTheme} locale={zhCN}>
      <VehicleReturnSettlementV2App />
    </ConfigProvider>
  );
}
