import { Tabs, type TabsProps } from 'antd';
import React from 'react';
import type { TradeOrderPageRespVO } from '@/services/trade/order';
import { SalesTable } from '../../sales/list';
import OrderInfo from './order-info';
import SalesRefunds from './src/sales-refunds';

const DetailCom: React.FC<{ data?: TradeOrderPageRespVO }> = (props) => {
  const items: TabsProps['items'] = [
    {
      key: '1',
      label: '订单信息 ',
      children: <OrderInfo data={props.data} />,
    },
    {
      key: '2',
      label: '服务履约',
      children: '服务履约',
    },
    {
      key: '3',
      label: '商品配送',
      children: '商品配送',
    },
    {
      key: '4',
      label: '售后与退款',
      children: <SalesRefunds orderStatus={props.data?.orderStatus} />,
    },
  ];
  return <Tabs defaultActiveKey="1" items={items} destroyOnHidden />;
};

export default React.memo(DetailCom);
