import FactoryRenderer from "../../../../Renderer";

type AdvancedSearchViewProps = {
  handlePopupShow: () => void;
  disabled: boolean;
  hasAppliedFilter?: boolean;
};

const AdvancedSearchView = ({
  handlePopupShow,
  disabled,
  hasAppliedFilter,
}: AdvancedSearchViewProps) => {
  return (
    <FactoryRenderer
      onClick={handlePopupShow}
      title="Advanced Search"
      rootStyle={{ className: "tmpl-advanced-search" }}
      widgetStyle={{ className: `qo-btn qo-btn-default qo-btn-md tmpl-button ${hasAppliedFilter ? "tmpl-filter-applied" : ""}` }}
      uiElementType="WIDGET"
      widgetType="BUTTON"
      disabled={disabled}
    />
  );
};

export default AdvancedSearchView;
