import { useState as n, useCallback as t } from "react";
function f(s = 0) {
  let [e, l] = n(s), F = t((a) => l(a), [e]), o = t((a) => l((g) => g | a), [e]), r = t((a) => (e & a) === a, [e]), u = t((a) => l((g) => g & ~a), [l]), m = t((a) => l((g) => g ^ a), [l]);
  return { flags: e, setFlag: F, addFlag: o, hasFlag: r, removeFlag: u, toggleFlag: m };
}
export {
  f as useFlags
};
