import { MyBetaModalFormProps } from '@/common';
import { MyModal } from '@/components/MyModal';
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
import { Space } from 'antd';

export default function info(props: MyBetaModalFormProps) {
  return (
    <MyModal
      title={props.title || '查看'}
      type={props.item?.type || 'primary'}
      width="800px"
      node={
        <Space direction="vertical" style={{ width: '100%' }}>
          <ProCard extra={props.extra}>
            <ProDescriptions bordered column={2}>
              <ProDescriptions.Item label="机构名称" span={2}>
                <Space>
                  {props?.item?.name}
                  {/* <CompanyUpdate
                    item={props?.item}
                    title="机构"
                    reload={props?.reload}
                  /> */}
                </Space>
              </ProDescriptions.Item>
              <ProDescriptions.Item label="机构简称">
                {props?.item?.short_name}
              </ProDescriptions.Item>
              {/* <ProDescriptions.Item label="商户类型">
                <renderTextHelper.Tag
                  Enums={CompaniesMerchantTypeEnum}
                  value={props?.item?.merchant_type}
                  key="merchant_type"
                />
              </ProDescriptions.Item> */}

              <ProDescriptions.Item label="营业执照号" span={2}>
                {props?.item?.business_license_number}
              </ProDescriptions.Item>

              <ProDescriptions.Item label="联系人">
                {props?.item?.contact_name}: {props?.item?.contact_phone}
              </ProDescriptions.Item>
              <ProDescriptions.Item label="联系邮箱">
                {props?.item?.contact_email}
              </ProDescriptions.Item>
              <ProDescriptions.Item label="机构地址" span={2}>
                {props?.item?.province || ''}
                {props?.item?.city || ''}
                {props?.item?.district || ''}
                {props?.item?.address || ''}
              </ProDescriptions.Item>
              <ProDescriptions.Item label="创建日期">
                {props?.item?.created_at}
              </ProDescriptions.Item>
              <ProDescriptions.Item label="最近修改">
                {props?.item?.updated_at}
              </ProDescriptions.Item>
            </ProDescriptions>
          </ProCard>
        </Space>
      }
    />
  );
}
