import { logFacetDeselect, logFacetSelect, } from './facet-set-insight-analytics-actions.js';
export const isFacetValueSelected = (value) => {
    return value.state === 'selected';
};
export const getInsightAnalyticsActionForToggleFacetSelect = (facetId, selection) => {
    const payload = {
        facetId: facetId,
        facetValue: selection.value,
    };
    return isFacetValueSelected(selection)
        ? logFacetDeselect(payload)
        : logFacetSelect(payload);
};
