/**
 * @name 合同模板管理
 */
import React from 'react';
import * as antd from 'antd';
import { ConfigProvider } from 'antd';
import 'antd/dist/reset.css';
import '../vehicle-management/style.css';
import './styles/index.css';
import ContractTemplateApp from './ContractTemplate.jsx';

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

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

/** 与 vehicle-management / Linear 主题一致 */
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: 8,
      cellPaddingInline: 12,
    },
    Tabs: {
      inkBarColor: '#32a06e',
      itemActiveColor: '#32a06e',
      itemSelectedColor: '#32a06e',
    },
    Card: {
      borderRadiusLG: 12,
    },
  },
};

export default function ContractTemplateManagementPage() {
  return React.createElement(
    ConfigProvider,
    { theme: vmTheme },
    React.createElement(ContractTemplateApp),
  );
}
