'use strict';

function createRef() {
  const func = (node) => {
    func.current = node;
  };
  return func;
}
function fillRef(ref, node) {
  if (typeof ref === "function")
    ref(node);
  else if (typeof ref === "object" && ref && "current" in ref)
    ref.current = node;
}
function composeRef(...refs) {
  return (node) => {
    refs.forEach((ref) => {
      fillRef(ref, node);
    });
  };
}

exports.composeRef = composeRef;
exports.createRef = createRef;
exports.fillRef = fillRef;
//# sourceMappingURL=createRef.cjs.map
