"use strict";

exports.__esModule = true;
exports["default"] = filterActionColumnByDevice;
function filterActionColumnByDevice(actionColumn, device) {
  if (actionColumn === void 0) {
    actionColumn = [];
  }
  return actionColumn.filter(function (action) {
    var actionDevice = action.device;
    if (device && actionDevice) {
      if (!Array.isArray(actionDevice)) {
        actionDevice = [actionDevice];
      }
      return actionDevice.includes(device);
    } else {
      return true;
    }
  });
}