import { isRawFilter , RawFilter } from '@empathyco/x-types' ; import { Store } from 'vuex' ; import { FilterEntity } from './types' ; /**
 * Allows selecting and deselecting a filter of  {@link @empathyco/x-types#RawFilter | RawFilter} .
 *
 *  internal export class RawFilterEntity implements FilterEntity { public static accepts = isRawFilter ; public constructor ( protected store ) { } /**
     * It deselects the  {@link @empathyco/x-types#RawFilter | RawFilter} .
     *
     *  param filter remarks As the  {@link @empathyco/x-types#RawFilter.selected} is always true,
     * the deselection just removes the filter from the store.
      deselect ( filter ) { this . store . commit ( 'x/facets/removeFilter' , filter ) ; } /**
     * It selects the  {@link @empathyco/x-types#RawFilter | RawFilter} .
     *
     *  param filter remarks As the  {@link @empathyco/x-types#RawFilter.selected} is always true,
     * there is no need to set this property.
      select ( filter ) { this . store . commit ( 'x/facets/setFilter' , filter ) ; } }