Liferay.Loader.define("change-tracking-web@2.0.84/publications/js/ChangeTrackingRescheduleView",["module","exports","require","@frontend-taglib-clay$clayui/alert","@frontend-taglib-clay$clayui/date-picker","@frontend-taglib-clay$clayui/time-picker","frontend-js-web","liferay!frontend-js-react-web$react","./ChangeTrackingBaseScheduleView"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function _default(e){return s.default.createElement(ChangeTrackingRescheduleView,e)};var l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/alert")),r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/date-picker")),i=_interopRequireDefault(a("@frontend-taglib-clay$clayui/time-picker")),n=a("frontend-js-web"),s=_interopRequireDefault(a("liferay!frontend-js-react-web$react")),u=_interopRequireDefault(a("./ChangeTrackingBaseScheduleView"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}class ChangeTrackingRescheduleView extends u.default{constructor(e){super(e);const{redirect:t,rescheduleURL:a,scheduledDate:l,scheduledTime:r,spritemap:i,timeZone:n,unscheduleURL:s}=e;this.redirect=t,this.rescheduleURL=a,this.spritemap=i,this.timeZone=n,this.unscheduleURL=s,this.state={date:l,dateError:"",formError:null,time:r,timeError:"",validationError:null}}render(){return s.default.createElement("div",{className:"sheet sheet-lg"},s.default.createElement("div",{className:"sheet-header"},s.default.createElement("h2",{className:"sheet-title"},Liferay.Language.get("reschedule-publication"))),s.default.createElement("div",{className:"sheet-section"},s.default.createElement("label",null,Liferay.Language.get("date-and-time")),s.default.createElement("div",{className:"input-group"},s.default.createElement("div",{className:this.getDateClassName()},s.default.createElement("div",null,s.default.createElement(r.default,{onValueChange:this.handleDateChange,placeholder:"YYYY-MM-DD",spritemap:this.spritemap,timezone:this.timeZone,value:"string"==typeof this.state.date?this.state.date:this.state.date.getFullYear()+"-"+this.pad(this.state.date.getMonth()+1)+"-"+this.pad(this.state.date.getDate()),years:{end:(new Date).getFullYear()+1,start:(new Date).getFullYear()-1}}),this.getDateHelpText())),s.default.createElement("div",{className:this.getTimeClassName()},s.default.createElement("div",null,s.default.createElement(i.default,{onChange:this.handleTimeChange,spritemap:this.spritemap,timezone:this.timeZone,value:this.state.time}),this.getTimeHelpText())))),this.state.formError&&s.default.createElement(l.default,{displayType:"danger",spritemap:this.spritemap,title:this.state.formError}),s.default.createElement("div",{className:"sheet-footer sheet-footer-btn-block-sm-down"},s.default.createElement("div",{className:"btn-group"},s.default.createElement("div",{className:"btn-group-item"},s.default.createElement("button",{className:"btn btn-primary",onClick:()=>this.doSchedule(this.rescheduleURL),type:"button"},Liferay.Language.get("reschedule"))),s.default.createElement("div",{className:"btn-group-item"},s.default.createElement("button",{className:"btn btn-secondary",onClick:()=>submitForm(document.hrefFm,this.unscheduleURL),type:"button"},Liferay.Language.get("unschedule"))),s.default.createElement("div",{className:"btn-group-item"},s.default.createElement("button",{className:"btn btn-outline-borderless btn-secondary",onClick:()=>(0,n.navigate)(this.redirect),type:"button"},Liferay.Language.get("cancel"))))))}}}}));
//# sourceMappingURL=ChangeTrackingRescheduleView.js.map