/* eslint-disable @typescript-eslint/no-explicit-any */
import FactoryRenderer from "../../../../Renderer";

export type QuickFilterViewProps = {
  disabled: boolean;
  onPopupToggle: () => void;
  hasAppliedFilter?: boolean;
};

const QuickFilterView = (props: QuickFilterViewProps) => {
  return (
    <FactoryRenderer
      onClick={props.onPopupToggle}
      rootStyle={{ className: "tmpl-quick-filter", inline: { width: "32px" } }}
      widgetStyle={{ className: `qo-btn qo-btn-default tmpl-button ${props.hasAppliedFilter ? "tmpl-filter-applied" : ""}`, inline: { width: "100%" } }}
      uiElementType="WIDGET"
      widgetType="ICON"
      name="filter"
      fillMode=""
      disabled={props.disabled}
      title="Quick Filter"
    />
  );
};
export default QuickFilterView;
