import React from "react";
import uuidv4 from "uuid-random";
import "./css/icon.css";
// Import all of the SVG icons
import { ReactComponent as AlwaysOnTopIcon } from "../../assets/icons/always-on-top.svg";
import { ReactComponent as Caret } from "../../assets/icons/caret.svg";
import { ReactComponent as CheckIcon } from "../../assets/icons/check.svg";
import { ReactComponent as CheckSquare } from "../../assets/icons/check-square.svg";
import { ReactComponent as ChevronDownIcon } from "../../assets/icons/chevron-down.svg";
import { ReactComponent as ChevronLeftIcon } from "../../assets/icons/chevron-left.svg";
import { ReactComponent as ChevronRightIcon } from "../../assets/icons/chevron-right.svg";
import { ReactComponent as ChevronUpIcon } from "../../assets/icons/chevron-up.svg";
import { ReactComponent as CloseIcon } from "../../assets/icons/close.svg";
import { ReactComponent as CancelIcon } from "../../assets/icons/cancel.svg";
import { ReactComponent as CodeBlockIcon } from "../../assets/icons/code-block.svg";
import { ReactComponent as CopyIcon } from "../../assets/icons/copy.svg";
import { ReactComponent as DocumentationIcon } from "../../assets/icons/documentation.svg";
import { ReactComponent as ExclamationCircleIcon } from "../../assets/icons/exclamation-circle.svg";
import { ReactComponent as ExternalLinkIcon } from "../../assets/icons/external-link.svg";
import { ReactComponent as FlagIcon } from "../../assets/icons/flag.svg";
import { ReactComponent as FolderIcon } from "../../assets/icons/folder.svg";
import { ReactComponent as FontIcon } from "../../assets/icons/font.svg";
import { ReactComponent as GearIcon } from "../../assets/icons/gear.svg";
import { ReactComponent as GlobeIcon } from "../../assets/icons/globe.svg";
import { ReactComponent as GridIcon } from "../../assets/icons/grid.svg";
import { ReactComponent as HDDIcon } from "../../assets/icons/hdd.svg";
import { ReactComponent as KeyIcon } from "../../assets/icons/key.svg";
import { ReactComponent as LifeRingIcon } from "../../assets/icons/life-ring.svg";
import { ReactComponent as LinkerIcon } from "../../assets/icons/linker.svg";
import { ReactComponent as LockIcon } from "../../assets/icons/lock.svg";
import { ReactComponent as MagicIcon } from "../../assets/icons/magic.svg";
import { ReactComponent as MaximizeIcon } from "../../assets/icons/maximize.svg";
import { ReactComponent as MinimizeIcon } from "../../assets/icons/minimize.svg";
import { ReactComponent as MoonIcon } from "../../assets/icons/moon.svg";
import { ReactComponent as PaintRollerIcon } from "../../assets/icons/paint-roller.svg";
// import { ReactComponent as PencilIcon } from "../../assets/icons/pencil.svg";
import { ReactComponent as PauseIcon } from "../../assets/icons/pause.svg";
import { ReactComponent as PlusIcon } from "../../assets/icons/plus.svg";
import { ReactComponent as ResumeIcon } from "../../assets/icons/resume.svg";
import { ReactComponent as SearchIcon } from "../../assets/icons/search.svg";
import { ReactComponent as ServerIcon } from "../../assets/icons/server.svg";
import { ReactComponent as SunIcon } from "../../assets/icons/sun.svg";
import { ReactComponent as TimesIcon } from "../../assets/icons/times.svg";
import { ReactComponent as ToolbarIcon } from "../../assets/icons/toolbar.svg";
import { ReactComponent as ToolsIcon } from "../../assets/icons/tools.svg";
// import { ReactComponent as TrashIcon } from "../../assets/icons/trash.svg";
import { ReactComponent as UploadIcon } from "../../assets/icons/upload.svg";
import { ReactComponent as WindowIcon } from "../../assets/icons/window.svg";
const TrashIcon = () => {
    /**
     * The clip path is used to generate a mask, which allows us to drive color changes to the SVG with CSS.
     * The SVG is referencing clip paths using an ID. If there are multiple instances of the same SVG,
     * and they were all using the same ID, you have a potential conflict between the clip paths.
     * For a specific example if all the ID's were the same:, if we have 2 trash icons on a page, and the
     * first icon is hidden, the second trash icon would also disappear.
     *
     * In order to protect against this, we generate a unique ID for each clip path.
     */
    const id = `clip${uuidv4()}`;
    return (React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
        React.createElement("g", { clipPath: `url(#${id})` },
            React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.08098 5.15763C0.492918 5.15763 0 4.69615 0 4.11318V3.12112C0 2.5493 0.481455 2.07667 1.08098 2.07667H14.9331C15.5453 2.07667 16.0347 2.56825 15.9981 3.12112V4.11318C15.9981 4.68501 15.5166 5.15763 14.9159 5.15763H14.525L13.3524 14.2032C13.2354 15.2331 12.3321 16 11.2592 16H4.73889C3.67969 16 2.78785 15.2309 2.64571 14.2121L1.47302 5.15763H1.08098ZM1.14632 4.04296H2.48408L3.78286 14.0672C3.84706 14.5309 4.25629 14.8843 4.73889 14.8843H11.2592C11.7521 14.8843 12.1613 14.5387 12.2141 14.0717L13.514 4.04184H14.8517V3.19023H1.14632V4.04296Z" }),
            React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.8397 12.4197C6.8397 12.744 6.56917 13.0049 6.22985 13.0049C5.89169 13.0049 5.62001 12.744 5.62001 12.4197V6.73039C5.62001 6.4049 5.89169 6.14407 6.22985 6.14407C6.56917 6.14407 6.8397 6.4049 6.8397 6.73039V12.4197ZM10.4128 12.4197C10.4128 12.744 10.1422 13.0049 9.80294 13.0049C9.46477 13.0049 9.1931 12.744 9.1931 12.4197V6.73039C9.1931 6.4049 9.46477 6.14407 9.80294 6.14407C10.1422 6.14407 10.4128 6.4049 10.4128 6.73039V12.4197ZM10.3108 0.488226C10.3108 0.211788 10.0735 0 9.80294 0H6.21381C5.92723 0 5.70599 0.227393 5.70599 0.488226V1.64191H10.3291V0.487112H10.3119L10.3108 0.488226Z" })),
        React.createElement("defs", null,
            React.createElement("clipPath", { id: id },
                React.createElement("rect", { width: "16", height: "16", fill: "white" })))));
};
const PencilIcon = () => {
    /**
     * The clip path is used to generate a mask, which allows us to drive color changes to the SVG with CSS.
     * The SVG is referencing clip paths using an ID. If there are multiple instances of the same SVG,
     * and they were all using the same ID, you have a potential conflict between the clip paths.
     * For a specific example if all the ID's were the same:, if we have 2 pencil icons on a page, and the
     * first icon is hidden, the second pencil icon would also disappear.
     *
     * In order to protect against this, we generate a unique ID for each clip path.
     */
    const id = `clip${uuidv4()}`;
    return (React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
        React.createElement("g", { clipPath: `url(#${id})` },
            React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.1331 0.865749C16.2897 2.02008 16.2897 3.90016 15.1331 5.05563L5.70073 14.4754C5.64359 14.5737 5.54987 14.6469 5.43672 14.6777L0.548523 15.9852C0.398802 16.0252 0.237654 15.9829 0.127935 15.8721C0.0170738 15.7623 -0.0252147 15.6023 0.0147869 15.4515L1.29941 10.6627C1.3017 10.5541 1.34513 10.4467 1.42627 10.3656L10.9375 0.865749C12.0941 -0.288583 13.9765 -0.288583 15.1331 0.865749ZM2.1623 11.8536L1.43542 14.5646L2.02744 14.4069L4.33039 13.7897L2.1623 11.8536ZM11.7455 1.67492L2.74061 10.6661L5.44358 13.1165L14.3251 4.24646C15.0348 3.53786 15.0348 2.38352 14.3251 1.67492C13.6153 0.965181 12.4564 0.965181 11.7455 1.67492Z" })),
        React.createElement("defs", null,
            React.createElement("clipPath", { id: id },
                React.createElement("rect", { width: "16", height: "16", fill: "white" })))));
};
const icons = {
    alwaysOnTop: AlwaysOnTopIcon,
    cancel: CancelIcon,
    caret: Caret,
    check: CheckIcon,
    "check-square": CheckSquare,
    "chevron-down": ChevronDownIcon,
    "chevron-left": ChevronLeftIcon,
    "chevron-right": ChevronRightIcon,
    "chevron-up": ChevronUpIcon,
    close: CloseIcon,
    "code-block": CodeBlockIcon,
    copy: CopyIcon,
    documentation: DocumentationIcon,
    "exclamation-circle": ExclamationCircleIcon,
    "external-link": ExternalLinkIcon,
    flag: FlagIcon,
    folder: FolderIcon,
    font: FontIcon,
    gear: GearIcon,
    globe: GlobeIcon,
    grid: GridIcon,
    hdd: HDDIcon,
    key: KeyIcon,
    "life-ring": LifeRingIcon,
    linker: LinkerIcon,
    lock: LockIcon,
    magic: MagicIcon,
    maximize: MaximizeIcon,
    minimize: MinimizeIcon,
    moon: MoonIcon,
    "paint-roller": PaintRollerIcon,
    pause: PauseIcon,
    pencil: PencilIcon,
    plus: PlusIcon,
    resume: ResumeIcon,
    search: SearchIcon,
    server: ServerIcon,
    sun: SunIcon,
    times: TimesIcon,
    toolbar: ToolbarIcon,
    tools: ToolsIcon,
    trash: TrashIcon,
    upload: UploadIcon,
    window: WindowIcon,
};
/**
 * Wrapper for the SVG-based icons. The wrapper ensures that icons are handled consistently.
 *
 * @param param
 * @param param.icon - The name of the icon to display
 * @param [param.onClick] - The click action for this icon
 * @param [param.className] - Any other classes you want to apply to the icon
 * @param [param.label] - (Accessibility) The label you want to apply for screen reader users. Always include a label UNLESS the icon is decorative.
 * @returns Wrapped icon component
 */
export const FinsembleIcon = ({ icon, onClick = () => { }, className = "", label = "" }) => {
    const Icon = icons[icon];
    return (React.createElement("span", { className: ["finsemble-icon", `finsemble-icon-${icon}`, className].join(" "), ...(label
            ? {
                role: "img",
                "aria-label": label,
            }
            : {}), onClick: onClick }, Icon && React.createElement(Icon, null)));
};
//# sourceMappingURL=FinsembleIcon.js.map