1"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[2539],{22539(e,t,a){a.r(t),a.d(t,{default:()=>v});var s=a(71633),n=a.n(s),r=a(36418),c=a(14778),l=a(37270),o=a(81911),d=a(65642),i=a(77440),u=a(73969),m=a(14776),f=a(26241),b=a(67173),p=a(45697),h=a(87131),E=a(81444);const C=(0,b.wV)(),S=r.createElement("i",{"data-testid":"scheduledPostIcon",className:"icon icon-draft-indicator icon-clock-send-outline"}),k=r.createElement("i",{"data-testid":"draftIcon",className:"icon icon-draft-indicator icon-pencil-outline"});function N(){const e=(0,l.useDispatch)(),t=(0,r.useRef)(!1),a=(0,l.useSelector)(i.LW),s=(0,l.useSelector)(C),b=(0,l.useSelector)(m.Sy),N=(0,l.useSelector)((e=>(0,u.cn)(e,b,!0))),v=(0,l.useSelector)(u.Ck),M=s>0||v&&N>0,g=(0,l.useSelector)((e=>(0,u.U)(e,b))),{url:L}=(0,o.useRouteMatch)(),_=(0,o.useRouteMatch)("/:team/drafts"),w=(0,o.useRouteMatch)("/:team/"+E.pj),I=Boolean(_||w),P=(0,r.useCallback)((()=>I),[I]);(0,r.useEffect)((()=>{a&&e((0,f.Vp)(b))}),[b,a,e]),(0,r.useEffect)((()=>{const a=!t.current;v&&e((0,d.cT)(b,a)),t.current=!0}),[e,v,b]);const D=v&&N>0,A=(0,r.useMemo)((()=>r.createElement(c.FormattedMessage,{id:"drafts.tooltipText",defaultMessage:"{draftCount, plural, =0 {} =1 {1 Draft} other {{draftCount} Drafts}} <br></br> {scheduledPostCount, plural, =0 {} other {{scheduledPostCount} Scheduled}}",values:{draftCount:s,scheduledPostCount:N,br:e=>s>0&&N>0?r.createElement(r.Fragment,null,r.createElement("br",null),e):null}})),[s,N]);return M||I?r.createElement("ul",{className:"SidebarDrafts NavGroupContent nav nav-pills__container"},r.createElement("li",{className:"SidebarChannel",tabIndex:-1,id:"sidebar-drafts-button"},r.createElement(o.NavLink,{to:`${L}/drafts`,id:"sidebarItem_drafts",activeClassName:"active",draggable:"false",className:"SidebarLink sidebar-item",tabIndex:0,isActive:P},r.createElement("i",{"data-testid":"sendPostIcon",className:"icon icon-send-post icon-send"}),r.createElement("div",{className:"SidebarChannelLinkLabel_wrapper"},r.createElement("span",{className:"SidebarChannelLinkLabel sidebar-item__name"},r.createElement(c.FormattedMessage,{id:"drafts.sidebarLink",defaultMessage:"Drafts"}))),r.createElement(h.A,{title:A},r.createElement("div",null,s>0&&r.createElement(p.A,{unreadMentions:s,icon:k}),D&&r.createElement(p.A,{unreadMentions:N,icon:S,className:n()("scheduledPostBadge",{persistent:g}),hasUrgent:g})))))):null}const v=(0,r.memo)(N)}}]); 2//# sourceMappingURL=2539.5b281447149937936b20.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.