"use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _chunkRCZ372LZjs = require('./chunk-RCZ372LZ.js');




var _chunk4CV4JOE5js = require('./chunk-4CV4JOE5.js');

// __generated__/useNotificationsSubscription.graphql.ts
var useNotificationsSubscription_graphql_exports = {};
_chunk4CV4JOE5js.__export.call(void 0, useNotificationsSubscription_graphql_exports, {
  default: () => useNotificationsSubscription_graphql_default
});
var node, useNotificationsSubscription_graphql_default;
var init_useNotificationsSubscription_graphql = _chunk4CV4JOE5js.__esm.call(void 0, {
  "__generated__/useNotificationsSubscription.graphql.ts"() {
    "use strict";
    node = /* @__PURE__ */ function() {
      var v0 = [
        {
          "defaultValue": null,
          "kind": "LocalArgument",
          "name": "connections"
        }
      ], v1 = {
        "args": null,
        "kind": "FragmentSpread",
        "name": "NotificationItemFragment"
      }, v2 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "id",
        "storageKey": null
      }, v3 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "deletedNotificationId",
        "storageKey": null
      }, v4 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "pk",
        "storageKey": null
      }, v5 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "unread",
        "storageKey": null
      }, v6 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "timestamp",
        "storageKey": null
      }, v7 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "level",
        "storageKey": null
      }, v8 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "verb",
        "storageKey": null
      }, v9 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "description",
        "storageKey": null
      }, v10 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "data",
        "storageKey": null
      }, v11 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "__typename",
        "storageKey": null
      }, v12 = {
        "alias": null,
        "args": null,
        "concreteType": null,
        "kind": "LinkedField",
        "name": "actor",
        "plural": false,
        "selections": [
          v11,
          v2,
          {
            "kind": "InlineFragment",
            "selections": [
              {
                "alias": null,
                "args": [
                  {
                    "kind": "Literal",
                    "name": "height",
                    "value": 48
                  },
                  {
                    "kind": "Literal",
                    "name": "width",
                    "value": 48
                  }
                ],
                "concreteType": "File",
                "kind": "LinkedField",
                "name": "avatar",
                "plural": false,
                "selections": [
                  {
                    "alias": null,
                    "args": null,
                    "kind": "ScalarField",
                    "name": "url",
                    "storageKey": null
                  }
                ],
                "storageKey": "avatar(height:48,width:48)"
              },
              {
                "alias": null,
                "args": null,
                "kind": "ScalarField",
                "name": "fullName",
                "storageKey": null
              }
            ],
            "type": "User",
            "abstractKey": null
          }
        ],
        "storageKey": null
      }, v13 = [
        v2,
        v11,
        {
          "kind": "InlineFragment",
          "selections": [
            {
              "alias": null,
              "args": null,
              "kind": "ScalarField",
              "name": "body",
              "storageKey": null
            }
          ],
          "type": "Comment",
          "abstractKey": null
        }
      ], v14 = {
        "alias": null,
        "args": null,
        "concreteType": null,
        "kind": "LinkedField",
        "name": "target",
        "plural": false,
        "selections": v13,
        "storageKey": null
      }, v15 = {
        "alias": null,
        "args": null,
        "concreteType": null,
        "kind": "LinkedField",
        "name": "actionObject",
        "plural": false,
        "selections": v13,
        "storageKey": null
      };
      return {
        "fragment": {
          "argumentDefinitions": v0,
          "kind": "Fragment",
          "metadata": null,
          "name": "useNotificationsSubscription",
          "selections": [
            {
              "alias": null,
              "args": null,
              "concreteType": "OnNotificationChange",
              "kind": "LinkedField",
              "name": "onNotificationChange",
              "plural": false,
              "selections": [
                {
                  "alias": null,
                  "args": null,
                  "concreteType": "NotificationEdge",
                  "kind": "LinkedField",
                  "name": "createdNotification",
                  "plural": false,
                  "selections": [
                    {
                      "alias": null,
                      "args": null,
                      "concreteType": "Notification",
                      "kind": "LinkedField",
                      "name": "node",
                      "plural": false,
                      "selections": [
                        v1,
                        {
                          "alias": null,
                          "args": null,
                          "concreteType": "User",
                          "kind": "LinkedField",
                          "name": "recipient",
                          "plural": false,
                          "selections": [
                            v2,
                            {
                              "args": null,
                              "kind": "FragmentSpread",
                              "name": "NotificationUserMenuFragment"
                            }
                          ],
                          "storageKey": null
                        }
                      ],
                      "storageKey": null
                    }
                  ],
                  "storageKey": null
                },
                {
                  "alias": null,
                  "args": null,
                  "concreteType": "Notification",
                  "kind": "LinkedField",
                  "name": "updatedNotification",
                  "plural": false,
                  "selections": [
                    v2,
                    v1
                  ],
                  "storageKey": null
                },
                v3
              ],
              "storageKey": null
            }
          ],
          "type": "Subscription",
          "abstractKey": null
        },
        "kind": "Request",
        "operation": {
          "argumentDefinitions": v0,
          "kind": "Operation",
          "name": "useNotificationsSubscription",
          "selections": [
            {
              "alias": null,
              "args": null,
              "concreteType": "OnNotificationChange",
              "kind": "LinkedField",
              "name": "onNotificationChange",
              "plural": false,
              "selections": [
                {
                  "alias": null,
                  "args": null,
                  "concreteType": "NotificationEdge",
                  "kind": "LinkedField",
                  "name": "createdNotification",
                  "plural": false,
                  "selections": [
                    {
                      "alias": null,
                      "args": null,
                      "concreteType": "Notification",
                      "kind": "LinkedField",
                      "name": "node",
                      "plural": false,
                      "selections": [
                        v2,
                        v4,
                        v5,
                        v6,
                        v7,
                        v8,
                        v9,
                        v10,
                        v12,
                        v14,
                        v15,
                        {
                          "alias": null,
                          "args": null,
                          "concreteType": "User",
                          "kind": "LinkedField",
                          "name": "recipient",
                          "plural": false,
                          "selections": [
                            v2,
                            {
                              "alias": null,
                              "args": null,
                              "kind": "ScalarField",
                              "name": "notificationsUnreadCount",
                              "storageKey": null
                            }
                          ],
                          "storageKey": null
                        }
                      ],
                      "storageKey": null
                    }
                  ],
                  "storageKey": null
                },
                {
                  "alias": null,
                  "args": null,
                  "filters": null,
                  "handle": "prependEdge",
                  "key": "",
                  "kind": "LinkedHandle",
                  "name": "createdNotification",
                  "handleArgs": [
                    {
                      "kind": "Variable",
                      "name": "connections",
                      "variableName": "connections"
                    }
                  ]
                },
                {
                  "alias": null,
                  "args": null,
                  "concreteType": "Notification",
                  "kind": "LinkedField",
                  "name": "updatedNotification",
                  "plural": false,
                  "selections": [
                    v2,
                    v4,
                    v5,
                    v6,
                    v7,
                    v8,
                    v9,
                    v10,
                    v12,
                    v14,
                    v15
                  ],
                  "storageKey": null
                },
                v3,
                {
                  "alias": null,
                  "args": null,
                  "filters": null,
                  "handle": "deleteRecord",
                  "key": "",
                  "kind": "ScalarHandle",
                  "name": "deletedNotificationId"
                }
              ],
              "storageKey": null
            }
          ]
        },
        "params": {
          "cacheID": "dba91e538812ad2152bd5fb5c1284af4",
          "id": null,
          "metadata": {},
          "name": "useNotificationsSubscription",
          "operationKind": "subscription",
          "text": "subscription useNotificationsSubscription {\n  onNotificationChange {\n    createdNotification {\n      node {\n        ...NotificationItemFragment\n        recipient {\n          id\n          ...NotificationUserMenuFragment\n        }\n        id\n      }\n    }\n    updatedNotification {\n      id\n      ...NotificationItemFragment\n    }\n    deletedNotificationId\n  }\n}\n\nfragment NotificationItemFragment on Notification {\n  id\n  pk\n  unread\n  timestamp\n  level\n  verb\n  description\n  data\n  actor {\n    __typename\n    id\n    ... on User {\n      avatar(width: 48, height: 48) {\n        url\n      }\n      fullName\n    }\n  }\n  target {\n    id\n    __typename\n    ... on Comment {\n      id\n      body\n    }\n  }\n  actionObject {\n    id\n    __typename\n    ... on Comment {\n      id\n      body\n    }\n  }\n}\n\nfragment NotificationUserMenuFragment on User {\n  id\n  notificationsUnreadCount\n}\n"
        }
      };
    }();
    node.hash = "1bca63a0d3abbb5c3d3ca3fbfa6e7d37";
    useNotificationsSubscription_graphql_default = node;
  }
});

