import{a as d,b as c,c as g}from"./chunk-XEHBQAFR.mjs";var o={};c(o,{default:()=>m});var t,m,u=d(()=>{"use strict";t=function(){var i={defaultValue:null,kind:"LocalArgument",name:"connections"},e={defaultValue:null,kind:"LocalArgument",name:"profileId"},l={defaultValue:null,kind:"LocalArgument",name:"roomId"},s=[{kind:"Variable",name:"profileId",variableName:"profileId"},{kind:"Variable",name:"roomId",variableName:"roomId"}],a={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},r=[a];return{fragment:{argumentDefinitions:[i,e,l],kind:"Fragment",metadata:null,name:"useMessagesListSubscription",selections:[{alias:null,args:s,concreteType:"ChatRoomOnMessage",kind:"LinkedField",name:"chatRoomOnMessage",plural:!1,selections:[{alias:null,args:null,concreteType:"MessageEdge",kind:"LinkedField",name:"message",plural:!1,selections:[{alias:null,args:null,concreteType:"Message",kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"MessageItemFragment"},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"actionObject",plural:!1,selections:r,storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"Subscription",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[l,e,i],kind:"Operation",name:"useMessagesListSubscription",selections:[{alias:null,args:s,concreteType:"ChatRoomOnMessage",kind:"LinkedField",name:"chatRoomOnMessage",plural:!1,selections:[{alias:null,args:null,concreteType:"MessageEdge",kind:"LinkedField",name:"message",plural:!1,selections:[{alias:null,args:null,concreteType:"Message",kind:"LinkedField",name:"node",plural:!1,selections:[a,{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:!1,selections:r,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:!1,selections:r,storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"verb",storageKey:null},{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"actionObject",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},a],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(
  $roomId: ID!
  $profileId: ID!
) {
  chatRoomOnMessage(roomId: $roomId, profileId: $profileId) {
    message {
      node {
        ...MessageItemFragment
        actionObject {
          __typename
          id
        }
        id
      }
    }
  }
}

fragment MessageItemFragment on Message {
  id
  content
  created
  deleted
  extraData
  inReplyTo {
    id
  }
  isRead
  pk
  profile {
    id
  }
  verb
}
`}}}();t.hash="8e88b42fcc5d73d97e04a6e27a06f604";m=t});import{useMemo as p}from"react";import{ConnectionHandler as f,useSubscription as y}from"react-relay";var n,k=(n!==void 0||(n=(u(),g(o)),n.hash&&n.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.")),n),S=function(e,l){var s=p(function(){var a=f.getConnectionID(e,"chatRoom_allMessages");return{subscription:k,variables:{roomId:e,profileId:l,connections:[a]},onError:console.error}},[e]);return y(s)};export{k as a,S as b};
//# sourceMappingURL=chunk-E6EXMZU2.mjs.map