import filterActionColumnByDevice from "./filterActionColumnByDevice";
export default function hasRowAction(props, withoutEdit) {
  var actionHidden = props.actionHidden,
    actionColumn = props.actionColumn,
    device = props.device;
  if (actionHidden) {
    return false;
  }
  if (actionColumn && actionColumn.length) {
    var actionColumnFilter = filterActionColumnByDevice(actionColumn, device);
    if (withoutEdit) {
      actionColumnFilter = actionColumnFilter.filter(function (action) {
        return action.mode !== "EDIT";
      });
    }
    return !!(actionColumnFilter && actionColumnFilter.length);
  } else {
    return false;
  }
}