1import { UnavailabilityError } from 'expo-modules-core';
2
3import NotificationChannelGroupManager from './NotificationChannelGroupManager';
4import {
5  NotificationChannelGroup,
6  NotificationChannelGroupInput,
7} from './NotificationChannelGroupManager.types';
8
9export default async function setNotificationChannelGroupAsync(
10  groupId: string,
11  group: NotificationChannelGroupInput
12): Promise<NotificationChannelGroup | null> {
13  if (!NotificationChannelGroupManager.setNotificationChannelGroupAsync) {
14    throw new UnavailabilityError('Notifications', 'setNotificationChannelGroupAsync');
15  }
16
17  return await NotificationChannelGroupManager.setNotificationChannelGroupAsync(groupId, group);
18}
19