// tmp-babel/notifications/common/graphql/subscriptions/useNotificationsSubscription.js
var _react = require('react');
var _reactrelay = require('react-relay');
var _useNotificationsSubscription;
var NotificationsSubscription = _useNotificationsSubscription !== void 0 ? _useNotificationsSubscription : (_useNotificationsSubscription = (init_useNotificationsSubscription_graphql(), _chunk4CV4JOE5js.__toCommonJS.call(void 0, useNotificationsSubscription_graphql_exports)), _useNotificationsSubscription.hash && _useNotificationsSubscription.hash !== "1bca63a0d3abbb5c3d3ca3fbfa6e7d37" && console.error("The definition of 'useNotificationsSubscription' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _useNotificationsSubscription);
var useNotificationsSubscription = function useNotificationsSubscription2() {
  var userId = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
  var config = _react.useMemo.call(void 0, function() {
    var connectionID = _reactrelay.ConnectionHandler.getConnectionID(userId, _chunkRCZ372LZjs.USER_NOTIFICATIONS_KEY);
    return {
      subscription: NotificationsSubscription,
      variables: {
        connections: [connectionID]
      },
      onError: console.error
    };
  }, [userId]);
  return _reactrelay.useSubscription.call(void 0, config);
};



exports.useNotificationsSubscription = useNotificationsSubscription;
//# sourceMappingURL=chunk-GFUIJZCX.js.map