(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)}})();
var Y=Object.defineProperty,B=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var D=(t,e,i)=>e in t?Y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,c=(t,e)=>{for(var i in e||(e={}))w.call(e,i)&&D(t,i,e[i]);if(A)for(var i of A(e))C.call(e,i)&&D(t,i,e[i]);return t},d=(t,e)=>B(t,k(e));import{V as r,A as y,e as u,g as I,m as v,l as g,q as R,t as o,f,j as s,M as b,a2 as q}from"./translation-DoG5ZELJ-RouwhTfm.chunk.mjs";import{m as _,a as p,N as M,A as U,s as F}from"./settings-store-D19b-kFW.chunk.mjs";import{f as S,y as H}from"./_plugin-vue_export-helper-BY6mtUkE.chunk.mjs";import"./_commonjsHelpers-Cqwegr3R.chunk.mjs";import"./index-Di7pBM75.chunk.mjs";import"./logger-C3hd40pU.chunk.mjs";const V={name:"DailySummary",components:{NcCheckboxRadioSwitch:H,NcSettingsSection:M},computed:c({},p(["activityDigestEnabled"])),mounted(){this.setEndpoint({endpoint:"/apps/activity/settings"})},methods:d(c({},_(["setEndpoint","toggleActivityDigestEnabled"])),{t:r})};function W(t,e,i,h,n,a){const l=y("NcCheckboxRadioSwitch"),E=y("NcSettingsSection");return u(),I(E,{name:a.t("activity","Daily activity summary")},{default:v(()=>[g(l,{"data-cy-checkbox":"",modelValue:t.activityDigestEnabled,"onUpdate:modelValue":[e[0]||(e[0]=m=>t.activityDigestEnabled=m),e[1]||(e[1]=m=>t.toggleActivityDigestEnabled({activityDigestEnabled:m}))]},{default:v(()=>[R(o(a.t("activity","Send daily activity summary in the morning")),1)]),_:1},8,["modelValue"])]),_:1},8,["name"])}const x=S(V,[["render",W]]),K={EmailFrequency:{EMAIL_SEND_HOURLY:0,EMAIL_SEND_DAILY:1,EMAIL_SEND_WEEKLY:2,EMAIL_SEND_ASAP:3}},O={name:"EmailSettings",data(){return{EmailFrequency:K.EmailFrequency}},computed:c({},p(["emailEnabled","isEmailSet","settingBatchtime"])),methods:d(c({},_(["setSettingBatchtime"])),{t:r})},P={key:0},G={key:0},j={for:"activity_setting_batchtime",class:"activity-frequency__label"},z=["value","selected"],T=["value","selected"],J=["value","selected"],Q=["value","selected"];function X(t,e,i,h,n,a){return t.emailEnabled?(u(),f("div",P,[t.isEmailSet?b("",!0):(u(),f("p",G,[s("strong",null,o(a.t("activity","You need to set up your email address before you can receive notification emails.")),1)])),s("p",null,[s("label",j,o(a.t("activity","Send activity emails")),1),s("select",{id:"activity_setting_batchtime",class:"notification-frequency__select",name:"activity_setting_batchtime",onChange:e[0]||(e[0]=l=>t.setSettingBatchtime({settingBatchtime:l.target.value}))},[s("option",{value:n.EmailFrequency.EMAIL_SEND_ASAP,selected:t.settingBatchtime===n.EmailFrequency.EMAIL_SEND_ASAP},o(a.t("activity","As soon as possible")),9,z),s("option",{value:n.EmailFrequency.EMAIL_SEND_HOURLY,selected:t.settingBatchtime===n.EmailFrequency.EMAIL_SEND_HOURLY},o(a.t("activity","Hourly")),9,T),s("option",{value:n.EmailFrequency.EMAIL_SEND_DAILY,selected:t.settingBatchtime===n.EmailFrequency.EMAIL_SEND_DAILY},o(a.t("activity","Daily")),9,J),s("option",{value:n.EmailFrequency.EMAIL_SEND_WEEKLY,selected:t.settingBatchtime===n.EmailFrequency.EMAIL_SEND_WEEKLY},o(a.t("activity","Weekly")),9,Q)],32)])])):b("",!0)}const Z=S(O,[["render",X],["__scopeId","data-v-fbfa02d5"]]),$={name:"UserSettings",components:{NcSettingsSection:M,EmailSettings:Z,ActivityGrid:U},computed:d(c({},p({emailEnabled:"emailEnabled"})),{settingDescription(){return this.emailEnabled?r("activity","Choose for which activities you want to get an email or push notification."):r("activity","Choose for which activities you want to get a push notification.")}}),mounted(){this.setEndpoint({endpoint:"/apps/activity/settings"})},methods:d(c({},_(["setEndpoint"])),{t:r})};function tt(t,e,i,h,n,a){const l=y("ActivityGrid"),E=y("EmailSettings"),m=y("NcSettingsSection");return u(),I(m,{name:a.t("activity","Activity"),description:a.settingDescription},{default:v(()=>[g(l),g(E)]),_:1},8,["name","description"])}const et=S($,[["render",tt]]),L=q(et);L.use(F),L.mount("#activity-user-settings");const N=q(x);N.use(F),N.mount("#activity-digest-user-settings");
//# sourceMappingURL=activity-personalSettings.mjs.map
