"use strict";

exports.__esModule = true;
exports.useTableGridSwitchCollection = void 0;
var _react = require("@wix/bex-core/react");
var _TableGridSwitchState = require("../state/TableGridSwitchState");
exports.TableGridSwitchState = _TableGridSwitchState.TableGridSwitchState;
var _useOptionalCachedState = require("./useOptionalCachedState");
const useTableGridSwitchCollection = config => {
  const container = (0, _react.useWixPatternsContainer)();
  const containerOverrides = (0, _react.useWixPatternsContainerOverrides)();
  const createCollection = (0, _react.useCreateCollection)();
  const state = (0, _useOptionalCachedState.useOptionalCachedState)(() => new _TableGridSwitchState.TableGridSwitchState({
    collection: createCollection(config),
    container,
    containerOverrides
  }));
  return state;
};
exports.useTableGridSwitchCollection = useTableGridSwitchCollection;
//# sourceMappingURL=useTableGridSwitchCollection.js.map