import React from "react";

import "./catalogPersonCard.scss";

export const CatalogPersonCard = ({
  img,
  name,
  salary,
  category,
  skills,
  level,
  description
}) => {
  return (
    <div className="catalogPersonCard">
      <div className="catalogPersonCard__head">
        <div className="catalogPersonCard__avatar">
          <img src={img} alt="avatar" />
          <span className="catalogPersonCard__skill">{level}</span>
        </div>
        <div className="catalogPersonCard__info">
          <span className="catalogPersonCard__name">{name}</span>
          <span className="catalogPersonCard__salary">{salary} / час</span>
          <p className="catalogPersonCard__category">
            <span>Разработка:</span> {category}
          </p>
        </div>
      </div>
      <div className="catalogPersonCard__items">
        {skills.map((item, index) => {
          return (
            <div className="catalogPersonCard__skillItem" key={index}>
              {item}
            </div>
          );
        })}
      </div>
      <p className="catalogPersonCard__description">{description}</p>
    </div>
  );
};

export default CatalogPersonCard;
