/**
 * @name 车辆维修明细
 * 设计规范：ledger-shared/DESIGN.md · vm-page + ldb-page（与租赁业务台账对齐）
 */

import React, { useMemo } from 'react';
import {
  type AnnotationSourceDocument,
  type AnnotationViewerOptions
} from '@axhub/annotation';
import { PrototypeAnnotationHost } from '../../common/prototype-annotation-host';
import '../vehicle-management/style.css';
import './styles/index.css';
import './globals';
import 'antd/dist/reset.css';
import MaintenanceLedgerPage from './MaintenanceLedgerPage.jsx';
import annotationSourceDocument from './annotation-source.json';

export default function App() {
  const annotationOptions = useMemo<AnnotationViewerOptions>(
    () => ({
      showToolbar: true,
      showThemeToggle: true,
      showColorFilter: true,
      emptyWhenNoData: false,
      toolbarEdge: 'right',
      currentPageId: 'list',
    }),
    [],
  );

  return (
    <>
      <MaintenanceLedgerPage />
      <PrototypeAnnotationHost
        source={annotationSourceDocument as AnnotationSourceDocument}
        options={annotationOptions}
      />
    </>
  );
}
