/*
 * @Author: zhoux zhouxia@supervision.ltd
 * @Date: 2023-11-06 16:12:17
 * @LastEditors: zhoux zhouxia@supervision.ltd
 * @LastEditTime: 2023-11-09 17:29:04
 * @FilePath: \general-ai-platform-web\src\pages\Setting\components\ProjectCardList.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import React from 'react';

import { dateFormat } from '@/utils/common';
import { Tag } from 'antd';
// import { postModelVersionGetModelVersionListByIds } from '@/services/resource/ModelVersion';

// const [tabs, setTabs] = useState([]);
// const [projectData, setProjectData] = useState<any>({});
// const [tab, setTab] = useState('');
// const [modelVersionData, setModelVersionData] = useState<any[]>([]);

/**styles */
const listItemStyle = {
  display: 'flex',
  fontSize: 14,
  color: "#333333",
  maxWidth: '22vh',
  alignItems: 'center',
  padding: '5px 0',
}

const listItemLabelStyle = {
  fontSize: 14,
  color: "#666666",
  minWidth: 70,

}

const listItemTextStyle = {
  fontSize: 14,
  margin: 0
}
// 卡片
export type UpdateProjectProps = {
  info: Record<string, any>
  // reload: any;
};

const ProjectCard: React.FC<UpdateProjectProps> = ({ info }: { info: Record<string, any> }) => {
  return (
    <div
      style={{
        display: 'flex',
        flexDirection: 'column',
        alignItems: 'left',
        paddingLeft: 15,
        paddingRight: 15
      }}
    >
      <div style={{display: 'flex', alignItems: 'center', paddingBottom: 10}}>
        <span style={{fontWeight: 700, fontSize: 14,  paddingRight: 10}}>苏胜天算法模型</span>
        <Tag color="#44AEF5">经典算法</Tag>
      </div>
      <ul>
        <li style={listItemStyle}>
          <span style={listItemLabelStyle}>模型名称：</span>
          <p className='single_line' style={listItemTextStyle}>{info.modelName}</p>
        </li>
        <li style={listItemStyle}>
          <span style={listItemLabelStyle}>版本号：</span>
          <p className='single_line' style={listItemTextStyle}>{info.version || ''}</p>
        </li>
        <li style={listItemStyle}>
          <span style={listItemLabelStyle}>更新时间：</span>
          <p className='single_line' style={listItemTextStyle}>{dateFormat(info.updateTime)}</p>
        </li>
        {/* <li style={listItemStyle}>
          <span style={listItemLabelStyle}>绑定设备：</span>
          <p className='single_line' style={listItemTextStyle}>--</p>
        </li> */}
      </ul>
    </div>
  );
};

export default ProjectCard;
