import {
  __esm,
  __export,
  __toCommonJS
} from "./chunk-NFEGQTCC.mjs";

// __generated__/chatRoomsPaginationQuery.graphql.ts
var node, chatRoomsPaginationQuery_graphql_default;
var init_chatRoomsPaginationQuery_graphql = __esm({
  "__generated__/chatRoomsPaginationQuery.graphql.ts"() {
    "use strict";
    node = /* @__PURE__ */ function() {
      var v0 = {
        "defaultValue": false,
        "kind": "LocalArgument",
        "name": "archived"
      }, v1 = {
        "defaultValue": 5,
        "kind": "LocalArgument",
        "name": "count"
      }, v2 = {
        "defaultValue": null,
        "kind": "LocalArgument",
        "name": "cursor"
      }, v3 = {
        "defaultValue": null,
        "kind": "LocalArgument",
        "name": "id"
      }, v4 = {
        "defaultValue": "",
        "kind": "LocalArgument",
        "name": "q"
      }, v5 = {
        "defaultValue": false,
        "kind": "LocalArgument",
        "name": "unreadMessages"
      }, v6 = [
        {
          "kind": "Variable",
          "name": "id",
          "variableName": "id"
        }
      ], v7 = {
        "kind": "Variable",
        "name": "archived",
        "variableName": "archived"
      }, v8 = {
        "kind": "Variable",
        "name": "q",
        "variableName": "q"
      }, v9 = {
        "kind": "Variable",
        "name": "unreadMessages",
        "variableName": "unreadMessages"
      }, v10 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "__typename",
        "storageKey": null
      }, v11 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "id",
        "storageKey": null
      }, v12 = [
        {
          "kind": "Variable",
          "name": "after",
          "variableName": "cursor"
        },
        v7,
        {
          "kind": "Variable",
          "name": "first",
          "variableName": "count"
        },
        v8,
        v9
      ], v13 = [
        {
          "alias": null,
          "args": null,
          "kind": "ScalarField",
          "name": "url",
          "storageKey": null
        }
      ];
      return {
        "fragment": {
          "argumentDefinitions": [
            v0,
            v1,
            v2,
            v3,
            v4,
            v5
          ],
          "kind": "Fragment",
          "metadata": null,
          "name": "chatRoomsPaginationQuery",
          "selections": [
            {
              "alias": null,
              "args": v6,
              "concreteType": null,
              "kind": "LinkedField",
              "name": "node",
              "plural": false,
              "selections": [
                {
                  "args": [
                    v7,
                    {
                      "kind": "Variable",
                      "name": "count",
                      "variableName": "count"
                    },
                    {
                      "kind": "Variable",
                      "name": "cursor",
                      "variableName": "cursor"
                    },
                    v8,
                    v9
                  ],
                  "kind": "FragmentSpread",
                  "name": "RoomsListFragment"
                }
              ],
              "storageKey": null
            }
          ],
          "type": "Query",
          "abstractKey": null
        },
        "kind": "Request",
        "operation": {
          "argumentDefinitions": [
            v0,
            v1,
            v2,
            v4,
            v5,
            v3
          ],
          "kind": "Operation",
          "name": "chatRoomsPaginationQuery",
          "selections": [
            {
              "alias": null,
              "args": v6,
              "concreteType": null,
              "kind": "LinkedField",
              "name": "node",
              "plural": false,
              "selections": [
                v10,
                v11,
                {
                  "kind": "InlineFragment",
                  "selections": [
                    {
                      "alias": null,
                      "args": v12,
                      "concreteType": "ChatRoomConnection",
                      "kind": "LinkedField",
                      "name": "chatRooms",
                      "plural": false,
                      "selections": [
                        {
                          "alias": null,
                          "args": null,
                          "concreteType": "ChatRoomEdge",
                          "kind": "LinkedField",
                          "name": "edges",
                          "plural": true,
                          "selections": [
                            {
                              "alias": null,
                              "args": null,
                              "concreteType": "ChatRoom",
                              "kind": "LinkedField",
                              "name": "node",
                              "plural": false,
                              "selections": [
                                v11,
                                {
                                  "alias": null,
                                  "args": null,
                                  "kind": "ScalarField",
                                  "name": "lastMessageTime",
                                  "storageKey": null
                                },
                                {
                                  "alias": null,
                                  "args": null,
                                  "concreteType": "Message",
                                  "kind": "LinkedField",
                                  "name": "lastMessage",
                                  "plural": false,
                                  "selections": [
                                    v11,
                                    {
                                      "alias": null,
                                      "args": null,
                                      "kind": "ScalarField",
                                      "name": "content",
                                      "storageKey": null
                                    }
                                  ],
                                  "storageKey": null
                                },
                                {
                                  "alias": null,
                                  "args": null,
                                  "kind": "ScalarField",
                                  "name": "isGroup",
                                  "storageKey": null
                                },
                                {
                                  "alias": null,
                                  "args": [
                                    {
                                      "kind": "Literal",
                                      "name": "first",
                                      "value": 2
                                    }
                                  ],
                                  "concreteType": "ChatRoomParticipantConnection",
                                  "kind": "LinkedField",
                                  "name": "participants",
                                  "plural": false,
                                  "selections": [
                                    {
                                      "alias": null,
                                      "args": null,
                                      "concreteType": "ChatRoomParticipantEdge",
                                      "kind": "LinkedField",
                                      "name": "edges",
                                      "plural": true,
                                      "selections": [
                                        {
                                          "alias": null,
                                          "args": null,
                                          "concreteType": "ChatRoomParticipant",
                                          "kind": "LinkedField",
                                          "name": "node",
                                          "plural": false,
                                          "selections": [
                                            {
                                              "alias": null,
                                              "args": null,
                                              "concreteType": "Profile",
                                              "kind": "LinkedField",
                                              "name": "profile",
                                              "plural": false,
                                              "selections": [
                                                v11,
                                                {
                                                  "alias": null,
                                                  "args": null,
                                                  "kind": "ScalarField",
                                                  "name": "name",
                                                  "storageKey": null
                                                },
                                                {
                                                  "alias": null,
                                                  "args": [
                                                    {
                                                      "kind": "Literal",
                                                      "name": "height",
                                                      "value": 100
                                                    },
                                                    {
                                                      "kind": "Literal",
                                                      "name": "width",
                                                      "value": 100
                                                    }
                                                  ],
                                                  "concreteType": "File",
                                                  "kind": "LinkedField",
                                                  "name": "image",
                                                  "plural": false,
                                                  "selections": v13,
                                                  "storageKey": "image(height:100,width:100)"
                                                }
                                              ],
                                              "storageKey": null
                                            },
                                            {
                                              "alias": null,
                                              "args": null,
                                              "kind": "ScalarField",
                                              "name": "role",
                                              "storageKey": null
                                            },
                                            v11
                                          ],
                                          "storageKey": null
                                        }
                                      ],
                                      "storageKey": null
                                    }
                                  ],
                                  "storageKey": "participants(first:2)"
                                },
                                {
                                  "alias": null,
                                  "args": [
                                    {
                                      "kind": "Literal",
                                      "name": "height",
                                      "value": 144
                                    },
                                    {
                                      "kind": "Literal",
                                      "name": "width",
                                      "value": 144
                                    }
                                  ],
                                  "concreteType": "File",
                                  "kind": "LinkedField",
                                  "name": "image",
                                  "plural": false,
                                  "selections": v13,
                                  "storageKey": "image(height:144,width:144)"
                                },
                                {
                                  "alias": null,
                                  "args": null,
                                  "kind": "ScalarField",
                                  "name": "title",
                                  "storageKey": null
                                },
                                {
                                  "alias": null,
                                  "args": null,
                                  "concreteType": "UnreadMessageCount",
                                  "kind": "LinkedField",
                                  "name": "unreadMessages",
                                  "plural": false,
                                  "selections": [
                                    {
                                      "alias": null,
                                      "args": null,
                                      "kind": "ScalarField",
                                      "name": "count",
                                      "storageKey": null
                                    },
                                    {
                                      "alias": null,
                                      "args": null,
                                      "kind": "ScalarField",
                                      "name": "markedUnread",
                                      "storageKey": null
                                    },
                                    v11
                                  ],
                                  "storageKey": null
                                },
                                v10
                              ],
                              "storageKey": null
                            },
                            {
                              "alias": null,
                              "args": null,
                              "kind": "ScalarField",
                              "name": "cursor",
                              "storageKey": null
                            }
                          ],
                          "storageKey": null
                        },
                        {
                          "alias": null,
                          "args": null,
                          "concreteType": "PageInfo",
                          "kind": "LinkedField",
                          "name": "pageInfo",
                          "plural": false,
                          "selections": [
                            {
                              "alias": null,
                              "args": null,
                              "kind": "ScalarField",
                              "name": "hasNextPage",
                              "storageKey": null
                            },
                            {
                              "alias": null,
                              "args": null,
                              "kind": "ScalarField",
                              "name": "endCursor",
                              "storageKey": null
                            }
                          ],
                          "storageKey": null
                        }
                      ],
                      "storageKey": null
                    },
                    {
                      "alias": null,
                      "args": v12,
                      "filters": [
                        "q",
                        "unreadMessages",
                        "archived"
                      ],
                      "handle": "connection",
                      "key": "roomsList_chatRooms",
                      "kind": "LinkedHandle",
                      "name": "chatRooms"
                    }
                  ],
                  "type": "ChatRoomsInterface",
                  "abstractKey": "__isChatRoomsInterface"
                }
              ],
              "storageKey": null
            }
          ]
        },
        "params": {
          "cacheID": "7ebe7a99706098bde0517d1d04caf7b8",
          "id": null,
          "metadata": {},
          "name": "chatRoomsPaginationQuery",
          "operationKind": "query",
          "text": 'query chatRoomsPaginationQuery(\n  $archived: Boolean = false\n  $count: Int = 5\n  $cursor: String\n  $q: String = ""\n  $unreadMessages: Boolean = false\n  $id: ID!\n) {\n  node(id: $id) {\n    __typename\n    ...RoomsListFragment_3I5PKK\n    id\n  }\n}\n\nfragment GroupTitleFragment on ChatRoom {\n  id\n  image(width: 144, height: 144) {\n    url\n  }\n  title\n}\n\nfragment LastMessageFragment on ChatRoom {\n  id\n  lastMessageTime\n  lastMessage {\n    id\n    content\n  }\n}\n\nfragment RoomTitleFragment on ChatRoom {\n  id\n  participants(first: 2) {\n    edges {\n      node {\n        profile {\n          id\n          name\n          image(width: 100, height: 100) {\n            url\n          }\n        }\n        role\n        id\n      }\n    }\n  }\n}\n\nfragment RoomsListFragment_3I5PKK on ChatRoomsInterface {\n  __isChatRoomsInterface: __typename\n  chatRooms(first: $count, after: $cursor, q: $q, unreadMessages: $unreadMessages, archived: $archived) {\n    edges {\n      node {\n        id\n        ...LastMessageFragment\n        ...TitleFragment\n        ...UnreadMessagesCountFragment\n        __typename\n      }\n      cursor\n    }\n    pageInfo {\n      hasNextPage\n      endCursor\n    }\n  }\n  id\n}\n\nfragment TitleFragment on ChatRoom {\n  id\n  isGroup\n  ...RoomTitleFragment\n  ...GroupTitleFragment\n}\n\nfragment UnreadMessagesCountFragment on ChatRoom {\n  id\n  unreadMessages {\n    count\n    markedUnread\n    id\n  }\n}\n'
        }
      };
    }();
    node.hash = "3a66898cb96bbf4ce999aa5ad9822ca0";
    chatRoomsPaginationQuery_graphql_default = node;
  }
});

