import React from 'react';
import Styled from 'styled-components';
export const Avatar = ({ image, name, initials }) => {
  return /*#__PURE__*/ React.createElement(
    AvatarWrapper,
    null,
    image?.length < 1
      ? /*#__PURE__*/ React.createElement('span', null, initials)
      : '',
    image && image.length > 0
      ? /*#__PURE__*/ React.createElement('img', {
          src: image,
          alt: name,
        })
      : ''
  );
};
export const AvatarForProfile = ({ image, name, initials }) => {
  return /*#__PURE__*/ React.createElement(
    AvatarWrapperTwo,
    null,
    image?.length < 1
      ? /*#__PURE__*/ React.createElement('span', null, initials)
      : '',
    image && image.length > 0
      ? /*#__PURE__*/ React.createElement('img', {
          src: image,
          alt: name,
        })
      : ''
  );
};
export const FormUserAvatar = ({ image, name, initials }) => {
  return /*#__PURE__*/ React.createElement(
    AvatarWrapper,
    null,
    /*#__PURE__*/ React.createElement('span', null, initials),
    image && image.length > 0
      ? /*#__PURE__*/ React.createElement('img', {
          src: image,
          alt: name,
        })
      : ''
  );
};
export const Avatar40 = ({ image, name, initials }) => {
  return /*#__PURE__*/ React.createElement(
    AvatarWrapper,
    {
      className: 'avatar-40',
    },
    /*#__PURE__*/ React.createElement('span', null, initials),
    image
      ? /*#__PURE__*/ React.createElement('img', {
          src: image,
          alt: name,
        })
      : ''
  );
};
export const Avatar30 = ({ image, name, initials }) => {
  return /*#__PURE__*/ React.createElement(
    AvatarWrapper,
    {
      className: 'avatar-30',
    },
    /*#__PURE__*/ React.createElement('span', null, initials),
    image
      ? /*#__PURE__*/ React.createElement('img', {
          src: image,
          alt: name,
        })
      : ''
  );
};
export const AvatarWithText = ({ image, name, email, initials }) => {
  return /*#__PURE__*/ React.createElement(
    WrapAvatarWithText,
    null,
    /*#__PURE__*/ React.createElement(Avatar40, {
      image: image,
      alt: name,
      initials: initials,
    }),
    /*#__PURE__*/ React.createElement(
      'div',
      {
        className: 'name-info',
      },
      /*#__PURE__*/ React.createElement('h4', null, name),
      /*#__PURE__*/ React.createElement('p', null, email)
    )
  );
};
const WrapAvatarWithText = Styled.div`
  position: relative;
  display: flex;
  .name-info {
    margin-left: 1rem;
    h4 {
      font-family: var(--ff-medium);
      font-weight: 500;
      color: #0a1045;
      font-size: 1.6rem;
      text-transform: capitalize;
    }
    p {
      font-family: var(--ff-body);
      font-weight: 400;
      font-size: 1.4rem;
    }
  }
`;
const AvatarWrapper = Styled.div`
  position: relative;
  border-radius: 50%;
  background: var(--co-grey);
  min-width: 35px;
  max-height: 35px;
  width: 35px;
  height: 35px;
  &.avatar-40 {
    min-width: 40px;
    max-height: 40px;
    width: 40px;
    height: 40px;
  }

  span {
    position: absolute;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    text-transform: uppercase;
  }
  img {
    position: relative;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    border: 1px solid #E8EDFF;
    z-index: 1;
  }
`;
const AvatarWrapperTwo = Styled.div`
  position: relative;
  border-radius: 50%;
  background: var(--co-grey);
  min-width: 35px;
  max-height: 35px;
  width: 35px;
  height: 35px;
  &.avatar-40 {
    min-width: 40px;
    max-height: 40px;
    width: 40px;
    height: 40px;
  }

  span {
    position: absolute;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    text-transform: uppercase;
  }
  img {
    position: relative;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    border: 1px solid #E8EDFF;
    z-index: 1;
  }
`;
