import{aa as E,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as t}from"./main-tangy-colts-beg.js";import{h as l,s as d}from"./machine.-tangy-colts-beg-869.js";import{h as i,c as C}from"./googleca-tangy-colts-beg-652.js";import{a as r}from"./machineh-tangy-colts-beg-81.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(n,e){return this.cache.has(n)?this.cache.get(n):(this.cache.set(n,e),e)}};const L=E(({helpers:n})=>({states:{components:[C(n),{componentName:n.componentName.switch,fieldType:"config",helperText:t("Turn on to select any calendar from the list."),id:"select-calendar-toggle",label:t("Select calendar from a list"),onChange:"SET_SELECT_CALENDAR_TOGGLE",render:"IF_CONNECTION_SELECTED",size:"small",value:!1},{componentName:n.componentName.mixInput,helperText:t("Enter the calendar ID to clear."),id:"calendar-input",label:t("Calendar ID"),onChange:"SET_CALENDAR_ID",path:"calendarMixInputId",render:"IF_CALENDAR_SELECTOR_NOT_SELECTED",required:!0,value:[]},{componentName:n.componentName.select,helperText:t("Select a calendar to clear."),id:"calendar-id",label:t("Select Calendar"),onChange:"HANDLE_SELECT_CALENDAR",onRefetch:"REFETCH_CALENDAR_LIST",optionFilterProp:"label",options:[],path:"calendarSelectorId",render:"IF_CALENDAR_SELECTOR_SELECTED",required:!0,showSearch:!0,value:void 0}]},actions:{CONNECTION_ADD_CHANGE:i,HANDLE_SELECT_CALENDAR:l("calendarSelectorId"),IF_CONNECTION_SELECTED:({$:e})=>{var a;return c((a=e.getComponent("connection-id"))==null?void 0:a.value)},REFETCH_CALENDAR_LIST:({$:e})=>r(e),SET_CALENDAR_ID:l("calendarMixInputId"),SET_SELECT_CALENDAR_TOGGLE:l("selectCalendarToggle"),SET_CONNECTION:async({$:e,e:a})=>{l("connectionId")({$:e,e:a}),await r(e)},IF_CALENDAR_SELECTOR_NOT_SELECTED:({$:e})=>{var a,o;return c((a=e.getComponent("connection-id"))==null?void 0:a.value)&&((o=e.getComponent("select-calendar-toggle"))==null?void 0:o.value)===!1},IF_CALENDAR_SELECTOR_SELECTED:({$:e})=>{var a,o;return c((a=e.getComponent("connection-id"))==null?void 0:a.value)&&((o=e.getComponent("select-calendar-toggle"))==null?void 0:o.value)===!0},ON_MACHINE_LOAD:async({$:e})=>{d(e,[{db:"connectionId",id:"connection-id"},{db:"calendarMixInputId",id:"calendar-input"},{db:"calendarSelectorId",id:"calendar-id"},{db:"selectCalendarToggle",id:"select-calendar-toggle"}]),await r(e)}}}));export{L as default};