// __generated__/RoomsListFragment.graphql.ts
var RoomsListFragment_graphql_exports = {};
__export(RoomsListFragment_graphql_exports, {
  default: () => RoomsListFragment_graphql_default
});
var node2, RoomsListFragment_graphql_default;
var init_RoomsListFragment_graphql = __esm({
  "__generated__/RoomsListFragment.graphql.ts"() {
    "use strict";
    init_chatRoomsPaginationQuery_graphql();
    node2 = /* @__PURE__ */ function() {
      var v0 = [
        "chatRooms"
      ], v1 = {
        "alias": null,
        "args": null,
        "kind": "ScalarField",
        "name": "id",
        "storageKey": null
      };
      return {
        "argumentDefinitions": [
          {
            "defaultValue": false,
            "kind": "LocalArgument",
            "name": "archived"
          },
          {
            "defaultValue": 5,
            "kind": "LocalArgument",
            "name": "count"
          },
          {
            "defaultValue": null,
            "kind": "LocalArgument",
            "name": "cursor"
          },
          {
            "defaultValue": "",
            "kind": "LocalArgument",
            "name": "q"
          },
          {
            "defaultValue": false,
            "kind": "LocalArgument",
            "name": "unreadMessages"
          }
        ],
        "kind": "Fragment",
        "metadata": {
          "connection": [
            {
              "count": "count",
              "cursor": "cursor",
              "direction": "forward",
              "path": v0
            }
          ],
          "refetch": {
            "connection": {
              "forward": {
                "count": "count",
                "cursor": "cursor"
              },
              "backward": null,
              "path": v0
            },
            "fragmentPathInResult": [
              "node"
            ],
            "operation": chatRoomsPaginationQuery_graphql_default,
            "identifierInfo": {
              "identifierField": "id",
              "identifierQueryVariableName": "id"
            }
          }
        },
        "name": "RoomsListFragment",
        "selections": [
          {
            "alias": "chatRooms",
            "args": [
              {
                "kind": "Variable",
                "name": "archived",
                "variableName": "archived"
              },
              {
                "kind": "Variable",
                "name": "q",
                "variableName": "q"
              },
              {
                "kind": "Variable",
                "name": "unreadMessages",
                "variableName": "unreadMessages"
              }
            ],
            "concreteType": "ChatRoomConnection",
            "kind": "LinkedField",
            "name": "__roomsList_chatRooms_connection",
            "plural": false,
            "selections": [
              {
                "alias": null,
                "args": null,
                "concreteType": "ChatRoomEdge",
                "kind": "LinkedField",
                "name": "edges",
                "plural": true,
                "selections": [
                  {
                    "alias": null,
                    "args": null,
                    "concreteType": "ChatRoom",
                    "kind": "LinkedField",
                    "name": "node",
                    "plural": false,
                    "selections": [
                      v1,
                      {
                        "args": null,
                        "kind": "FragmentSpread",
                        "name": "LastMessageFragment"
                      },
                      {
                        "args": null,
                        "kind": "FragmentSpread",
                        "name": "TitleFragment"
                      },
                      {
                        "args": null,
                        "kind": "FragmentSpread",
                        "name": "UnreadMessagesCountFragment"
                      },
                      {
                        "alias": null,
                        "args": null,
                        "kind": "ScalarField",
                        "name": "__typename",
                        "storageKey": null
                      }
                    ],
                    "storageKey": null
                  },
                  {
                    "alias": null,
                    "args": null,
                    "kind": "ScalarField",
                    "name": "cursor",
                    "storageKey": null
                  }
                ],
                "storageKey": null
              },
              {
                "alias": null,
                "args": null,
                "concreteType": "PageInfo",
                "kind": "LinkedField",
                "name": "pageInfo",
                "plural": false,
                "selections": [
                  {
                    "alias": null,
                    "args": null,
                    "kind": "ScalarField",
                    "name": "hasNextPage",
                    "storageKey": null
                  },
                  {
                    "alias": null,
                    "args": null,
                    "kind": "ScalarField",
                    "name": "endCursor",
                    "storageKey": null
                  }
                ],
                "storageKey": null
              }
            ],
            "storageKey": null
          },
          v1
        ],
        "type": "ChatRoomsInterface",
        "abstractKey": "__isChatRoomsInterface"
      };
    }();
    node2.hash = "3a66898cb96bbf4ce999aa5ad9822ca0";
    RoomsListFragment_graphql_default = node2;
  }
});

// tmp-babel/messages/common/graphql/fragments/RoomsList.js
import { graphql, usePaginationFragment } from "react-relay";
var _RoomsListFragment;
var RoomsListFragment = _RoomsListFragment !== void 0 ? _RoomsListFragment : (_RoomsListFragment = (init_RoomsListFragment_graphql(), __toCommonJS(RoomsListFragment_graphql_exports)), _RoomsListFragment.hash && _RoomsListFragment.hash !== "3a66898cb96bbf4ce999aa5ad9822ca0" && console.error("The definition of 'RoomsListFragment' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _RoomsListFragment);
var useRoomsList = function useRoomsList2(targetRef) {
  return usePaginationFragment(RoomsListFragment, targetRef);
};

export {
  RoomsListFragment,
  useRoomsList
};
//# sourceMappingURL=chunk-ESY3D4EX.mjs.map