"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const React = require("react");
const AppContext = require("./AppContext.js");
const signalsReact = require("@preact/signals-react");
const cos = signalsReact.signal();
const cosConfig = cos.value;
const useAppState = (initialOpts) => {
  const contextApp = React.useContext(AppContext);
  const client = contextApp || initialOpts;
  if (client.cosConfig) {
    cos.value = client.cosConfig;
  }
  return {
    ...client
  };
};
exports.cosConfig = cosConfig;
exports.default = useAppState;
exports.useAppState = useAppState;
//# sourceMappingURL=useAppState.js.map
