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 viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
    <path d="M13 10H12V12H10V13H12V15H13V13H15V12H13V10Z" />
    <path d="M14 4H8L6.3 2.3C6.1 2.1 5.85 2 5.6 2H2C1.45 2 1 2.45 1 3V13C1 13.55 1.45 14 2 14H9V13H2V3H5.6L7.6 5H14V9H15V5C15 4.45 14.55 4 14 4Z" />
  </svg>
);

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

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