import type { CollectionState, FiltersMap, OptionalFiltersMap, SchemaSource, } from '@wix/bex-core'; import { useCollection as useOpenCollection } from '@wix/bex-core/react'; import { schemaCollectionConfig, type SchemaCollectionOptions, } from './schemaCollectionOptions'; /** * A bare collection driven by a schema source — data half only. For the fields * UI (columns, filters, field management) use a component hook from this entry * (`useTableCollection`, `useLayoutSwitchCollection`, …). */ export const useCollection = ( source: SchemaSource, options?: SchemaCollectionOptions, ): CollectionState => useOpenCollection(schemaCollectionConfig(source, options));