/*
 * @Author: code4eat awesomedema@gmail.com
 * @Date: 2024-12-06 14:42:57
 * @LastEditors: code4eat awesomedema@gmail.com
 * @LastEditTime: 2025-02-28 14:14:41
 * @FilePath: /MediResourceManaSys/src/pages/qualificationMana/qualificationAuth/authHisttory/index.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEi m z z
 */

import { createFromIconfontCN } from '@ant-design/icons';
import React, { Children } from 'react';
import { Timeline } from 'antd';
import './style.less';

const IconFont = createFromIconfontCN({
  scriptUrl: '',
});

export default function AuthHisContent({ hisList }: { hisList: any[] }) {
  console.log({ hisList });

  const dotNode = (isActive = false) => {
    return (
      <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', width: 16, height: 16, border: '2px solid #E7EBF2', borderRadius: '50%' }}>
        {isActive && <div style={{ width: 8, height: 8, background: '#363F4D', borderRadius: '50%' }}></div>}
      </div>
    );
  };
  return (
    <div className="AuthHisContent">
      <div className="AuthHisContent-title">
        <IconFont type={'icon-qingliangtishi'} style={{ paddingRight: 12 }} />
        调整历史
      </div>
      <div className="AuthHisContent-content">
        <Timeline>
          {hisList.map((a, index) => {
            return (
              <Timeline.Item key={index} dot={dotNode(index == 0 ? true : false)}>
                {a.createTime}调整为{a.value}
              </Timeline.Item>
            );
          })}
        </Timeline>
      </div>
    </div>
  );
}
