Liferay.Loader.define("change-tracking-web@2.0.73/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(t){return s.default.createElement(e,t)};var l=c(a("@frontend-taglib-clay$clayui/alert")),r=c(a("@frontend-taglib-clay$clayui/date-picker")),n=c(a("@frontend-taglib-clay$clayui/time-picker")),i=a("frontend-js-web"),s=c(a("liferay!frontend-js-react-web$react")),d=c(a("./ChangeTrackingBaseScheduleView"));function c(e){return e&&e.__esModule?e:{default:e}}class e extends d.default{constructor(e){super(e);const{redirect:t,rescheduleURL:a,scheduledDate:l,scheduledTime:r,spritemap:n,timeZone:i,unscheduleURL:s}=e;this.redirect=t,this.rescheduleURL=a,this.spritemap=n,this.timeZone=i,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(n.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,i.navigate)(this.redirect),type:"button"},Liferay.Language.get("cancel"))))))}}}}));
//# sourceMappingURL=ChangeTrackingRescheduleView.js.map