"use strict";

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