import classNames from 'classnames';
import React from 'react';
import styled from 'styled-components';
const StyledCircledBoard = styled.div `
  width: 28px;
  height: 28px;
  background-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  .circle {
    animation: loadingCircle 1s infinite linear;
    width: 16px;
    height: 16px;
    background-color: transparent;
    border: 2px solid ${({ theme }) => theme.button.disabled.bg};
    border-radius: 50%;
    position: relative;

    &::after {
      position: absolute;
      width: 50%;
      height: 100%;
      box-sizing: content-box;
      right: -2px;
      top: -2px;
      content: '';
      border-radius: 8px;
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
      border: 2px solid ${({ theme }) => theme.text.secondary};
      border-left: none;
      background-color: transparent;
    }
  }

  &.circle-board-primary {
    background-color: ${({ theme }) => theme.main};

    .circle {
      border-color: rgba(255, 255, 255, 0.5);
      &::after {
        border-color: white;
      }
    }
  }
`;
export default function CircledBoard(props) {
    const { className, type = 'normal', ...others } = props;
    return (React.createElement(StyledCircledBoard, { className: classNames(`circle-board-${type}`, className), ...others },
        React.createElement("div", { className: "circle" })));
}
