/*
 * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import * as React from "react";
import type { SVGIconProps } from "../../svgIconProps";
import { IconSize } from "../../iconTypes";
import { SVGIconContainer } from "../../svgIconContainer";

/** Path data for the 16px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_16 = ["M14.29 4.296a1.002 1.002 0 0 1 1.42 1.419l-3 2.996a1.015 1.015 0 0 1-1.42 0l-3-2.997a1.002 1.002 0 0 1 1.42-1.419L11 5.586V1a1 1 0 0 1 2 0v4.584zM7.583 6.422l3.01 3.006.01.01c.359.34.85.563 1.397.563V11a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h5.268A2 2 0 0 0 10 1v2.27a2.002 2.002 0 0 0-2.417 3.152M13 9.736q.23-.13.417-.317l.29-.29 1.847 1.23a1 1 0 0 1 .189 1.5l-3.436 3.81c-.19.21-.46.331-.745.331H4.438c-.284 0-.555-.12-.745-.331l-3.436-3.81a1 1 0 0 1 .19-1.5L3 8.659V11a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2z"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M17.29 4.295a1.002 1.002 0 0 1 1.42 1.419l-3 2.997a1.015 1.015 0 0 1-1.42 0l-3-2.997a1.002 1.002 0 0 1 1.42-1.419L14 5.584V1a1 1 0 0 1 2 0v4.584zM13.267 0A2 2 0 0 0 13 1v2.27a2.002 2.002 0 0 0-2.417 3.152l3.01 3.006.01.01c.359.34.85.563 1.397.563v3.749c0 .69-.56 1.25-1.25 1.25h-7.5C5.56 15 5 14.44 5 13.75V1.25C5 .56 5.56 0 6.25 0zM4 10.726.393 13.344a.97.97 0 0 0-.131 1.443l4.5 4.875c.2.215.485.338.786.338h8.904c.3 0 .586-.123.785-.338l4.501-4.875a.97.97 0 0 0-.13-1.443L16 10.726v3.024A2.25 2.25 0 0 1 13.75 16h-7.5A2.25 2.25 0 0 1 4 13.75z"] as readonly string[];

export const ServerInstall: React.FC<SVGIconProps> = React.forwardRef<any, SVGIconProps>((props, ref) => {
    const isLarge = (props.size ?? IconSize.STANDARD) >= IconSize.LARGE;
    const paths = isLarge ? PATHS_20 : PATHS_16;
    return (
        <SVGIconContainer iconName="server-install" ref={ref} {...props}>
            {paths.map((d, i) => (
                <path key={i} d={d} fillRule="evenodd" />
            ))}
        </SVGIconContainer>
    );
});
ServerInstall.displayName = `Blueprint6.Icon.ServerInstall`;
export default ServerInstall;
