import{aa as C,ab as n}from"./_applist-tangy-colts-beg-36.js";import{_ as t}from"./main-tangy-colts-beg.js";import{h as c,s as E}from"./machine.-tangy-colts-beg-869.js";import{h as s,c as d}from"./googleca-tangy-colts-beg-652.js";import{a as l,b as r}from"./machineh-tangy-colts-beg-81.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(o,e){return this.cache.has(o)?this.cache.get(o):(this.cache.set(o,e),e)}};const u=C(({helpers:o})=>({states:{components:[d(o),{componentName:o.componentName.select,fieldType:"config",helperText:t("Select the calendar to delete the access control rule from."),id:"calendar-id",label:t("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:t("Select the access control rule to delete."),id:"acl-rule-select",label:t("Select Access Control Rule"),onChange:"HANDLE_SELECT_ACL_RULE",onRefetch:"REFETCH_ACL_RULES_LIST",optionFilterProp:"label",options:[],path:"aclRuleId",render:"IF_CALENDAR_SELECTED",required:!0,showSearch:!0,value:void 0}]},actions:{CONNECTION_ADD_CHANGE:s,HANDLE_SELECT_ACL_RULE:c("aclRuleId"),IF_CONNECTION_SELECTED:({$:e})=>{var a;return n((a=e.getComponent("connection-id"))==null?void 0:a.value)},REFETCH_ACL_RULES_LIST:({$:e})=>r(e),REFETCH_CALENDAR_LIST:({$:e})=>l(e),SET_CONNECTION:async({$:e,e:a})=>{c("connectionId")({$:e,e:a}),await l(e)},HANDLE_SELECT_CALENDAR:async({$:e,e:a})=>{c("calendarId")({$:e,e:a}),await r(e)},IF_CALENDAR_SELECTED:({$:e})=>{var a,i;return n((a=e.getComponent("connection-id"))==null?void 0:a.value)&&n((i=e.getComponent("calendar-id"))==null?void 0:i.value)},ON_MACHINE_LOAD:async({$:e})=>{E(e,[{db:"connectionId",id:"connection-id"},{db:"calendarId",id:"calendar-id"},{db:"aclRuleId",id:"acl-rule-select"}]),await Promise.all([l(e),r(e)])}}}));export{u as default};
