// 售后列表
import type { TabsProps } from 'antd';
import { Tabs } from 'antd';
import React from 'react';
import { SalesStatusLableMap } from '@/constants/trade';
import SalesListItem from './list';

const TradeSalesList: React.FC = () => {
  const items: TabsProps['items'] = Object.entries(SalesStatusLableMap).map(
    ([value, label]) => ({
      key: value,
      label: label,
      children: <SalesListItem orderStatus={Number(value)} />,
    }),
  );

  return (
    <div className="page-container">
      <Tabs defaultActiveKey="1" items={items} destroyOnHidden />
    </div>
  );
};

export default TradeSalesList;
