"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToggleButton = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const styles_1 = require("./styles");
const useLogic_1 = require("./useLogic");
exports.ToggleButton = (0, react_1.forwardRef)((props, ref) => {
    const { isVisibleCounter, children, disabled, counterLabel, color, selected, restProps, variant, } = (0, useLogic_1.useLogic)(props);
    return ((0, jsx_runtime_1.jsxs)(styles_1.StyledToggleButton, { ref: ref, disabled: disabled, selected: selected, ...restProps, "$color": color, "$variant": variant, children: [children, isVisibleCounter && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [" \u00B7 ", counterLabel] })] }));
});
