export function loadNotificationChannels(ctx, enableInPlatformNotifications, enableNotificationChannelIdentifiers) {
    const { backend } = ctx;
    const typesToLoad = ["smtp", "webhook"];
    if (enableInPlatformNotifications) {
        typesToLoad.push("inPlatform");
    }
    if (enableNotificationChannelIdentifiers) {
        return backend
            .organizations()
            .getCurrentOrganization()
            .then((organization) => {
            return organization
                .notificationChannels()
                .getNotificationChannelsQuery()
                .withTypes(typesToLoad)
                .queryAllIdentifiers();
        });
    }
    return backend
        .organizations()
        .getCurrentOrganization()
        .then((organization) => {
        return organization
            .notificationChannels()
            .getNotificationChannelsQuery()
            .withTypes(typesToLoad)
            .queryAll();
    });
}
