"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[6233],{36233:(e,t,a)=>{a.r(t),a.d(t,{default:()=>k});var s=a(36418),l=a.n(s),o=a(14778),n=a(27695),r=a(60384),u=a(26366),c=a(45222),i=a(56158),m=a(68215),_=a(17638),d=a(37270),f=a(85406),E=a(49664),b=a(98496),h=a(78451);function p(e){let{show:t,title:a,message:s,showButton:n,buttonText:r,onDismiss:u}=e;const{formatMessage:c}=(0,o.useIntl)(),i=(0,d.useSelector)(b.S);if(!t||i)return null;const m=()=>{u()};return l().createElement(_.XF,{id:h.Bj},l().createElement("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"feature_toast"},l().createElement(f.PlaylistCheckIcon,{size:24,color:"blue",className:"feature_toast__icon"}),l().createElement("div",{className:"feature_toast__main_content"},l().createElement("div",{className:"feature_toast__header_content"},l().createElement("h3",null,a),l().createElement(E.WithTooltip,{title:c({id:"feature_toast.tooltipCloseBtn",defaultMessage:"Close"})},l().createElement("button",{className:"btn btn-icon btn-sm",onClick:m,"aria-label":c({id:"feature_toast.tooltipCloseBtn",defaultMessage:"Close"})},l().createElement(f.CloseIcon,{size:18})))),l().createElement("p",null,s),l().createElement("div",{className:"feature_toast__actions"},n&&l().createElement("button",{className:"btn btn-primary",onClick:m},r)))))}function k(){const{formatMessage:e}=(0,o.useIntl)(),t="true"===(0,c.A)("EnableShiftEscapeToMarkAllRead"),[a,_]=(0,i.A)(u.pm.CATEGORY_NEW_FEATURES,u.pm.HAS_SEEN_MARK_ALL_READ_FEATURE),[d,f]=(0,s.useState)(t&&!r.isMobile()&&!a);if(!t)return null;const E=e({id:"mark_all_as_read_toast.title",defaultMessage:"A new shortcut to clear unreads"}),b=l().createElement(o.FormattedMessage,{id:"mark_all_as_read_toast.message",defaultMessage:"Now you can use {shortcut} to mark all of your messages for this team as read. Don't worry, you'll be asked to confirm.",values:{shortcut:l().createElement(m.c_,{keys:[n.ShortcutKeys.shift,n.ShortcutKeys.escape],variant:m.lj.InlineContent})}}),h=e({id:"mark_all_as_read_toast.button",defaultMessage:"Got it"});return l().createElement(p,{show:d,showButton:!0,title:E,message:b,buttonText:h,onDismiss:()=>{f(!1),_("true")}})}},56158:(e,t,a)=>{a.d(t,{A:()=>u});var s=a(36418),l=a(37270),o=a(35631),n=a(3569),r=a(77440);function u(e,t){const a=(0,l.useDispatch)(),u=(0,l.useSelector)(n.WR),c=(0,l.useSelector)((a=>(0,r.Jt)(a,e,t))),i=(0,s.useCallback)((s=>{const l={category:e,name:t,user_id:u,value:s};return a((0,o.SF)(u,[l]))}),[e,a,t,u]);return(0,s.useMemo)((()=>[c,i]),[c,i])}}}]);
//# sourceMappingURL=6233.690f42b8650d9b323063.js.map