import { FILTER_COMPONENTS_NAMES } from '../constants';

import FilterSuggester from '@/modules/editorial/editorialSearchFilter/filterSuggester/component/filterSuggester';
import FilterDatePicker from '../filterDatePicker/filterDatePicker';
import FilterSelector from '../filterSelector';
import FilterTimePicker from '../filterTimePicker';

const FILTER_COMPONENTS = {
  [FILTER_COMPONENTS_NAMES.FilterTimePicker]: FilterTimePicker,
  [FILTER_COMPONENTS_NAMES.FilterSelector]: FilterSelector,
  [FILTER_COMPONENTS_NAMES.FilterDatePicker]: FilterDatePicker,
  [FILTER_COMPONENTS_NAMES.FilterSuggester]: FilterSuggester,
};

const getFilterComponent = (componentName) => FILTER_COMPONENTS[componentName];

export default getFilterComponent;
