1import { UnavailabilityError } from 'expo-modules-core';
2
3import NotificationChannelManager from './NotificationChannelManager';
4import { NotificationChannel } from './NotificationChannelManager.types';
5
6export default async function getNotificationChannelAsync(
7  channelId: string
8): Promise<NotificationChannel | null> {
9  if (!NotificationChannelManager.getNotificationChannelAsync) {
10    throw new UnavailabilityError('Notifications', 'getNotificationChannelAsync');
11  }
12  return await NotificationChannelManager.getNotificationChannelAsync(channelId);
13}
14