import{j as t}from"./client-By3tlFYA.js";import{r as j}from"./index-TEHZzOO_.js";import{j as u,er as m,dg as h,I as f,S as v,av as r,aq as N}from"./useSelectableClick-DfiwdSfn.js";import{I as C}from"./inline_account-BHZj8Cl2.js";import{M}from"./media_attachments-BHpodw5A.js";import{R as y}from"./relative_timestamp-BOUL06oe.js";import{M as c}from"./message-CVkQtbZv.js";import"./index-DkCxcZFY.js";import"./short_number-C9zm8Jg6.js";import"./numbers-BLyy7tyF.js";import"./index-DUY7J2K7.js";import"./skeleton-CwYXpOUk.js";import"./api-C8Dh2R2O.js";import"./index-DiPYjm3h.js";import"./ready-DpOgoWSg.js";import"./load_locale-D22EJFIq.js";import"./status_quoted-DnIkn1ll.js";const I=(s,{statusId:o})=>({language:s.getIn(["statuses",o,"language"]),versions:s.getIn(["history",o,"items"])}),S=s=>({onClose(){s(N({modalType:void 0,ignoreFocus:!1}))}});class T extends j.PureComponent{render(){const{index:o,versions:d,language:a,onClose:p}=this.props,e=d.get(o),g=e.get("content"),x=m(e.get("spoiler_text")),n=t.jsx(y,{timestamp:e.get("created_at"),short:!1}),l=t.jsx(C,{accountId:e.get("account")}),_=e.get("original")?t.jsx(c,{id:"status.history.created",defaultMessage:"{name} created {date}",values:{name:l,date:n}}):t.jsx(c,{id:"status.history.edited",defaultMessage:"{name} edited {date}",values:{name:l,date:n}});return t.jsx("div",{className:"modal-root__modal compare-history-modal",children:t.jsxs(h,{emojis:e.get("emojis"),children:[t.jsxs("div",{className:"report-modal__target",children:[t.jsx(f,{className:"report-modal__close",icon:"times",iconComponent:v,onClick:p,size:20}),_]}),t.jsx("div",{className:"compare-history-modal__container",children:t.jsxs("div",{className:"status__content",children:[e.get("spoiler_text").length>0&&t.jsxs(t.Fragment,{children:[t.jsx(r,{className:"translate",htmlString:x,lang:a}),t.jsx("hr",{})]}),t.jsx(r,{className:"status__content__text status__content__text--visible translate",htmlString:g,lang:a}),!!e.get("poll")&&t.jsx("div",{className:"poll",children:t.jsx("ul",{children:e.getIn(["poll","options"]).map(i=>t.jsx("li",{children:t.jsxs("label",{className:"poll__option editable",children:[t.jsx("span",{className:"poll__input"}),t.jsx(r,{as:"span",className:"poll__option__text translate",htmlString:m(i.get("title")),lang:a})]})},i.get("title")))})}),t.jsx(M,{status:e,lang:a})]})})]})})}}const J=u(I,S)(T);export{J as default};
//# sourceMappingURL=compare_history_modal-BDSHr0nP.js.map
