var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
import React from "react";
import { CaretRightIcon } from "@phosphor-icons/react";
import { ColorIcon } from "@local-logic/design-system";
import * as styles from "./styles";
export function ItemButton(_a) {
    var { text, isDisabled, isCollapsed = false, isActive = false, icon: { element: Icon, backgroundColor = "gray", fillColor = "black" }, onClick } = _a, rest = __rest(_a, ["text", "isDisabled", "isCollapsed", "isActive", "icon", "onClick"]);
    return (React.createElement("button", Object.assign({ className: styles.container, disabled: isDisabled, "aria-label": text, onClick: onClick, "data-background-color": backgroundColor, "data-fill-color": fillColor, "data-is-collapsed": isCollapsed, "data-is-active": isActive, style: {
            "--item-button-background": backgroundColor,
            "--item-button-fill": fillColor,
        } }, rest),
        React.createElement(ColorIcon, { element: Icon, backgroundColor: backgroundColor, fillColor: fillColor }),
        React.createElement("span", { className: styles.text }, text),
        React.createElement(CaretRightIcon, { className: styles.arrow, weight: "bold", size: 12, "aria-hidden": "true" })));
}
//# sourceMappingURL=index.js.map