"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.setTagSuggestions = exports.setTagInput = exports.setPendingDeletionTagAssociations = exports.setPendingAdditionTagAssociations = exports.removeTagAssociation = exports.removePendingDeletionTagAssociation = exports.removePendingAdditionTagAssociation = exports.addTagAssociation = void 0;

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

var addTagAssociation = function addTagAssociation(entityType, entityId, tagAssociation) {
  return {
    type: _constants.ADD_TAG_ASSOCIATION,
    payload: {
      entityType: entityType,
      entityId: entityId,
      tagAssociation: tagAssociation
    }
  };
};

exports.addTagAssociation = addTagAssociation;

var removePendingAdditionTagAssociation = function removePendingAdditionTagAssociation(entityType, entityId, tagValue) {
  return {
    type: _constants.REMOVE_PENDING_ADDITION_TAG_ASSOCIATION,
    payload: {
      entityType: entityType,
      entityId: entityId,
      tagValue: tagValue
    }
  };
};

exports.removePendingAdditionTagAssociation = removePendingAdditionTagAssociation;

var removePendingDeletionTagAssociation = function removePendingDeletionTagAssociation(entityType, entityId, tagAssociationId) {
  return {
    type: _constants.REMOVE_PENDING_DELETION_TAG_ASSOCIATION,
    payload: {
      entityType: entityType,
      entityId: entityId,
      tagAssociationId: tagAssociationId
    }
  };
};

exports.removePendingDeletionTagAssociation = removePendingDeletionTagAssociation;

var removeTagAssociation = function removeTagAssociation(entityType, entityId, tagAssociationId) {
  return {
    type: _constants.REMOVE_TAG_ASSOCIATION,
    payload: {
      entityType: entityType,
      entityId: entityId,
      tagAssociationId: tagAssociationId
    }
  };
};

exports.removeTagAssociation = removeTagAssociation;

var setPendingAdditionTagAssociations = function setPendingAdditionTagAssociations(entityType, entityId, tags) {
  return {
    type: _constants.SET_PENDING_ADDITION_TAG_ASSOCIATIONS,
    payload: {
      entityType: entityType,
      entityId: entityId,
      tags: tags
    }
  };
};

exports.setPendingAdditionTagAssociations = setPendingAdditionTagAssociations;

var setPendingDeletionTagAssociations = function setPendingDeletionTagAssociations(entityType, entityId, tags) {
  return {
    type: _constants.SET_PENDING_DELETION_TAG_ASSOCIATIONS,
    payload: {
      entityType: entityType,
      entityId: entityId,
      tags: tags
    }
  };
};

exports.setPendingDeletionTagAssociations = setPendingDeletionTagAssociations;

var setTagInput = function setTagInput(entityType, entityId, tagInput) {
  return {
    type: _constants.SET_TAG_INPUT,
    payload: {
      entityType: entityType,
      entityId: entityId,
      tagInput: tagInput
    }
  };
};

exports.setTagInput = setTagInput;

var setTagSuggestions = function setTagSuggestions(entityType, entityId, tags, text) {
  return {
    type: _constants.SET_TAG_SUGGESTIONS,
    payload: {
      entityType: entityType,
      entityId: entityId,
      tags: tags,
      text: text
    }
  };
};

exports.setTagSuggestions = setTagSuggestions;