/*
 * 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 = ["M15 0a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1zm-4.43 6.731-1.604.947-.466.273v5.486l3.871-1.754c.38-.172.629-.589.629-1.052V5.3l-.001-.009c-.487.29-1.48.88-2.429 1.44M3 5.368v5.33c0 .429.214.821.553 1.013L7.5 13.393V7.95L3.005 5.295Q3 5.332 3 5.368m5.401-2.805a.9.9 0 0 0-.818-.038L3.629 4.317a1 1 0 0 0-.157.091L8 7.086l.458-.27 1.604-.946a646 646 0 0 0 2.516-1.491 1 1 0 0 0-.13-.09z"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M18.75 0C19.44 0 20 .56 20 1.25v17.5c0 .69-.56 1.25-1.25 1.25H1.25C.56 20 0 19.44 0 18.75V1.25C0 .56.56 0 1.25 0zM10.5 10v7l4.964-2.397c.474-.215.786-.735.786-1.314V6.627l-.001-.012C14.357 7.743 12.398 8.882 10.5 10M3.75 6.71v6.663c0 .536.268 1.026.69 1.266L9.5 17v-7L3.756 6.619q-.004.045-.006.091m6.752-3.506a1.12 1.12 0 0 0-1.023-.047l-4.943 2.24q-.105.047-.196.113L10 9c1.1-.648 4.733-2.935 5.723-3.526a1 1 0 0 0-.164-.113z"] as readonly string[];

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