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="M10 1V2H13.293L9 6.291L9.707 7L14 2.707V6H15V1H10Z" />
    <path d="M7 9.708L6.296 9L2 13.293V10H1V15H6V14H2.707L7 9.708Z" />
  </svg>
);

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

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