import '../../../../../node_modules/preact/compat/dist/compat.module.mjs';
import { useAdminPortalUIConfig } from '../StytchClientContext.mjs';
import { getRoleDefaultDisplayName } from './getRoleDefaultDisplayName.mjs';
import { useCallback as T } from '../../../../../node_modules/preact/hooks/dist/hooks.module.mjs';

const useGetRoleDisplayName = ()=>{
    const config = useAdminPortalUIConfig();
    return T((role)=>{
        return config?.getRoleDisplayName?.(role) || getRoleDefaultDisplayName(role);
    }, [
        config
    ]);
};

export { useGetRoleDisplayName };
//# sourceMappingURL=useGetRoleDisplayName.mjs.map
