"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.startEdit = startEdit;
exports.endEdit = endEdit;
exports.toggleEditing = toggleEditing;

var _constants = require("@instructure/quiz-common/lib/constants");

function startEdit(uniqueComponentKey) {
  var initialFocusId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  return {
    type: _constants.START_EDIT,
    componentId: uniqueComponentKey,
    initialFocusId: initialFocusId
  };
}

function endEdit(uniqueComponentKey) {
  return {
    type: _constants.END_EDIT,
    componentId: uniqueComponentKey
  };
}

function toggleEditing(uniqueComponentKey) {
  return {
    type: _constants.TOGGLE_EDIT,
    componentId: uniqueComponentKey
  };
}