MDCAppStoreCommentsFlyOut.react",["fbt","CometRelay","GraphQLError","MCDSButton.react","MCDSFlyOut.react","MCDSHorizontalDivider.react","MCDSHorizontalStack.react","MCDSText.react","MCDSTextArea.react","MCDSVerticalStack.react","MDCAppStoreComment.react","MDCAppStoreCommentsFlyOutCreateCommentMutation.graphql","MDCAppStoreCommentsFlyOutQuery.graphql","MDCAppStoreCommentsFlyOutQuery_post.graphql","MDCAppStoreErrorContext","MDCAppStoreV2ProfilePhoto.react","mcdsMargin","react","useMDCAppStoreV2Mutation"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k,l,m=l||(l=d("react"));e=l;var n=e.useContext,o=e.useState;function a(a){var e,f,g,l,p=a.props.onClose;a=a.queries.commentsFlyOutQuery;var q=n(c("MDCAppStoreErrorContext")),r=q.onError;q=o("");var s=q[0],t=q[1];q=o(null);var u=q[0],v=q[1];q=d("CometRelay").usePreloadedQuery(i!==void 0?i:i=b("MDCAppStoreCommentsFlyOutQuery.graphql"),a);var w=q.post,x=q.viewer;a=d("CometRelay").useFragment(j!==void 0?j:j=b("MDCAppStoreCommentsFlyOutQuery_post.graphql"),w);var y=(q=(q=a.comments)==null?void 0:q.__id)!=null?q:"";q=c("useMDCAppStoreV2Mutation")(k!==void 0?k:k=b("MDCAppStoreCommentsFlyOutCreateCommentMutation.graphql"),{suppressCometError:!0});var z=q[0];q=q[1];var A=function(){v(null);var a=w.id;z({variables:{input:{body:s,developer_post:a},connections:[y]},onCompleted:function(){t("")},onError:function(a){var b=d("GraphQLError").getErrorMessage(a);if(b!=null)v(b);else{var c;b=a.message;c=(c=a.description)!=null?c:"";r(a,b,{message:c,title:b,type:"skyline_error"})}}})};e=(e=a==null||(f=a.comments)==null?void 0:f.edges.map(function(a){a=a.node;return a}).filter(Boolean).map(function(a){return m.jsxs("div",{children:[m.jsx(c("MDCAppStoreComment.react"),{comment:a,connectionID:y,viewer:x}),m.jsx(c("MCDSHorizontalDivider.react"),{xstyle:c("mcdsMargin").vert32})]},a==null?void 0:a.id)}))!=null?e:[];var B=x==null?void 0:x.user;g=(g=B==null?void 0:B.alias)!=null?g:B==null?void 0:B.name;return m.jsxs(c("MCDSFlyOut.react"),{ariaLabel:h._(/*BTDS*/"Comments flyout"),isDismissable:!0,title:h._(/*BTDS*/"Comments ({count})",[h._param("count",a==null||(l=a.comments)==null?void 0:l.count)]),onClose:p,children:[m.jsxs(c("MCDSVerticalStack.react"),{gap:12,xstyle:c("mcdsMargin").bottom12,children:[m.jsxs(c("MCDSHorizontalStack.react"),{alignItems:"center",gap:12,children:[m.jsx(c("MDCAppStoreV2ProfilePhoto.react"),{userRef:x==null?void 0:x.user,useSmallIcon:!1}),m.jsx(c("MCDSText.react"),{type:"mcds-large-body-emphasized",children:g})]}),m.jsx(c("MCDSTextArea.react"),{label:h._(/*BTDS*/"Share a comment"),maxLength:140,value:s,onValueChange:t}),m.jsx(c("MCDSButton.react"),{isDisabled:s.length===0||q,isLoading:q,label:h._(/*BTDS*/"Submit"),type:"primary",onClick:A}),u!=null&&m.jsx(c("MCDSText.react"),{color:"error-label",xstyle:c("mcdsMargin").bottom20,children:h._(/*BTDS*/"An error occurred while submitting your comment. Please try again.")}),m.jsx(c("MCDSHorizontalDivider.react"),{xstyle:c("mcdsMargin").bottom32})]}),e]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----