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



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

// __generated__/useMessagesListSubscription.graphql.ts
var useMessagesListSubscription_graphql_exports = {};
_chunk4CV4JOE5js.__export.call(void 0, useMessagesListSubscription_graphql_exports, {
  default: () => useMessagesListSubscription_graphql_default
});
var node, useMessagesListSubscription_graphql_default;
var init_useMessagesListSubscription_graphql = _chunk4CV4JOE5js.__esm.call(void 0, {
  "__generated__/useMessagesListSubscription.graphql.ts"() {
    "use strict";
    node = /* @__PURE__ */ function() {
      var v0 = {
        "defaultValue": null,
        "kind": "LocalArgument",
        "name": "connections"
      }, v1 = {
        "defaultValue": null,
        "kind": "LocalArgument",
        "name": "profileId"
      }, v2 = {
        "defaultValue": null,
        "kind": "LocalArgument",
        "name": "roomId"
      }, v3 = [
        {
          "kind": "Variable",
          "name": "profileId",
          "variableName": "profileId"
        },
        {
          "kind": "Variable",
          "name": "roomId",
          "variableName": "roomId"
        }
      ], v4 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "id",
        "storageKey": null
      }, v5 = [
        v4
      ];
      return {
        "fragment": {
          "argumentDefinitions": [
            v0,
            v1,
            v2
          ],
          "kind": "Fragment",
          "metadata": null,
          "name": "useMessagesListSubscription",
          "selections": [
            {
              "alias": null,
              "args": v3,
              "concreteType": "ChatRoomOnMessage",
              "kind": "LinkedField",
              "name": "chatRoomOnMessage",
              "plural": false,
              "selections": [
                {
                  "alias": null,
                  "args": null,
                  "concreteType": "MessageEdge",
                  "kind": "LinkedField",
                  "name": "message",
                  "plural": false,
                  "selections": [
                    {
                      "alias": null,
                      "args": null,
                      "concreteType": "Message",
                      "kind": "LinkedField",
                      "name": "node",
                      "plural": false,
                      "selections": [
                        {
                          "args": null,
                          "kind": "FragmentSpread",
                          "name": "MessageItemFragment"
                        },
                        {
                          "alias": null,
                          "args": null,
                          "concreteType": null,
                          "kind": "LinkedField",
                          "name": "actionObject",
                          "plural": false,
                          "selections": v5,
                          "storageKey": null
                        }
                      ],
                      "storageKey": null
                    }
                  ],
                  "storageKey": null
                }
              ],
              "storageKey": null
            }
          ],
          "type": "Subscription",
          "abstractKey": null
        },
        "kind": "Request",
        "operation": {
          "argumentDefinitions": [
            v2,
            v1,
            v0
          ],
          "kind": "Operation",
          "name": "useMessagesListSubscription",
          "selections": [
            {
              "alias": null,
              "args": v3,
              "concreteType": "ChatRoomOnMessage",
              "kind": "LinkedField",
              "name": "chatRoomOnMessage",
              "plural": false,
              "selections": [
                {
                  "alias": null,
                  "args": null,
                  "concreteType": "MessageEdge",
                  "kind": "LinkedField",
                  "name": "message",
                  "plural": false,
                  "selections": [
                    {
                      "alias": null,
                      "args": null,
                      "concreteType": "Message",
                      "kind": "LinkedField",
                      "name": "node",
                      "plural": false,
                      "selections": [
                        v4,
                        {
                          "alias": null,
                          "args": null,
                          "kind": "ScalarField",
                          "name": "content",
                          "storageKey": null
                        },
                        {
                          "alias": null,
                          "args": null,
                          "kind": "ScalarField",
                          "name": "created",
                          "storageKey": null
                        },
                        {
                          "alias": null,
                          "args": null,
                          "kind": "ScalarField",
                          "name": "deleted",
                          "storageKey": null
                        },
                        {
                          "alias": null,
                          "args": null,
                          "kind": "ScalarField",
                          "name": "extraData",
                          "storageKey": null
                        },
                        {
                          "alias": null,
                          "args": null,
                          "concreteType": "Message",
                          "kind": "LinkedField",
                          "name": "inReplyTo",
                          "plural": false,
                          "selections": v5,
                          "storageKey": null
                        },
                        {
                          "alias": null,
                          "args": null,
                          "kind": "ScalarField",
                          "name": "isRead",
                          "storageKey": null
                        },
                        {
                          "alias": null,
                          "args": null,
                          "kind": "ScalarField",
                          "name": "pk",
                          "storageKey": null
                        },
                        {
                          "alias": null,
                          "args": null,
                          "concreteType": "Profile",
                          "kind": "LinkedField",
                          "name": "profile",
                          "plural": false,
                          "selections": v5,
                          "storageKey": null
                        },
                        {
                          "alias": null,
                          "args": null,
                          "kind": "ScalarField",
                          "name": "verb",
                          "storageKey": null
                        },
                        {
                          "alias": null,
                          "args": null,
                          "concreteType": null,
                          "kind": "LinkedField",
                          "name": "actionObject",
                          "plural": false,
                          "selections": [
                            {
                              "alias": null,
                              "args": null,
                              "kind": "ScalarField",
                              "name": "__typename",
                              "storageKey": null
                            },
                            v4
                          ],
                          "storageKey": null
                        }
                      ],
                      "storageKey": null
                    }
                  ],
                  "storageKey": null
                },
                {
                  "alias": null,
                  "args": null,
                  "filters": null,
                  "handle": "prependEdge",
                  "key": "",
                  "kind": "LinkedHandle",
                  "name": "message",
                  "handleArgs": [
                    {
                      "kind": "Variable",
                      "name": "connections",
                      "variableName": "connections"
                    }
                  ]
                }
              ],
              "storageKey": null
            }
          ]
        },
        "params": {
          "cacheID": "e82e274115a2d44b3e5771be14f09e46",
          "id": null,
          "metadata": {},
          "name": "useMessagesListSubscription",
          "operationKind": "subscription",
          "text": "subscription useMessagesListSubscription(\n  $roomId: ID!\n  $profileId: ID!\n) {\n  chatRoomOnMessage(roomId: $roomId, profileId: $profileId) {\n    message {\n      node {\n        ...MessageItemFragment\n        actionObject {\n          __typename\n          id\n        }\n        id\n      }\n    }\n  }\n}\n\nfragment MessageItemFragment on Message {\n  id\n  content\n  created\n  deleted\n  extraData\n  inReplyTo {\n    id\n  }\n  isRead\n  pk\n  profile {\n    id\n  }\n  verb\n}\n"
        }
      };
    }();
    node.hash = "8e88b42fcc5d73d97e04a6e27a06f604";
    useMessagesListSubscription_graphql_default = node;
  }
});

