"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[353],{20353:(e,t,s)=>{s.r(t),s.d(t,{default:()=>_});var a=s(86332),d=s.n(a),n=(s(14078),s(84390)),r=s.n(n),i=s(72060),o=s(6098),m=s(76956),u=s(35887),c=s(1065),l=s(9292),p=s(23712);function f(e){let{userId:t,timezone:s,onExited:a,postId:d,actions:f}=e;const _=(0,l.vB)(s),E=(0,m.b)(_),[k,b]=(0,n.useState)(E),g=(0,n.useCallback)((()=>{f.addPostReminder(t,d,(0,c.J5)(k.toDate()))}),[k]),[h,C]=(0,n.useState)(!1),{formatMessage:M}=(0,i.useIntl)();return(0,n.useEffect)((()=>{function e(e){(0,u.p)(e,p.default.KeyCodes.ESCAPE)&&!h&&a()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[h]),r().createElement(o.$E,{id:"PostReminderCustomTimePickerModal",ariaLabel:M({id:"post_reminder_custom_time_picker_modal.defaultMsg",defaultMessage:"Set a reminder"}),onExited:a,modalHeaderText:r().createElement(i.FormattedMessage,{id:"post_reminder.custom_time_picker_modal.header",defaultMessage:"Set a reminder"}),confirmButtonText:r().createElement(i.FormattedMessage,{id:"post_reminder.custom_time_picker_modal.submit_button",defaultMessage:"Set reminder"}),handleConfirm:g,handleEnterKeyPress:g,className:"post-reminder-modal",compassDesign:!0,keyboardEscape:!1},r().createElement(m.Z,{time:k,handleChange:b,timezone:s,setIsDatePickerOpen:C}))}f.propTypes={onExited:d().func.isRequired,postId:d().string.isRequired,actions:d().shape({addPostReminder:d().func.isRequired}).isRequired};const _=f}}]);
//# sourceMappingURL=353.fc08a51e8bdc094275e7.js.map