import { MyBetaModalFormProps, renderTextHelper } from '@/common';
import { BannerSpacesTypeEnum } 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?.name}
          </ProDescriptions.Item>

          <ProDescriptions.Item label="类型">
            <renderTextHelper.Tag
              Enums={BannerSpacesTypeEnum}
              value={item?.type}
              key="type"
            />
          </ProDescriptions.Item>
          <ProDescriptions.Item label="备注">
            {item?.remark}
          </ProDescriptions.Item>
        </ProDescriptions>
      </ProCard>
    </Space>
  );
}
