/*
 * 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 Endnote: 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="endnote" ref={ref} {...props}>
            <path
                d={isLarge ? "M338.86 368.58Q329.6800000000001 366.8400000000001 320 366.86V341.14H366.3400000000001V200H400V400H374.94Q373.3400000000001 390.84 367.94 384.58Q362.84 378.28 355.28 374.28A54 54 0 0 0 338.86 368.58M256.6600000000001 0Q244.42 0 231.82 5.8L228.4600000000001 7.4599999999999C222.46 10.38 218.72 12.2199999999999 212.38 18.58V4.34H171V260H212.4V194.1L211.32 164.4A104 104 0 0 0 235.44 180.34A64 64 0 0 0 262.44 186.5Q279 186.48 291.96 179.98Q304.92 173.82 313.92 161.86Q322.92 150.26 327.6 133.62Q332.2800000000001 116.96 332.2800000000001 96.32Q332.2800000000001 73.52 325.8 55.4A92 92 0 0 0 309.24 25.34Q298.8 13.04 285.12 6.52T256.6600000000001 0M248.02 34.4Q265.66 34.4 277.54 49.6Q289.42 65.2000000000001 289.42 95.6Q289.42 122.4 280.42 137.24T251.26 152.0800000000001Q232.54 152.0800000000001 212.38 132.1800000000001V49.2400000000001Q221.74 40.9200000000001 230.74 37.6600000000001Q240.1 34.4 248.02 34.4M52.2 0Q28.8 0 14.4 14.12Q0 28.62 0 52.14Q0 66.28 5.76 77.14Q11.88 88.36 24.48 96.34Q37.44 104.28 56.88 109.74Q76.68 115.16 104.04 118.06A60 60 0 0 1 101.88 131.1A26 26 0 0 1 96.48 142.3A22 22 0 0 1 86.76 149.92A36 36 0 0 1 71.64 152.82Q58.68 152.82 46.08 147.74A180 180 0 0 1 21.96 135.44L6.84 163.32A180 180 0 0 0 39.96 179.62A112 112 0 0 0 79.56 186.5Q112.68 186.5 128.88 166.58Q145.44 147.02 145.44 109.72V4.36H104.04V21.76A100 100 0 0 0 81.36 6.88A62 62 0 0 0 52.2 0M65.52 32.6Q76.32 32.6 84.96 37.66Q93.96 42.74 104.04 52.14V92Q86.04 89.84 73.8 86.2Q61.56 82.58 54 77.8800000000001Q46.44 73.52 43.2 67.74A24.8 24.8 0 0 1 39.96 55.42Q39.96 43.48 47.16 38.04Q54.36 32.64 65.52 32.62" : "M11.88 12.12Q23.76 0 43.08 0Q56.14 0 67.12 5.9C74.66 9.84 79.32 12.5 85.84 18.3V3.72H120V94.12Q120 126.14 106.34 142.92Q92.96 160 65.64 160A90 90 0 0 1 32.98 154.1Q17.84 148.2 5.64 140.1L18.12 116.2Q27.92 122.4 38.02 126.76A54 54 0 0 0 59.1 131.1Q66.54 131.1 71.58 128.62A18 18 0 0 0 79.6 122.1Q82.88 118.06 84.06 112.46Q85.56 107.18 85.86 101.28A240 240 0 0 1 46.94 94.14Q30.9 89.4800000000001 20.2 82.6400000000001A44 44 0 0 1 4.76 66.1800000000001Q0 56.86 0 44.74Q0 24.54 11.88 12.12M70.1 32.32A30 30 0 0 0 54.06 27.96Q44.84 27.96 38.92 32.62Q32.98 37.28 32.98 47.54Q32.98 53.12 35.64 58.1Q38.32 63.06 44.56 66.8Q50.8 70.84 60.9 73.94A150 150 0 0 0 85.84 78.92V44.72Q77.52 36.66 70.1 32.3200000000001M192.8 4.9Q203.76 1e-13 214.38 1e-13Q227.1800000000001 1e-13 239.0600000000001 5.52T260 21.44Q269.06 31.88 274.38 46.88Q279.98 62.2 280 81.5Q280 98.96 275.94 113.06A68 68 0 0 1 264.06 136.96A50.8 50.8 0 0 1 245.0000000000001 152.28A58 58 0 0 1 219.38 157.8Q207.5 157.8 195.94 152.6C188.44 149.12 182.4 144.62 175.94 139.1V220H140V3.68H175.94V16.08C181.94 10.1999999999999 185.24 8.6 191.38 5.6zM232.5 41.98Q222.2 29.1 206.88 29.12Q199.98 29.12 191.88 31.86C188.2 33.16 184.48 36.78 180.7 40.46Q178.34 42.78 175.94 44.92V110C187.6 121.24 198.86 128.7 209.68 128.7Q227.2 128.7 235 116.12Q242.8 103.56 242.8 80.9Q242.8 55.1600000000001 232.5 41.98M274.14 294.86A72 72 0 0 0 260 293.48V272.9200000000001H294.74V160H320V320H301.2Q300 312.68 295.96 307.6600000000001A31 31 0 0 0 286.4600000000001 299.42A40 40 0 0 0 274.14 294.86"}
                fillRule="evenodd"
                transform={`scale(0.05, -0.05) translate(${translation}, ${translation})`}
                style={style}
            />
        </SVGIconContainer>
   );
});
Endnote.displayName = `Blueprint6.Icon.Endnote`;
export default Endnote;
