"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useLodesStoreState = exports.useLodeActions = exports.lodeActions = exports.lodesSlice = exports.defaultLodesState = void 0;

var _redux = require("@looker/redux");

var _toolkit = require("@reduxjs/toolkit");

var _sagas = require("./sagas");

var defaultLodesState = {
  examples: undefined,
  declarations: undefined
};
exports.defaultLodesState = defaultLodesState;
var lodesSlice = (0, _toolkit.createSlice)({
  name: 'lodes',
  initialState: defaultLodesState,
  reducers: {
    initLodesAction(_state, _action) {},

    initLodesSuccessAction(state, action) {
      state.examples = action.payload.examples;
      state.declarations = action.payload.declarations;
    },

    initLodesFailureAction(state, action) {
      state.error = action.payload;
    }

  }
});
exports.lodesSlice = lodesSlice;
var lodeActions = lodesSlice.actions;
exports.lodeActions = lodeActions;
var {
  useActions: useLodeActions,
  useStoreState: useLodesStoreState
} = (0, _redux.createSliceHooks)(lodesSlice, _sagas.saga);
exports.useLodesStoreState = useLodesStoreState;
exports.useLodeActions = useLodeActions;
//# sourceMappingURL=slice.js.map