(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-71269fa2"],{"561e":function(t,e,o){"use strict";o("6858")},6858:function(t,e,o){},9120:function(t,e,o){"use strict";o("ad61")},9270:function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("div",[o("i",{class:t.trigger.icon}),t._v(" "+t._s(t.trigger.label)+" "),t.fullDate?o("span",{staticClass:"full-date"},[t._v("( "+t._s(t.fullDate)+" )")]):t._e()]),o("b-modal",{attrs:{id:"date-modal",title:"Date",size:"lg"},scopedSlots:t._u([{key:"modal-footer",fn:function(){return[o("b-button",{attrs:{variant:"primary"},on:{click:t.save}},[t._v("Save")])]},proxy:!0}]),model:{value:t.isShowModal,callback:function(e){t.isShowModal=e},expression:"isShowModal"}},[o("div",{staticClass:"row"},[o("div",{staticClass:"col-12"},[o("div",{staticClass:"form-group"},[o("label",[t._v("Keywords")]),o("multiselect",{attrs:{options:t.keywords,multiple:!0,"track-by":"id",placeholder:"Select keywords",label:"name"},model:{value:t.automation.keywords,callback:function(e){t.$set(t.automation,"keywords",e)},expression:"automation.keywords"}})],1)]),o("div",{staticClass:"col-3"},[o("label",[t._v("Month")]),o("select",{directives:[{name:"model",rawName:"v-model",value:t.automation.options.month,expression:"automation.options.month"}],staticClass:"form-control",on:{change:function(e){var o=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.automation.options,"month",e.target.multiple?o:o[0])}}},[o("option",{attrs:{value:""}},[t._v("Month")]),t._l(12,(function(e){return o("option",{key:e,domProps:{value:""+(e<=9?0:"")+e}},[t._v(t._s(("00"+e).slice(-2)))])}))],2)]),o("div",{staticClass:"col-3"},[o("label",[t._v("Day")]),o("select",{directives:[{name:"model",rawName:"v-model",value:t.automation.options.day,expression:"automation.options.day"}],staticClass:"form-control",on:{change:function(e){var o=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.automation.options,"day",e.target.multiple?o:o[0])}}},[o("option",{attrs:{value:""}},[t._v("Day")]),t._l(31,(function(e){return o("option",{key:e,domProps:{value:""+(e<=9?0:"")+e}},[t._v(t._s(("00"+e).slice(-2)))])}))],2)]),o("div",{staticClass:"col-6"},[o("label",[t._v("Time to Send")]),o("TimePicker",{model:{value:t.automation.options.time,callback:function(e){t.$set(t.automation.options,"time",e)},expression:"automation.options.time"}})],1),o("div",{staticClass:"col-md-12 mt-2"},[o("strong",[o("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:"You can edit this timezone in settings page."}},[t._v("Timezone: "+t._s(t.settingTimezone))])]),o("div",[t._v("Current Time: "+t._s(t.serverTime))])])]),o("div",{staticClass:"form-group mt-3 small-checkbox"},[o("b-form-checkbox",{attrs:{name:"stop_on_reply"},model:{value:t.automation.options.stop_on_reply,callback:function(e){t.$set(t.automation.options,"stop_on_reply",e)},expression:"automation.options.stop_on_reply"}},[t._v(" Stop on contact reply "),o("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"cursor-pointer",staticStyle:{"vertical-align":"middle"},attrs:{title:"When someone replies to a message in the automation the remainder of the automation will be cancelled"}},[o("i",{staticClass:"uil uil-question-circle"})])])],1)])],1)},s=[],i=o("7f45"),n=o.n(i),l=o("8e5f"),r=o.n(l),u={components:{Multiselect:r.a},props:{automation:{type:Object,default:null},blocks:{type:Array,default:null},trigger:{type:Object,default:null}},data(){return{isShowModal:!1,keywords:[],timePicker:{enableTime:!0,noCalendar:!0,dateFormat:"G:i K"}}},computed:{user(){return this.$store.getters["auth/user"]},localTimeZone(){let t=n.a.tz.guess();return`(UTC${n()().tz(t).format("Z")}) ${t}`},localTime(){return n()().format("MMM D, YYYY hh:mm A")},serverTime(){let t=this.user&&this.user.business?this.user.business.timezone:n.a.tz.guess();return n()().tz(t).format("MMM D, YYYY hh:mm A")},settingTimezone(){let t=this.user&&this.user.business?this.user.business.timezone:n.a.tz.guess();return`(UTC${n()().tz(t).format("Z")}) ${t}`},fullDate(){return this.automation.options.month+"/"+this.automation.options.day+" "+n()(this.automation.options.time,"HH:mm").format("hh:mm A")}},mounted(){const t=("0"+n()().month()).slice(-2),e=("0"+n()().day()).slice(-2);this.automation.options={month:t,day:e,campaigns:[],time:"09:00",...this.automation.options},this.$parent.$on("showModal",this.showModal)},methods:{save(){this.isShowModal=!1},showModal(){this.getKeywords(),this.isShowModal=!0},getKeywords(){this.$store.dispatch("coupon/getKeywordsWithoutDemo").then(t=>{this.keywords=t}).catch(()=>{})}}},m=u,c=(o("561e"),o("9120"),o("2877")),d=Object(c["a"])(m,a,s,!1,null,"4394e636",null);e["default"]=d.exports},ad61:function(t,e,o){}}]);
//# sourceMappingURL=chunk-71269fa2.22d82f06.js.map