"use strict";(self["webpackChunk_zoom_client_email_desktop"]=self["webpackChunk_zoom_client_email_desktop"]||[]).push([[674],{78674:function(t,e,i){i.r(e),i.d(e,{default:function(){return u}});var o=function(){var t=this,e=t._self._c;return e("zm-dialog",{ref:"dialog",attrs:{visible:t.isVisible,title:t.title,"aria-labelledby":"title","close-on-click-modal":!0,"append-to-body":!0,"close-on-press-escape":!0},on:{"update:visible":function(e){t.isVisible=e},close:t.onCancel}},[e("zm-form",{ref:"expirationForm",attrs:{inline:"","label-width":"100px","label-position":"top"}},[e("p",[t._v(" "+t._s(t.$t("editor.expirationFormTip"))+" ")]),e("div",{staticClass:"dialog-body",on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.stopPropagation(),t.submitForm.apply(null,arguments))}}},[e("label",{attrs:{id:"set-expiration"}},[t._v(t._s(t.$t("expiration.setExpiration")))]),e("zm-select",{staticClass:"select-self-dark-mode size zm-select",attrs:{label:t.$t("expiration.setExpiration"),size:"large",popperClass:"select-dark-mode",autofocus:!0,"label-by":"set-expiration"},model:{value:t.expiration,callback:function(e){t.expiration=e},expression:"expiration"}},t._l(t.durationOptions,(function(t){return e("zm-option",{key:t.value,attrs:{label:t.label,value:t.value,disabled:t.disabled}})})),1)],1)]),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("div",{staticClass:"footer-left"},[t.ruleActive?e("zm-button",{attrs:{plain:""},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.onRemove.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("operation.remove"))+" ")]):t._e()],1),e("div",[e("zm-button",{attrs:{type:"secondary"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.onCancel.apply(null,arguments)}}},[t._v(" "+t._s(t.cancelText||t.$t("operation.cancel"))+" ")]),e("zm-button",{attrs:{type:"primary"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.submitForm.apply(null,arguments)}}},[t._v(t._s(t.okText||t.$t("operation.save"))+" ")])],1)])],1)},n=[],a=i(76635),l={name:"ExpirationDialog",props:{title:String,defaultExpiration:{type:Number,default:2592e3},okText:{type:String,default:""},cancelText:{type:String,default:""},show:{type:Boolean,default:!1},ruleActive:{type:Boolean,default:!1}},data:function(){return{expiration:this.defaultExpiration,isVisible:!1,durationOptions:[{label:this.$t("time.oneDay"),value:86400},{label:this.$t("time.oneWeek"),value:604800},{label:this.$t("time.oneMonth"),value:2592e3}]}},computed:{header:function(){return(0,a.upperFirst)(this.title||"")}},watch:{show:function(t){this.isVisible=t,this.expiration=this.defaultExpiration}},methods:{reset:function(){this.expiration=this.defaultExpiration},onRemove:function(){this.$emit("onRemove")},onCancel:function(){this.reset(),this.$emit("onCancel")},submitForm:function(){this.$emit("onOk",this.expiration)}}},s=l,r=i(93483),p=(0,r.Z)(s,o,n,!1,null,"3f621a47",null),u=p.exports}}]);