import React from 'react';
import styled from 'styled-components';

import type { IconProps } from '@redocly/theme/icons/types';

import { getCssColorVariable } from '@redocly/theme/core/utils';

const Icon = (props: IconProps) => (
  <svg
    width="24"
    height="24"
    viewBox="0 0 24 24"
    fill="none"
    xmlns="http://www.w3.org/2000/svg"
    {...props}
  >
    <rect x="2.5" y="2.5" width="19" height="19" rx="9.5" stroke="#DCDDE5" />
    <path d="M12.5 11.5V8H11.5V11.5H8V12.5H11.5V16H12.5V12.5H16V11.5H12.5Z" fill="#3B3C45" />
  </svg>
);

export const PlusCustomIcon = styled(Icon).attrs({
  'data-component-name': 'icons/PlusCustomIcon/PlusCustomIcon',
})`
  path {
    fill: ${({ color }) => getCssColorVariable(color)};
  }

  height: ${({ size }) => size || '16px'};
  width: ${({ size }) => size || '16px'};
`;
