/**
 * Builds the parameters object disable one or multiple controls.
 */
const disableControls = function () {
  let controls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  return Object.fromEntries(controls.map(control => [control, {
    control: {
      disable: true
    }
  }]));
};
const getA11yParameters = function () {
  let {
    skipRules = [],
    temporarySkipRules = []
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  const skippedRules = skipRules.concat(temporarySkipRules).map(id => ({
    id,
    enabled: false
  }));
  return {
    config: {
      rules: skippedRules
    }
  };
};

export { disableControls, getA11yParameters };
