"use strict";
const delegateBoolean = (fn, callback) => {
  let promise = fn();
  let result = false;
  if (promise instanceof Promise) {
    promise.then((res) => {
      result = true;
    }).catch((err) => {
      result = false;
    }).finally(() => {
      if (callback) {
        callback(result);
      }
    });
  } else {
    result = promise;
    if (callback) {
      callback(result);
    }
  }
};

export { delegateBoolean };
//# sourceMappingURL=utils.mjs.map
