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
      fillRule="evenodd"
      clipRule="evenodd"
      d="M1.5 3.5H14.5V4.5H1.5V3.5ZM1.5 7.5H14.5V8.5H1.5V7.5ZM1.5 11.5H14.5V12.5H1.5V11.5Z"
    />
  </svg>
);

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

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