"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CountToggle = void 0;
const react_1 = __importDefault(require("react"));
const Tooltip_1 = require("../tooltip/Tooltip");
const Button_1 = require("../button/Button");
const CountToggle = ({ label, icon, disabled, tooltip, toggleClick, clicked, count, }) => {
    const toggleButton = (react_1.default.createElement("span", { className: "toggle-counter" },
        react_1.default.createElement(Button_1.Button, { className: clicked ? "toggle-btn active" : "toggle-btn", iconSize: "12px", icon: "fa " + icon, onClick: toggleClick, label: label },
            react_1.default.createElement("span", { className: "count-span" }, count))));
    const disabledToggleButton = (react_1.default.createElement("span", { className: "toggle-counter disabled" },
        react_1.default.createElement(Button_1.Button, { className: clicked ? "toggle-btn active" : "toggle-btn", iconSize: "12px", icon: "fa " + icon, onClick: toggleClick, label: label },
            react_1.default.createElement("span", { className: "count-span" }, count))));
    const button = disabled ? disabledToggleButton : toggleButton;
    return (react_1.default.createElement(react_1.default.Fragment, null,
        react_1.default.createElement("div", { className: "toggle-counter-wrap" }, tooltip
            ? (react_1.default.createElement(Tooltip_1.Tooltip, { flow: "up", tooltip: tooltip }, button))
            : button)));
};
exports.CountToggle = CountToggle;
