text: /* Copyright (c) 2017-2018 Environmental Systems Research Institute, Inc.
   * Apache-2.0 */
  import { __assign } from "tslib";
  import { request } from "@esri/arcgis-rest-request";
  import { getPortalUrl } from "../util/get-portal-url";
  /**
   * ```js
   * import { createGroupNotification } from '@esri/arcgis-rest-portal';
   * // send an email to an entire group
   * createGroupNotification({
   *   authentication: UserSession,
   *   subject: "hello",
   *   message: "world!",
   *   id: groupId
   * })
   * ```
   * Create a group notification.
   *
   * @param requestOptions - Options for the request
   *
   * @returns A Promise that will resolve with the success/failure status of the request
   */
  export function createGroupNotification(requestOptions) {
      var url = getPortalUrl(requestOptions) + "/community/groups/" + requestOptions.id + "/createNotification";
      var options = __assign({ params: __assign({ subject: requestOptions.subject, message: requestOptions.message, users: requestOptions.users, notificationChannelType: requestOptions.notificationChannelType || "email", clientId: requestOptions.clientId, silentNotification: requestOptions.silentNotification, notifyAll: !requestOptions.users || requestOptions.users.length === 0 }, requestOptions.params) }, requestOptions);
      return request(url, options);
  }
  //# sourceMappingURL=notification.js.map