"use strict";

exports.__esModule = true;
exports.useEntityPage = useEntityPage;
var _react = require("react");
var _state = require("../state");
var _react2 = require("@wix/bex-core/react");
var _WixPatternsRouterProvider = require("../providers/WixPatternsRouterProvider");
function useEntityPage(props) {
  const container = (0, _react2.useWixPatternsContainer)();
  const routerState = (0, _WixPatternsRouterProvider.useWixPatternsRouter)();
  const [state] = (0, _react.useState)(() => {
    return new _state.EntityPageState({
      container,
      routerState,
      ...props
    });
  });
  return state;
}
//# sourceMappingURL=useEntityPage.js.map