import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import clsx from "clsx";
import CountCancelButton from "../CountCancelButton";
import "./style.scss";
import GetSvgIcon from "../GetSvgIcon";
const SearchFilterButton = ({ filterText = "Name", filterCount = 0, filterIcon = "industry", isFilterLoading = false, onClick, onCancelClick, dataCy, dataCyCancel, showAiIcon, isFilterHighlighted, isDisabled, }) => {
    const className = clsx({
        "searchFilterButton--Generic": true,
        "searchFilterButton--Selected": filterCount !== 0,
    });
    const filterTextClass = clsx({
        "searchFilterButton-FitlerDetails": true,
        filterHighlighted: isFilterHighlighted,
    });
    return (_jsxs("button", { className: className, onClick: onClick, "data-cy": dataCy, children: [_jsxs("span", { className: filterTextClass, children: [_jsx(GetSvgIcon, { iconType: filterIcon, iconSize: "18" }), filterText] }), filterCount !== 0 && (_jsxs("div", { className: "searchFilterButton-RigthIcon", children: [showAiIcon && isFilterLoading && (_jsx("span", { className: "searchFilterButton-FitlerDetails-SpinningPlus", children: _jsx(GetSvgIcon, { iconType: "boldPlus", iconSize: "18" }) })), _jsx(CountCancelButton, { count: filterCount, onClick: onCancelClick, dataCy: dataCyCancel, isDisabled: isDisabled })] }))] }));
};
export default SearchFilterButton;
