/*
 * 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 = ["M3 2h10a1 1 0 0 1 1 1v4h1a1 1 0 1 1 0 2h-1v4a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V9H1a1 1 0 1 1 0-2h1V3a1 1 0 0 1 1-1m5.854 3.146a.5.5 0 1 0-.708.708L10.293 8l-2.147 2.146a.5.5 0 0 0 .708.708l2.5-2.5a.5.5 0 0 0 0-.708zm-4.208 0a.5.5 0 0 0 0 .708L6.793 8l-2.147 2.146a.5.5 0 0 0 .708.708l2.5-2.5a.5.5 0 0 0 .144-.306.5.5 0 0 0-.001-.106.5.5 0 0 0-.143-.296l-2.5-2.5a.5.5 0 0 0-.708 0"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M18 9h-1V4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v5H2c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-5h1c.55 0 1-.45 1-1s-.45-1-1-1M6.85 13.35a.47.47 0 0 1-.35.15.47.47 0 0 1-.35-.15c-.2-.19-.2-.51 0-.7L8.79 10 6.15 7.35c-.2-.19-.2-.51 0-.7.19-.2.51-.2.7 0l3 3c.2.19.2.51 0 .7zm7-3-3 3a.47.47 0 0 1-.35.15.47.47 0 0 1-.35-.15c-.2-.19-.2-.51 0-.7L12.79 10l-2.64-2.65c-.2-.19-.2-.51 0-.7.19-.2.51-.2.7 0l3 3c.2.19.2.51 0 .7"] as readonly string[];

export const BlockPromote: 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="block-promote" ref={ref} {...props}>
            {paths.map((d, i) => (
                <path key={i} d={d} fillRule="evenodd" />
            ))}
        </SVGIconContainer>
    );
});
BlockPromote.displayName = `Blueprint6.Icon.BlockPromote`;
export default BlockPromote;
