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="M9 6.5L8.295 7.205L9.585 8.5H5V9.5H9.585L8.295 10.795L9 11.5L11.5 9L9 6.5Z" />
    <path d="M5.5858 3L7.5858 5H14V13H2V3H5.5858ZM5.5858 2H2C1.73478 2 1.48043 2.10536 1.29289 2.29289C1.10536 2.48043 1 2.73478 1 3V13C1 13.2652 1.10536 13.5196 1.29289 13.7071C1.48043 13.8946 1.73478 14 2 14H14C14.2652 14 14.5196 13.8946 14.7071 13.7071C14.8946 13.5196 15 13.2652 15 13V5C15 4.73478 14.8946 4.48043 14.7071 4.29289C14.5196 4.10536 14.2652 4 14 4H8L6.2929 2.2929C6.10537 2.10536 5.85102 2 5.5858 2Z" />
  </svg>
);

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

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