import{aa as c,ab as r}from"./_applist-tangy-colts-beg-36.js";import{_ as a}from"./main-tangy-colts-beg.js";import{h as i,s as E}from"./machine.-tangy-colts-beg-869.js";import{h as d,c as l}from"./googleca-tangy-colts-beg-652.js";import{a as o}from"./machineh-tangy-colts-beg-81.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,e){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,e),e)}};const s=c(({helpers:t})=>({states:{components:[l(t),{componentName:t.componentName.select,fieldType:"config",helperText:a("Select the calendar to check availability for."),id:"calendar-id",label:a("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:t.componentName.mixInput,helperText:a("Enter the start time for the availability check (e.g., 2025-12-20 00:00)."),id:"start-time",label:a("Start Date"),onChange:"SET_START_TIME",path:"timeMin",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:t.componentName.mixInput,helperText:a("Enter the end time for the availability check (e.g., 2025-12-20 23:59)."),id:"end-time",label:a("End Date"),onChange:"SET_END_TIME",path:"timeMax",render:"IF_CONNECTION_SELECTED",required:!0,value:[]}]},actions:{CONNECTION_ADD_CHANGE:d,HANDLE_SELECT_CALENDAR:i("calendarId"),IF_CONNECTION_SELECTED:({$:e})=>{var n;return r((n=e.getComponent("connection-id"))==null?void 0:n.value)},REFETCH_CALENDAR_LIST:({$:e})=>o(e),SET_END_TIME:i("timeMax"),SET_START_TIME:i("timeMin"),SET_CONNECTION:async({$:e,e:n})=>{i("connectionId")({$:e,e:n}),await o(e)},ON_MACHINE_LOAD:async({$:e})=>{E(e,[{db:"connectionId",id:"connection-id"},{db:"calendarId",id:"calendar-id"},{db:"timeMin",id:"start-time"},{db:"timeMax",id:"end-time"}]),await o(e)}}}));export{s as default};
