import React from 'react';
import cx from 'classnames';
import type { IconProps } from '../types';

export const InsightsAppIcon: React.FC<IconProps> = ({
    className,
    testId = 'InsightsAppIcon',
    size,
}) => (
    <svg
        data-testid={testId}
        className={cx('Icon AppIcon InsightsAppIcon', className)}
        width={size}
        height={size}
        viewBox="0 0 48 48"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
    >
        <path
            fillRule="evenodd"
            clipRule="evenodd"
            d="M15 7C10.5817 7 7 10.5817 7 15V33C7 37.4183 10.5817 41 15 41H33C37.4183 41 41 37.4183 41 33V15C41 10.5817 37.4183 7 33 7H15ZM35.5858 18.5858L35.4142 18.4142C34.6332 17.6332 33.3668 17.6332 32.5858 18.4142L27 24L22.4142 19.4142C21.6332 18.6332 20.3668 18.6332 19.5858 19.4142L12.4142 26.5858C11.6332 27.3668 11.6332 28.6332 12.4142 29.4142L12.5858 29.5858C13.3668 30.3668 14.6332 30.3668 15.4142 29.5858L21 24L25.5858 28.5858C26.3668 29.3668 27.6332 29.3668 28.4142 28.5858L35.5858 21.4142C36.3668 20.6332 36.3668 19.3668 35.5858 18.5858Z"
            fill="url(#InsightsAppIconGradient)"
        />
        <defs>
            <linearGradient
                id="InsightsAppIconGradient"
                x1="7"
                y1="7"
                x2="40.15"
                y2="41"
                gradientUnits="userSpaceOnUse"
            >
                <stop stopColor="var(--app-icon-gradient-color-0)" />
                <stop offset="1" stopColor="var(--app-icon-gradient-color-1)" />
            </linearGradient>
        </defs>
    </svg>
);
