import { Store } from 'vuex' ; import { Facet , FacetModelName } from '@empathyco/x-types' ; import { RootXStoreState } from '../../../store/store.types' ; /**
 * Adds an  Facet to the store in case it doesn't exist for the passed facetId.
 *
 *  param store - The  https .
 *  param facetId param facetModelName - The  FacetModelName for  the Facet that will be created.
 *  internal export function addFacetIfNotPresent ( store , facetId , facetModelName ) { if ( ! store . state . x . facets . facets [ facetId ] ) { store . commit ( 'x/facets/setFacet' , { modelName : facetModelName , id : facetId , label : facetId } as Omit < Facet , 'filters' > ) ; } }