import React from "react";
import { Tooltip } from "../tooltip/Tooltip";
import { Button } from "../button/Button";
export const CountToggle = ({ label, icon, disabled, tooltip, toggleClick, clicked, count, }) => {
    const toggleButton = (React.createElement("span", { className: "toggle-counter" },
        React.createElement(Button, { className: clicked ? "toggle-btn active" : "toggle-btn", iconSize: "12px", icon: "fa " + icon, onClick: toggleClick, label: label },
            React.createElement("span", { className: "count-span" }, count))));
    const disabledToggleButton = (React.createElement("span", { className: "toggle-counter disabled" },
        React.createElement(Button, { className: clicked ? "toggle-btn active" : "toggle-btn", iconSize: "12px", icon: "fa " + icon, onClick: toggleClick, label: label },
            React.createElement("span", { className: "count-span" }, count))));
    const button = disabled ? disabledToggleButton : toggleButton;
    return (React.createElement(React.Fragment, null,
        React.createElement("div", { className: "toggle-counter-wrap" }, tooltip
            ? (React.createElement(Tooltip, { flow: "up", tooltip: tooltip }, button))
            : button)));
};