// tmp-babel/messages/common/graphql/subscriptions/useMessagesListSubscription.js
var _react = require('react');
var _reactrelay = require('react-relay');
var _useMessagesListSubscription;
var newMessageSubscription = _useMessagesListSubscription !== void 0 ? _useMessagesListSubscription : (_useMessagesListSubscription = (init_useMessagesListSubscription_graphql(), _chunk4CV4JOE5js.__toCommonJS.call(void 0, useMessagesListSubscription_graphql_exports)), _useMessagesListSubscription.hash && _useMessagesListSubscription.hash !== "8e88b42fcc5d73d97e04a6e27a06f604" && console.error("The definition of 'useMessagesListSubscription' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _useMessagesListSubscription);
var useMessagesListSubscription = function useMessagesListSubscription2(roomId, profileId) {
  var config = _react.useMemo.call(void 0, function() {
    var connectionID = _reactrelay.ConnectionHandler.getConnectionID(roomId, "chatRoom_allMessages");
    return {
      subscription: newMessageSubscription,
      variables: {
        roomId,
        profileId,
        connections: [connectionID]
      },
      onError: console.error
    };
  }, [roomId]);
  return _reactrelay.useSubscription.call(void 0, config);
};




exports.newMessageSubscription = newMessageSubscription; exports.useMessagesListSubscription = useMessagesListSubscription;
//# sourceMappingURL=chunk-ZEUAUHNK.js.map