import { useWixPatternsContainer, useWixPatternsContainerOverrides, useCreateCollection, } from '@wix/bex-core/react';
import { TableGridSwitchState } from '../state/TableGridSwitchState';
import { useOptionalCachedState } from './useOptionalCachedState';
export { TableGridSwitchState } from '../state/TableGridSwitchState';
export const useTableGridSwitchCollection = (config) => {
    const container = useWixPatternsContainer();
    const containerOverrides = useWixPatternsContainerOverrides();
    const createCollection = useCreateCollection();
    const state = useOptionalCachedState(() => new TableGridSwitchState({
        collection: createCollection(config),
        container,
        containerOverrides,
    }));
    return state;
};
//# sourceMappingURL=useTableGridSwitchCollection.js.map