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

export const PublishingAppIcon: React.FC<IconProps> = ({
    className,
    testId = 'PublishingAppIcon',
    size,
}) => (
    <svg
        data-testid={testId}
        className={cx('Icon AppIcon PublishingAppIcon', 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 7H15ZM25.8506 14.2793C27.8457 15.6624 29.25 17.9146 29.25 21C29.25 24.6244 26.9612 27.7264 23.962 30.209C20.9575 32.6958 17.1972 34.5978 14.1549 35.8211C13.428 36.1134 12.6127 35.7845 12.2665 35.092C11.9301 34.4191 12.1345 33.5968 12.7662 33.1758C13.1625 32.9117 13.5777 32.6403 14.0051 32.3609C15.9274 31.1044 18.097 29.6862 19.9084 28.0387C22.123 26.0246 23.75 23.7128 23.75 21C23.75 19.5182 23.5014 17.9496 22.7886 16.821C22.435 16.2611 21.9694 15.8127 21.3635 15.5314C20.7573 15.25 19.9934 15.1277 19.031 15.248C18.2007 15.3518 17.308 15.8226 16.5902 16.4611C16.483 16.5565 16.3805 16.6549 16.2835 16.7554C16.3552 16.7518 16.4274 16.75 16.5 16.75C18.5335 16.75 20.25 18.1703 20.25 20C20.25 21.8297 18.5335 23.25 16.5 23.25C14.9161 23.25 13.5245 22.3883 12.9866 21.1426C12.6792 20.5251 12.5809 19.8294 12.6445 19.1175C12.7777 17.6283 13.6206 16.0376 14.8224 14.8241C15.4134 14.2273 17.0958 13.0426 18.9616 12.7529C21.2976 12.3903 23.8633 12.9016 25.8506 14.2793ZM34 18C35.1046 18 36 17.1046 36 16C36 14.8954 35.1046 14 34 14C32.8954 14 32 14.8954 32 16C32 17.1046 32.8954 18 34 18ZM34 26C35.1046 26 36 25.1046 36 24C36 22.8954 35.1046 22 34 22C32.8954 22 32 22.8954 32 24C32 25.1046 32.8954 26 34 26Z"
            fill="url(#PublishingAppIconGradient)"
        />
        <defs>
            <linearGradient
                id="PublishingAppIconGradient"
                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>
);
