"use strict";
Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.default = _default, exports.COMPANY_EIDT_SPERIOR_LIST_ERROR = exports.COMPANY_EIDT_SPERIOR_LIST_SUCCESS = exports.COMPANY_EIDT_SPERIOR_LIST = exports.COMPANY_SUPERIOR_LIST_ERROR = exports.COMPANY_SUPERIOR_LIST_SUCCESS = exports.COMPANY_SUPERIOR_LIST = exports.COMPANY_ALL_LIST_ERROR = exports.COMPANY_ALL_LIST_SUCCESS = exports.COMPANY_ALL_LIST = exports.COMPANY_INFO_ERROR = exports.COMPANY_INFO_SUCCESS = exports.COMPANY_INFO = exports.COMPANY_EDIT_ERROR = exports.COMPANY_EDIT_SUCCESS = exports.COMPANY_EDIT = exports.COMPANY_ADD_ERROR = exports.COMPANY_ADD_SUCCESS = exports.COMPANY_ADD = exports.COMPANY_DEL_ERROR = exports.COMPANY_DEL_SUCCESS = exports.COMPANY_DEL = exports.COMPANY_LEVELS_ERROR = exports.COMPANY_LEVELS_SUCCESS = exports.COMPANY_LEVELS = exports.COMPANY_TABLE_INFOS_ERROR = exports.COMPANY_TABLE_INFOS_SUCCESS = exports.COMPANY_TABLE_INFOS = void 0;
var _actionCreator = _interopRequireDefault(require("amos-processor/lib/redux/actionCreator")),
  _urlFormat = _interopRequireDefault(require("amos-processor/lib/utils/urlFormat"));

function _interopRequireDefault(_) {
  return _ && _.__esModule ? _ : {
    default: _
  }
}
var COMPANY_TABLE_INFOS = "COMPANY_TABLE_INFOS";
exports.COMPANY_TABLE_INFOS = COMPANY_TABLE_INFOS;
var COMPANY_TABLE_INFOS_SUCCESS = "COMPANY_TABLE_INFOS_SUCCESS";
exports.COMPANY_TABLE_INFOS_SUCCESS = COMPANY_TABLE_INFOS_SUCCESS;
var COMPANY_TABLE_INFOS_ERROR = "COMPANY_TABLE_INFOS_ERROR";
exports.COMPANY_TABLE_INFOS_ERROR = COMPANY_TABLE_INFOS_ERROR;
var COMPANY_LEVELS = "COMPANY_LEVELS";
exports.COMPANY_LEVELS = COMPANY_LEVELS;
var COMPANY_LEVELS_SUCCESS = "COMPANY_LEVELS_SUCCESS";
exports.COMPANY_LEVELS_SUCCESS = COMPANY_LEVELS_SUCCESS;
var COMPANY_LEVELS_ERROR = "COMPANY_LEVELS_ERROR";
exports.COMPANY_LEVELS_ERROR = COMPANY_LEVELS_ERROR;
var COMPANY_DEL = "COMPANY_DEL";
exports.COMPANY_DEL = COMPANY_DEL;
var COMPANY_DEL_SUCCESS = "COMPANY_DEL_SUCCESS";
exports.COMPANY_DEL_SUCCESS = COMPANY_DEL_SUCCESS;
var COMPANY_DEL_ERROR = "COMPANY_DEL_ERROR";
exports.COMPANY_DEL_ERROR = COMPANY_DEL_ERROR;
var COMPANY_ADD = "COMPANY_ADD";
exports.COMPANY_ADD = COMPANY_ADD;
var COMPANY_ADD_SUCCESS = "COMPANY_ADD_SUCCESS";
exports.COMPANY_ADD_SUCCESS = COMPANY_ADD_SUCCESS;
var COMPANY_ADD_ERROR = "COMPANY_ADD_ERROR";
exports.COMPANY_ADD_ERROR = COMPANY_ADD_ERROR;
var COMPANY_EDIT = "COMPANY_EDIT";
exports.COMPANY_EDIT = COMPANY_EDIT;
var COMPANY_EDIT_SUCCESS = "COMPANY_EDIT_SUCCESS";
exports.COMPANY_EDIT_SUCCESS = COMPANY_EDIT_SUCCESS;
var COMPANY_EDIT_ERROR = "COMPANY_EDIT_ERROR";
exports.COMPANY_EDIT_ERROR = COMPANY_EDIT_ERROR;
var COMPANY_INFO = "COMPANY_INFO";
exports.COMPANY_INFO = COMPANY_INFO;
var COMPANY_INFO_SUCCESS = "COMPANY_INFO_SUCCESS";
exports.COMPANY_INFO_SUCCESS = COMPANY_INFO_SUCCESS;
var COMPANY_INFO_ERROR = "COMPANY_INFO_ERROR";
exports.COMPANY_INFO_ERROR = COMPANY_INFO_ERROR;
var COMPANY_ALL_LIST = "COMPANY_ALL_LIST";
exports.COMPANY_ALL_LIST = COMPANY_ALL_LIST;
var COMPANY_ALL_LIST_SUCCESS = "COMPANY_ALL_LIST_SUCCESS";
exports.COMPANY_ALL_LIST_SUCCESS = COMPANY_ALL_LIST_SUCCESS;
var COMPANY_ALL_LIST_ERROR = "COMPANY_ALL_LIST_ERROR";
exports.COMPANY_ALL_LIST_ERROR = COMPANY_ALL_LIST_ERROR;
var COMPANY_SUPERIOR_LIST = "COMPANY_SUPERIOR_LIST";
exports.COMPANY_SUPERIOR_LIST = COMPANY_SUPERIOR_LIST;
var COMPANY_SUPERIOR_LIST_SUCCESS = "COMPANY_SUPERIOR_LIST_SUCCESS";
exports.COMPANY_SUPERIOR_LIST_SUCCESS = COMPANY_SUPERIOR_LIST_SUCCESS;
var COMPANY_SUPERIOR_LIST_ERROR = "COMPANY_SUPERIOR_LIST_ERROR";
exports.COMPANY_SUPERIOR_LIST_ERROR = COMPANY_SUPERIOR_LIST_ERROR;
var COMPANY_EIDT_SPERIOR_LIST = "COMPANY_EIDT_SPERIOR_LIST";
exports.COMPANY_EIDT_SPERIOR_LIST = COMPANY_EIDT_SPERIOR_LIST;
var COMPANY_EIDT_SPERIOR_LIST_SUCCESS = "COMPANY_EIDT_SPERIOR_LIST_SUCCESS";
exports.COMPANY_EIDT_SPERIOR_LIST_SUCCESS = COMPANY_EIDT_SPERIOR_LIST_SUCCESS;
var COMPANY_EIDT_SPERIOR_LIST_ERROR = "COMPANY_EIDT_SPERIOR_LIST_ERROR";

