text: "use strict";
  
  exports.__esModule = true;
  exports.queryActions = exports.resetGraphQLRunner = exports.assignDirtyQueries = exports.flushPageData = void 0;
  
  var _xstate = require("xstate");
  
  var _graphqlRunner = require("../../query/graphql-runner");
  
  var _assertStore = require("../../utils/assert-store");
  
  var _pageData = require("../../utils/page-data");
  
  const flushPageData = () => {
    (0, _pageData.enqueueFlush)();
  };
  
  exports.flushPageData = flushPageData;
  const assignDirtyQueries = (0, _xstate.assign)((_context, {
    data
  }) => {
    const {
      queryIds
    } = data;
    return {
      filesDirty: false,
      queryIds
    };
  });
  exports.assignDirtyQueries = assignDirtyQueries;
  const resetGraphQLRunner = (0, _xstate.assign)({
    graphqlRunner: ({
      store,
      program
    }) => {
      (0, _assertStore.assertStore)(store);
      return new _graphqlRunner.GraphQLRunner(store, {
        collectStats: true,
        graphqlTracing: program === null || program === void 0 ? void 0 : program.graphqlTracing
      });
    }
  });
  exports.resetGraphQLRunner = resetGraphQLRunner;
  const queryActions = {
    resetGraphQLRunner,
    assignDirtyQueries,
    flushPageData
  };
  exports.queryActions = queryActions;
  //# sourceMappingURL=actions.js.map