/*
 * 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 AddChild: 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="add-child" ref={ref} {...props}>
            <path
                d={isLarge ? "M40 340V180H80V140H20A20 20 0 0 0 0 160V360A20 20 0 0 0 20 380H380A20 20 0 0 0 400 360V160A20 20 0 0 0 380 140H320V180H360V340zM220 120H260C271 120 280 111 280 100S271 80 260 80H220V40C220 29 211 20 200 20S180 29 180 40V80H140C129 80 120 89 120 100S129 120 140 120H180V160C180 171 189 180 200 180S220 171 220 160z" : "M40 280V160H60V120H16A16 16 0 0 0 0 136V304A16 16 0 0 0 16 320H304A16 16 0 0 0 320 304V136A16 16 0 0 0 304 120H260V160H280V280zM180 100H220C231 100 240 91 240 80S231 60 220 60H180V20C180 9 171 0 160 0S140 9 140 20V60H100C89 60 80 69 80 80S89 100 100 100H140V140C140 151 149 160 160 160S180 151 180 140z"}
                fillRule="evenodd"
                transform={`scale(0.05, -0.05) translate(${translation}, ${translation})`}
                style={style}
            />
        </SVGIconContainer>
   );
});
AddChild.displayName = `Blueprint6.Icon.AddChild`;
export default AddChild;
