import React from 'react';
import i18n from 'ui-i18n';
import IconButton from '@mui/material/IconButton';
import CloseIcon from '@mui/icons-material/Close';
import Tooltip from '@mui/material/Tooltip';
import FilterIcon from '../icons/Filter';
import { useStyles } from './styles';
export var FilterButton = function (_a) {
    var enabled = _a.enabled, onClick = _a.onClick;
    var styles = useStyles();
    return (React.createElement(Tooltip, { title: enabled ? i18n.text('Clear all filters') : i18n.text('Filter') },
        React.createElement(IconButton, { onClick: onClick, classes: { root: styles.button }, size: "large" }, enabled ? (React.createElement(React.Fragment, null,
            React.createElement(FilterIcon, { "data-reltio-id": "enabled-filter-icon", className: styles.enabled }),
            React.createElement(CloseIcon, { "data-reltio-id": "close-icon", color: "primary", className: styles.closeIcon }))) : (React.createElement(FilterIcon, { "data-reltio-id": "filter-icon" })))));
};
