"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[353],{20353:(e,t,s)=>{s.r(t),s.d(t,{default:()=>_});var a=s(23615),d=s.n(a),n=(s(14078),s(84390)),r=s.n(n),i=s(72060),o=s(6098),m=s(76956),u=s(23712),c=s(1065),l=s(35887),p=s(9292);function f(e){let{userId:t,timezone:s,onExited:a,postId:d,actions:f}=e;const _=(0,p.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,l.p)(e,u.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.9404a5a3e40a2b46c255.js.map