import{aa as r,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{h as t,s as i}from"./machine.-tangy-colts-beg-869.js";import{h as d,c as E}from"./googleca-tangy-colts-beg-652.js";import{a as n}from"./machineh-tangy-colts-beg-81.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(o,a){return this.cache.has(o)?this.cache.get(o):(this.cache.set(o,a),a)}};const m=r(({helpers:o})=>({states:{components:[E(o),{componentName:o.componentName.select,fieldType:"config",helperText:e("Select the calendar for the access control rule."),id:"calendar-id",label:e("Select Calendar"),onChange:"HANDLE_SELECT_CALENDAR",onRefetch:"REFETCH_CALENDAR_LIST",options:[],path:"calendar-id",render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:o.componentName.select,helperText:e("Select the role for the access control rule."),id:"role",label:e("Role"),onChange:"SET_ROLE",options:[{label:e("Free Busy Reader"),value:"freeBusyReader"},{label:e("Reader"),value:"reader"},{label:e("Writer"),value:"writer"},{label:e("Owner"),value:"owner"}],path:"role",render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:o.componentName.select,helperText:e("Select the scope type for the access control rule."),id:"scope-type",label:e("Scope Type"),onChange:"SET_SCOPE_TYPE",options:[{label:e("Default"),value:"default"},{label:e("User"),value:"user"},{label:e("Group"),value:"group"},{label:e("Domain"),value:"domain"}],path:"scope.type",render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:o.componentName.mixInput,helperText:e("Enter the email address or domain value based on the scope type."),id:"value",label:e("Value"),onChange:"SET_VALUE",path:"scope.value",render:"IF_CONNECTION_SELECTED",required:!0,value:[]}]},actions:{CONNECTION_ADD_CHANGE:d,HANDLE_SELECT_CALENDAR:t("calendarId"),IF_CONNECTION_SELECTED:({$:a})=>{var l;return c((l=a.getComponent("connection-id"))==null?void 0:l.value)},REFETCH_CALENDAR_LIST:({$:a})=>n(a),SET_ROLE:t("role"),SET_SCOPE_TYPE:t("scopeType"),SET_VALUE:t("value"),SET_CONNECTION:async({$:a,e:l})=>{t("connectionId")({$:a,e:l}),await n(a)},ON_MACHINE_LOAD:async({$:a})=>{i(a,[{db:"connectionId",id:"connection-id"},{db:"calendarId",id:"calendar-id"},{db:"role",id:"role"},{db:"scopeType",id:"scope-type"},{db:"value",id:"value"}]),await n(a)}}}));export{m as default};
