import { setTime as C } from "../utils/timeUtil.mjs";
function F(e) {
  var S = e.value, n = e.generateConfig, v = e.disabledMinutes, c = e.disabledSeconds, T = e.minutes, D = e.seconds, H = e.use12Hours, M = function(p, r, m, g) {
    var u = n.getNow(), d = S || u, w = !H || !p ? r : r + 12, a = r < 0 ? n.getHour(u) : w, i = m < 0 ? n.getMinute(u) : m, l = g < 0 ? n.getSecond(u) : g, s = v && v(a);
    if (s != null && s.includes(i)) {
      var f = T.find(function(o) {
        return !s.includes(o.value);
      });
      if (f)
        i = f.value;
      else
        return null;
    }
    var t = c && c(a, i);
    if (t != null && t.includes(l)) {
      var b = D.find(function(o) {
        return !t.includes(o.value);
      });
      if (b)
        l = b.value;
      else
        return null;
    }
    return d = C(n, d, a, i, l), d;
  };
  return M;
}
export {
  F as default
};
