"use client";
import { useMemo } from "react";
import {
  canInviteMembers,
  canSwitchTeams,
  canCreateTeams
} from "../lib/teams/helpers";
import { APP_CONFIG_MERGED } from "../lib/config/config-sync";
function useTeamsConfig() {
  return useMemo(() => {
    const { mode, options } = APP_CONFIG_MERGED.teams;
    return {
      mode,
      options,
      canInvite: canInviteMembers(mode),
      canSwitch: canSwitchTeams(mode),
      canCreate: canCreateTeams(mode),
      allowCreateTeams: (options == null ? void 0 : options.allowCreateTeams) ?? true
    };
  }, []);
}
export {
  useTeamsConfig
};
