import { MyBetaModalFormProps, renderTextHelper } from '@/common';
import {
  HouseBillsTypeEnum,
  HouseChargeStandardsCalculationModeEnum,
  HouseChargeStandardsCalculationPeriodEnum,
} from '@/gen/Enums';
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
import { Space } from 'antd';

export default function info(props: MyBetaModalFormProps) {
  const { item } = props;

  return (
    <Space direction="vertical" style={{ width: '100%' }}>
      <ProCard title="基本信息">
        <ProDescriptions bordered>
          <ProDescriptions.Item label="项目名称" span={2}>
            {item?.asset_project?.name}
          </ProDescriptions.Item>
          <ProDescriptions.Item label="收费标准名称">
            {item?.name}
          </ProDescriptions.Item>

          <ProDescriptions.Item label="收费项目">
            <renderTextHelper.Tag
              Enums={HouseBillsTypeEnum}
              value={item?.charge_type}
              key="type"
            />
          </ProDescriptions.Item>
          <ProDescriptions.Item label="计费模式">
            <renderTextHelper.Tag
              Enums={HouseChargeStandardsCalculationModeEnum}
              value={item?.calculation_mode}
              key="type"
            />
          </ProDescriptions.Item>
          <ProDescriptions.Item label="账单计费周期">
            <renderTextHelper.Tag
              Enums={HouseChargeStandardsCalculationPeriodEnum}
              value={item?.calculation_period}
              key="type"
            />
          </ProDescriptions.Item>

          <ProDescriptions.Item label="备注">
            {item?.remark}
          </ProDescriptions.Item>
        </ProDescriptions>
      </ProCard>
    </Space>
  );
}
