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

export const WorkstationAppIcon: React.FC<IconProps> = ({
    className,
    testId = 'WorkstationAppIcon',
    size,
}) => (
    <svg
        data-testid={testId}
        className={cx('Icon AppIcon WorkstationAppIcon', className)}
        width={size}
        height={size}
        viewBox="0 0 48 48"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
    >
        <path
            d="M14 15C12.8954 15 12 15.8954 12 17V25C12 26.1046 12.8954 27 14 27H34C35.1046 27 36 26.1046 36 25V17C36 15.8954 35.1046 15 34 15H14Z"
            fill="url(#WorkstationAppIconGradient)"
        />
        <path
            fillRule="evenodd"
            clipRule="evenodd"
            d="M36 7H12C7.58172 7 4 10.5817 4 15V27C4 31.4183 7.58172 35 12 35H22V39H16C14.8954 39 14 39.8954 14 41C14 42.1046 14.8954 43 16 43H32C33.1046 43 34 42.1046 34 41C34 39.8954 33.1046 39 32 39H26V35H36C40.4183 35 44 31.4183 44 27V15C44 10.5817 40.4183 7 36 7ZM8 15C8 12.7909 9.79086 11 12 11H36C38.2091 11 40 12.7909 40 15V27C40 29.2091 38.2091 31 36 31H12C9.79086 31 8 29.2091 8 27V15Z"
            fill="url(#WorkstationAppIconGradient)"
        />
        <defs>
            <linearGradient
                id="WorkstationAppIconGradient"
                x1="4"
                y1="7"
                x2="38.8136"
                y2="46.6736"
                gradientUnits="userSpaceOnUse"
            >
                <stop stopColor="var(--app-icon-gradient-color-0)" />
                <stop offset="1" stopColor="var(--app-icon-gradient-color-1)" />
            </linearGradient>
        </defs>
    </svg>
);
