import type { CheckboxFacet, ColorFacet, Facet, RangeFacet, SizeFacet, TextFacet } from '../models/mod.ts'; /** Will return `true` if the provided facet is a text facet */ export const isTextFacet = (facet: Facet): facet is TextFacet => facet.type === 'TEXT'; /** Will return `true` if the provided facet is a color facet */ export const isColorFacet = (facet: Facet): facet is ColorFacet => facet.type === 'COLOR'; /** Will return `true` if the provided facet is a range facet */ export const isRangeFacet = (facet: Facet): facet is RangeFacet => facet.type === 'RANGE'; /** Will return `true` if the provided facet is a size facet */ export const isSizeFacet = (facet: Facet): facet is SizeFacet => facet.type === 'SIZE'; /** Will return `true` if the provided facet is a checkbox facet */ export const isCheckboxFacet = (facet: Facet): facet is CheckboxFacet => facet.type === 'CHECKBOX';