/*
 * 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.745 14H1.255A1.25 1.25 0 0 1 0 12.704C.058 11.21.223 8.66.7 6.42c.255-1.196.599-2.303 1.063-3.111C2.24 2.48 2.823 2 3.53 2c.752 0 1.322.305 1.777.775.455.469.79 1.094 1.078 1.72.08.175.166.37.248.56l.003.006c.192.443.372.854.539 1.151.113.202.25.413.424.57.159.141.32.218.528.218.707 0 1.12-.436 1.505-.88l.003-.004.107-.122c.222-.249.461-.499.771-.685.308-.186.686-.309 1.19-.309.575 0 1.107.325 1.591.878.48.545.9 1.298 1.265 2.127.66 1.504 1.13 3.254 1.41 4.468A1.25 1.25 0 0 1 14.744 14"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M18.746 17H1.254A1.25 1.25 0 0 1 0 15.707c.07-1.927.278-5.273.894-8.196.325-1.544.76-2.947 1.333-3.957Q3.108 2.001 4.249 2c.88 0 1.541.357 2.081.92.547.571.961 1.345 1.327 2.151.103.226.21.477.317.726l.003.006c.245.57.482 1.12.706 1.524.338.609.785 1.173 1.471 1.173 1.046 0 1.653-.667 2.147-1.245l.003-.003.135-.157c.283-.32.566-.616.925-.835.35-.213.785-.36 1.383-.36.628 0 1.239.358 1.832 1.042.587.676 1.114 1.623 1.576 2.688.853 1.967 1.458 4.272 1.814 5.848A1.25 1.25 0 0 1 18.746 17"] as readonly string[];

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