function _default(_) {
  var O = completeSecurityUrl(_);
  return {
    companyLevelsAction: function() {
      return (0, _actionCreator.default)({
        type: COMPANY_LEVELS,
        method: "get",
        url: O.companyLevels
      })
    },
    companyTableAction: function() {
      return (0, _actionCreator.default)({
        type: COMPANY_TABLE_INFOS,
        method: "get",
        url: O.companyInfos
      })
    },
    superiorUnitAction: function() {
      return (0, _actionCreator.default)({
        type: COMPANY_SUPERIOR_LIST,
        method: "get",
        url: O.superiorUnitUrl
      })
    },
    superiorUnitEditAction: function(_) {
      return (0, _actionCreator.default)({
        type: COMPANY_EIDT_SPERIOR_LIST,
        method: "get",
        url: (0, _urlFormat.default)(O.superiorUnitEditUrl, {
          id: _
        })
      })
    },
    companyInfoAction: function(_) {
      return (0, _actionCreator.default)({
        type: COMPANY_INFO,
        method: "get",
        url: (0, _urlFormat.default)(O.getCompanyById, {
          id: _
        })
      })
    },
    companyDelAction: function(_) {
      return (0, _actionCreator.default)({
        type: COMPANY_DEL,
        method: "del",
        url: "".concat(O.delCompany, "?ids=").concat(_)
      })
    },
    companyAddAction: function(_) {
      return (0, _actionCreator.default)({
        type: COMPANY_ADD,
        method: "put",
        url: O.addCompany,
        data: _
      })
    },
    companyEditAction: function(_) {
      return (0, _actionCreator.default)({
        type: COMPANY_EDIT,
        method: "put",
        url: O.editCompany,
        data: _
      })
    }
  }
}
exports.COMPANY_EIDT_SPERIOR_LIST_ERROR = COMPANY_EIDT_SPERIOR_LIST_ERROR;
