import { struct as f } from "../../../utils/struct/main.js";
import { enumerable as o, getter as l } from "../../../utils/struct/property.js";
import { noop as u } from "../../../utils/common.js";
const a = () => {
  let t, s, r;
  const m = () => {
    const e = r ?? u, c = new Promise((i, p) => {
      r = i, s = p;
    });
    return e(t = c), n;
  }, n = f({
    promise: l(() => t),
    refresh: o(m),
    reject: o((e) => s(e)),
    resolve: o((e) => r(e))
  });
  return m();
};
export {
  a as createDeferred
};
