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