import { useTranslations } from "next-intl";
import { roleHelpers } from "../types/user.types.js";
function useRoleTranslations() {
  const t = useTranslations();
  return (role) => {
    const translationKey = roleHelpers.getRoleDisplayKey(role);
    return t(translationKey);
  };
}
function useRoleOptions() {
  const getRoleName = useRoleTranslations();
  return roleHelpers.getAllRolesByHierarchy().map((role) => ({
    value: role,
    label: getRoleName(role)
  }));
}
function getRoleDisplayName(role, t) {
  const translationKey = roleHelpers.getRoleDisplayKey(role);
  return t(translationKey);
}
export {
  getRoleDisplayName,
  useRoleOptions,
  useRoleTranslations
};
