"use strict";(self["webpackChunk_zoom_client_email_desktop"]=self["webpackChunk_zoom_client_email_desktop"]||[]).push([[280],{44280:function(t,e,i){i.r(e),i.d(e,{default:function(){return c}});var o=function(){var t=this,e=t._self._c;return e("zm-dialog",{ref:"dialog",attrs:{visible:t.isVisible,title:t.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"},[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","label-by":"set-expiration","zm-ta":"password-protection-expiration-select"},model:{value:t.expiration,callback:function(e){t.expiration=e},expression:"expiration"}},t._l(t.durationOptions,(function(i){return e("zm-option",{key:i.value,attrs:{label:i.label,value:i.value,disabled:i.disabled,"zm-ta":"password-protection-expiration-select"+i.value},nativeOn:{click:function(e){return t.reportMetric(i)}}})})),1)],1)]),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("div",{staticClass:"footer-left"},[t.ruleActive?e("zm-button",{attrs:{plain:"","zm-ta":"password-protection-remove"},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","zm-ta":"password-protection-cancel"},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","zm-ta":"password-protection-save"},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(37761),r={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"),this.$metric.report("remove_password_protection")},onCancel:function(){this.reset(),this.$emit("onCancel"),this.$metric.report("cancel_password_protection")},submitForm:function(){this.$emit("onOk",this.expiration),this.$metric.report("create_password_protection")},reportMetric:function(t){86400===t.value?this.$metric.report("password_protection_one_day"):604800===t.value?this.$metric.report("password_protection_one_week"):2592e3===t.value&&this.$metric.report("password_protection_one_month")}}},s=r,l=i(93483),p=(0,l.Z)(s,o,n,!1,null,"06911bf8",null),c=p.exports}}]);