import { Card } from 'antd';
import React from 'react';
import type { TradeExtendCostInfo } from '@/services/trade/order/detail';
import type { ItemConfig } from '../../order-info';
import styles from './index.module.less';
import ExtendCost from './uis/pets/extend-cost';

const EntendCostInfo: React.FC<ItemConfig<TradeExtendCostInfo[]>> = (props) => {
  const { data = [], orderCategoryId } = props;

  return (
    <div className={styles['order-info']}>
      <Card title="服务信息">
        {orderCategoryId === 1 && <ExtendCost data={data} />}
      </Card>
    </div>
  );
};

export default React.memo(EntendCostInfo);
