import { privateApis as routerPrivateApis } from "@wordpress/router";
import { useCallback } from "@wordpress/element";
import { unlock } from "../../lock-unlock";
const { useHistory } = unlock(routerPrivateApis);
function useNavigateToEntityRecord() {
  const history = useHistory();
  const onNavigateToEntityRecord = useCallback(
    (params) => {
      history.navigate(
        `/${params.postType}/${params.postId}?canvas=edit&focusMode=true`
      );
    },
    [history]
  );
  return onNavigateToEntityRecord;
}
export {
  useNavigateToEntityRecord as default
};
//# sourceMappingURL=use-navigate-to-entity-record.js.map
