"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[7672],{7672:(a,e,t)=>{t.d(e,{default:()=>h});var n=t(62688),o=t.n(n),s=t(36418),l=t.n(s),i=t(14778),r=t(37270),d=t(14696),c=t(52729),m=t(271),_=t(67416),u=t(78451),g=t(92008);function w(a){let{postId:e,onExited:t,onHide:n}=a;const o=(0,i.useIntl)(),s=(0,r.useSelector)((a=>(0,c.f5)(a,e)));if(!s)return null;const w=(0,g.AT)(s,o.locale),h=(null==w?void 0:w.source_lang)||"unknown";return l().createElement(d.zW,{id:"showTranslationModal",className:"ShowTranslationModal a11y__modal",show:!0,onHide:()=>{n&&n()},onExited:t,ariaLabelledby:"showTranslationModalLabel",compassDesign:!0,modalHeaderText:o.formatMessage({id:"show_translation.modal.title",defaultMessage:"Show Translation"})},l().createElement("div",{className:"ShowTranslationModal__content"},l().createElement("div",{className:"ShowTranslationModal__messageBlock ShowTranslationModal__messageBlock--original"},l().createElement("div",{className:"ShowTranslationModal__badgeContainer"},l().createElement("span",{className:"ShowTranslationModal__languageText"},"unknown"===h?o.formatMessage({id:"show_translation.unknown_language",defaultMessage:"Unknown"}):o.formatDisplayName(h,{type:"language"})),l().createElement(_.A,{text:o.formatMessage({id:"show_translation.original_badge",defaultMessage:"ORIGINAL"}),variant:"info",size:"xs"})),l().createElement("div",{className:"ShowTranslationModal__postContent"},l().createElement(m.A,{post:s,isChannelAutotranslated:!1,location:u.Hc.MODAL,preventClickInteraction:!0}))),l().createElement("div",{className:"ShowTranslationModal__messageBlock ShowTranslationModal__messageBlock--translated"},l().createElement("div",{className:"ShowTranslationModal__badgeContainer"},l().createElement("span",{className:"ShowTranslationModal__languageText"},o.formatDisplayName(o.locale,{type:"language"})),l().createElement(_.A,{text:o.formatMessage({id:"show_translation.auto_translated_badge",defaultMessage:"AUTO-TRANSLATED"}),variant:"default",size:"xs"})),l().createElement("div",{className:"ShowTranslationModal__postContent"},l().createElement(m.A,{post:s,isChannelAutotranslated:!0,location:u.Hc.MODAL,preventClickInteraction:!0})))))}w.propTypes={postId:o().string.isRequired,onExited:o().func,onHide:o().func};const h=w}}]);
//# sourceMappingURL=7672.d54cd6a78f461e7724f9.js.map