import{a as d,b as u,c}from"./chunk-XEHBQAFR.mjs";var p={};u(p,{default:()=>F});var g,F,y=d(()=>{"use strict";g=function(){var a={defaultValue:null,kind:"LocalArgument",name:"id"},t={defaultValue:!0,kind:"LocalArgument",name:"isCommentsOpened"},l=[{kind:"Variable",name:"id",variableName:"id"}],r={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},s=[{alias:null,args:null,kind:"ScalarField",name:"total",storageKey:null}],i={alias:null,args:null,concreteType:"CommentsCount",kind:"LinkedField",name:"commentsCount",plural:!1,selections:s,storageKey:null},m=[{kind:"Literal",name:"first",value:5},{kind:"Literal",name:"orderBy",value:"-is_pinned,-created"}],o={alias:null,args:null,kind:"ScalarField",name:"pk",storageKey:null};return{fragment:{argumentDefinitions:[a,t],kind:"Fragment",metadata:null,name:"CommentsRefetchQuery",selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[{args:[{kind:"Variable",name:"isCommentsOpened",variableName:"isCommentsOpened"}],kind:"FragmentSpread",name:"CommentsFragment"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[t,a],kind:"Operation",name:"CommentsRefetchQuery",selections:[{alias:null,args:l,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[r,n,{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"isCommentsEnabled",storageKey:null},i,{condition:"isCommentsOpened",kind:"Condition",passingValue:!0,selections:[{alias:null,args:m,concreteType:"CommentConnection",kind:"LinkedField",name:"comments",plural:!1,selections:[{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"CommentEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"Comment",kind:"LinkedField",name:"node",plural:!1,selections:[n,{alias:null,args:null,kind:"ScalarField",name:"isPinned",storageKey:null},o,{alias:null,args:null,kind:"ScalarField",name:"body",storageKey:null},{alias:null,args:null,concreteType:"User",kind:"LinkedField",name:"user",plural:!1,selections:[n,o,{alias:null,args:null,kind:"ScalarField",name:"fullName",storageKey:null},{alias:null,args:[{kind:"Literal",name:"height",value:50},{kind:"Literal",name:"width",value:50}],concreteType:"File",kind:"LinkedField",name:"avatar",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"url",storageKey:null}],storageKey:"avatar(height:50,width:50)"}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"created",storageKey:null},i,{alias:"canChange",args:[{kind:"Literal",name:"perm",value:"change"}],kind:"ScalarField",name:"hasPerm",storageKey:'hasPerm(perm:"change")'},{alias:"canDelete",args:[{kind:"Literal",name:"perm",value:"delete"}],kind:"ScalarField",name:"hasPerm",storageKey:'hasPerm(perm:"delete")'},{alias:"canReport",args:[{kind:"Literal",name:"perm",value:"report"}],kind:"ScalarField",name:"hasPerm",storageKey:'hasPerm(perm:"report")'},{alias:"canPin",args:[{kind:"Literal",name:"perm",value:"pin"}],kind:"ScalarField",name:"hasPerm",storageKey:'hasPerm(perm:"pin")'},r,{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"ReactionsCount",kind:"LinkedField",name:"reactionsCount",plural:!1,selections:s,storageKey:null},{alias:null,args:null,concreteType:"Reaction",kind:"LinkedField",name:"myReaction",plural:!1,selections:[n,{alias:null,args:null,kind:"ScalarField",name:"reactionType",storageKey:null}],storageKey:null}],type:"ReactionsInterface",abstractKey:"__isReactionsInterface"},{kind:"TypeDiscriminator",abstractKey:"__isCommentsInterface"}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null}],storageKey:null}],storageKey:'comments(first:5,orderBy:"-is_pinned,-created")'},{alias:null,args:m,filters:[],handle:"connection",key:"CommentsList_comments",kind:"LinkedHandle",name:"comments"}]}],type:"CommentsInterface",abstractKey:"__isCommentsInterface"}],storageKey:null}]},params:{cacheID:"29c62fd9e62f6ecb8ffe052163e053c6",id:null,metadata:{},name:"CommentsRefetchQuery",operationKind:"query",text:`query CommentsRefetchQuery(
  $isCommentsOpened: Boolean = true
  $id: ID!
) {
  node(id: $id) {
    __typename
    ...CommentsFragment_2iZoM
    id
  }
}

fragment CommentItem_comment on Comment {
  id
  pk
  body
  isPinned
  user {
    id
    pk
    fullName
    avatar(width: 50, height: 50) {
      url
    }
  }
  created
  commentsCount {
    total
  }
  canChange: hasPerm(perm: "change")
  canDelete: hasPerm(perm: "delete")
  canReport: hasPerm(perm: "report")
  canPin: hasPerm(perm: "pin")
  ...ReactionButton_target
  ...CommentItem_target
}

fragment CommentItem_target on CommentsInterface {
  __isCommentsInterface: __typename
  id
}

fragment CommentsFragment_2iZoM on CommentsInterface {
  __isCommentsInterface: __typename
  id
  __typename
  isCommentsEnabled
  commentsCount {
    total
  }
  ...CommentsList_comments @include(if: $isCommentsOpened)
  ...CommentItem_target
}

fragment CommentsList_comments on CommentsInterface {
  __isCommentsInterface: __typename
  id
  commentsCount {
    total
  }
  comments(first: 5, orderBy: "-is_pinned,-created") {
    pageInfo {
      endCursor
      hasNextPage
    }
    edges {
      node {
        id
        isPinned
        ...CommentItem_comment
        __typename
      }
      cursor
    }
  }
  ...CommentItem_target
}

fragment ReactionButton_target on ReactionsInterface {
  __isReactionsInterface: __typename
  id
  reactionsCount {
    total
  }
  myReaction {
    id
    reactionType
  }
}
`}}}();g.hash="5c6447c09e41ab2fcd66157fb900571a";F=g});var C={};u(C,{default:()=>_});var f,_,k=d(()=>{"use strict";f={argumentDefinitions:[{defaultValue:!0,kind:"LocalArgument",name:"isCommentsOpened"}],kind:"Fragment",metadata:{refetch:{connection:null,fragmentPathInResult:["node"],operation:(y(),c(p)),identifierInfo:{identifierField:"id",identifierQueryVariableName:"id"}}},name:"CommentsFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"isCommentsEnabled",storageKey:null},{alias:null,args:null,concreteType:"CommentsCount",kind:"LinkedField",name:"commentsCount",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"total",storageKey:null}],storageKey:null},{condition:"isCommentsOpened",kind:"Condition",passingValue:!0,selections:[{args:null,kind:"FragmentSpread",name:"CommentsList_comments"}]},{args:null,kind:"FragmentSpread",name:"CommentItem_target"}],type:"CommentsInterface",abstractKey:"__isCommentsInterface"};f.hash="5c6447c09e41ab2fcd66157fb900571a";_=f});import"react-relay";var e,R=(e!==void 0||(e=(k(),c(C)),e.hash&&e.hash!=="5c6447c09e41ab2fcd66157fb900571a"&&console.error("The definition of 'CommentsFragment' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data.")),e);export{R as a};
//# sourceMappingURL=chunk-WQWQCATJ.mjs.map