(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".activity-frequency__label[data-v-fbfa02d5]{margin-top:24px;display:inline-block}.notification-frequency__select[data-v-fbfa02d5]{margin-left:calc(var(--default-grid-baseline) * 2)}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
import{H as l,b as m,d as b,o as d,h as u,g as y,i as I,t as s,c as S,l as h,f as n,R as f}from"./translation-CD_FiYBO-D7oPP82T.chunk.mjs";import{m as E,a as v,N as L,A as q,s as N}from"./settings-store-B-jKzRoi.chunk.mjs";import{b as g,x as M}from"./_plugin-vue_export-helper-CY9R8fiO.chunk.mjs";import"./_commonjsHelpers-Cqwegr3R.chunk.mjs";import"./index-_4HphU9w-C4LfPePy.chunk.mjs";import"./logger-bSyXKk3f.chunk.mjs";const F={name:"DailySummary",components:{NcCheckboxRadioSwitch:M,NcSettingsSection:L},computed:{...v(["activityDigestEnabled"])},mounted(){this.setEndpoint({endpoint:"/apps/activity/settings"})},methods:{...E(["setEndpoint","toggleActivityDigestEnabled"]),t:l}};function Y(t,a,_,p,i,e){const c=m("NcCheckboxRadioSwitch"),r=m("NcSettingsSection");return d(),b(r,{name:e.t("activity","Daily activity summary")},{default:u(()=>[y(c,{"data-cy-checkbox":"",modelValue:t.activityDigestEnabled,"onUpdate:modelValue":[a[0]||(a[0]=o=>t.activityDigestEnabled=o),a[1]||(a[1]=o=>t.toggleActivityDigestEnabled({activityDigestEnabled:o}))]},{default:u(()=>[I(s(e.t("activity","Send daily activity summary in the morning")),1)]),_:1},8,["modelValue"])]),_:1},8,["name"])}const B=g(F,[["render",Y]]),k={EmailFrequency:{EMAIL_SEND_HOURLY:0,EMAIL_SEND_DAILY:1,EMAIL_SEND_WEEKLY:2,EMAIL_SEND_ASAP:3}},w={name:"EmailSettings",data(){return{EmailFrequency:k.EmailFrequency}},computed:{...v(["emailEnabled","isEmailSet","settingBatchtime"])},methods:{...E(["setSettingBatchtime"]),t:l}},R={key:0},C={key:0},H={for:"activity_setting_batchtime",class:"activity-frequency__label"},U=["value","selected"],x=["value","selected"],W=["value","selected"],K=["value","selected"];function O(t,a,_,p,i,e){return t.emailEnabled?(d(),S("div",R,[t.isEmailSet?h("",!0):(d(),S("p",C,[n("strong",null,s(e.t("activity","You need to set up your email address before you can receive notification emails.")),1)])),n("p",null,[n("label",H,s(e.t("activity","Send activity emails")),1),n("select",{id:"activity_setting_batchtime",class:"notification-frequency__select",name:"activity_setting_batchtime",onChange:a[0]||(a[0]=c=>t.setSettingBatchtime({settingBatchtime:c.target.value}))},[n("option",{value:i.EmailFrequency.EMAIL_SEND_ASAP,selected:t.settingBatchtime===i.EmailFrequency.EMAIL_SEND_ASAP},s(e.t("activity","As soon as possible")),9,U),n("option",{value:i.EmailFrequency.EMAIL_SEND_HOURLY,selected:t.settingBatchtime===i.EmailFrequency.EMAIL_SEND_HOURLY},s(e.t("activity","Hourly")),9,x),n("option",{value:i.EmailFrequency.EMAIL_SEND_DAILY,selected:t.settingBatchtime===i.EmailFrequency.EMAIL_SEND_DAILY},s(e.t("activity","Daily")),9,W),n("option",{value:i.EmailFrequency.EMAIL_SEND_WEEKLY,selected:t.settingBatchtime===i.EmailFrequency.EMAIL_SEND_WEEKLY},s(e.t("activity","Weekly")),9,K)],32)])])):h("",!0)}const P=g(w,[["render",O],["__scopeId","data-v-fbfa02d5"]]),V={name:"UserSettings",components:{NcSettingsSection:L,EmailSettings:P,ActivityGrid:q},computed:{...v({emailEnabled:"emailEnabled"}),settingDescription(){return this.emailEnabled?l("activity","Choose for which activities you want to get an email or push notification."):l("activity","Choose for which activities you want to get a push notification.")}},mounted(){this.setEndpoint({endpoint:"/apps/activity/settings"})},methods:{...E(["setEndpoint"]),t:l}};function G(t,a,_,p,i,e){const c=m("ActivityGrid"),r=m("EmailSettings"),o=m("NcSettingsSection");return d(),b(o,{name:e.t("activity","Activity"),description:e.settingDescription},{default:u(()=>[y(c),y(r)]),_:1},8,["name","description"])}const j=g(V,[["render",G]]),A=f(j);A.use(N),A.mount("#activity-user-settings");const D=f(B);D.use(N),D.mount("#activity-digest-user-settings");
//# sourceMappingURL=activity-personalSettings.mjs.map
