const singleOpenStrategy = ({ id, value, opened, parents }) => {
  if (value) {
    const newOpened = /* @__PURE__ */ new Set();
    newOpened.add(id);
    let parent = parents.get(id);
    while (parent != null) {
      newOpened.add(parent);
      parent = parents.get(parent);
    }
    return newOpened;
  } else {
    opened.delete(id);
    return opened;
  }
};
export {
  singleOpenStrategy
};
//# sourceMappingURL=singleOpenStrategy.mjs.map
