/*
 * 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";

export const OpenApplication: React.FC<SVGIconProps> = React.forwardRef<any, SVGIconProps>((props, ref) => {
    const isLarge = (props.size ?? IconSize.STANDARD) >= IconSize.LARGE;
    const pixelGridSize = isLarge ? IconSize.LARGE : IconSize.STANDARD;
    const translation = `${-1 * pixelGridSize / 0.05 / 2}`;
    const style = { transformOrigin: "center" };
    return (
        <SVGIconContainer iconName="open-application" ref={ref} {...props}>
            <path
                d={isLarge ? "M80 380H360C371 380 380 371 380 360V100C380 89 371 80 360 80H200V120H340V320H100V200H60V360C60 371 69 380 80 380M130 280H270C275.6 280 280 284.4 280 290S275.6 300 270 300H130C124.4 300 120 295.6 120 290S124.4 280 130 280M130 240H190C195.6 240 200 244.4 200 250S195.6 260 190 260H130C124.4 260 120 255.6 120 250S124.4 240 130 240M230 200H130C124.4 200 120 204.4 120 210S124.4 220 130 220H230C235.6 220 240 215.6 240 210S235.6 200 230 200M140 60C140 49 149 40 160 40S180 49 180 60V160C180 171 171 180 160 180H60C49 180 40 171 40 160S49 140 60 140H111.8L6 34.2C2.2 30.6 0 25.6 0 20A20.06 20.06 0 0 1 34.2 5.8L140 111.8z" : "M100 320H300C311 320 320 311 320 300V100C320 89 311 80 300 80H160V120H280V260H120V160H80V300C80 311 89 320 100 320M150 220H250C255.6 220 260 224.4 260 230S255.6 240 250 240H150C144.4 240 140 235.6 140 230S144.4 220 150 220M150 180H190C195.6 180 200 184.4 200 190S195.6 200 190 200H150C144.4 200 140 195.6 140 190S144.4 180 150 180M220 150C220 144.4 216.7 140 212.5 140H167.5C163.3 140 160 144.4 160 150S163.3 160 167.5 160H212.5C216.7 160 220 155.6 220 150M100 40C100 29 109 20 120 20S140 29 140 40V120C140 131 131 140 120 140H40C29 140 20 131 20 120S29 100 40 100H71.8L6 34.2C2.2 30.6 0 25.6 0 20A20.06 20.06 0 0 1 34.2 5.8L100 71.8z"}
                fillRule="evenodd"
                transform={`scale(0.05, -0.05) translate(${translation}, ${translation})`}
                style={style}
            />
        </SVGIconContainer>
   );
});
OpenApplication.displayName = `Blueprint6.Icon.OpenApplication`;
export default OpenApplication;
