import {
  FilterType
} from "../../../../generated/ru/micord/ervu/account_applications/component/property/grid/FilterType";
import {DateFilter, NumberFilter, TextFilter} from "ag-grid-community";
import {CheckboxMultiSelectFilterComp} from "./CheckboxMultiSelectFilterComp";


export class CustomGridColumnFilterUtils {

  public static columnFilter(type: FilterType) {
    if (!type) {
      return null;
    }

    switch (type) {
      case FilterType.NUMBER:
        return NumberFilter;
      case FilterType.DATE:
        return DateFilter;
      case FilterType.SET:
        return CheckboxMultiSelectFilterComp;
      case FilterType.TEXT:
      default:
        return TextFilter;
    }
  }
}
