import{aa as s,ab as i}from"./_applist-tangy-colts-beg-36.js";import{_ as a}from"./main-tangy-colts-beg.js";import{h as o,s as r}from"./machine.-tangy-colts-beg-869.js";import{h as l,c as N}from"./googleca-tangy-colts-beg-652.js";import{f as E,a as c}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 p=s(({helpers:t})=>({states:{components:[N(t),{componentName:t.componentName.select,fieldType:"config",helperText:a("Select the calendar containing the event."),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.select,helperText:a("Select an event from the calendar."),id:"event-select",label:a("Select Event"),onChange:"HANDLE_SELECT_EVENT",onRefetch:"REFETCH_EVENTS_LIST",optionFilterProp:"label",options:[],path:"eventSelectorId",render:"IF_CALENDAR_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:t.componentName.mixInput,helperText:a("Enter attendee email addresses separated by commas."),id:"attendees",label:a("Attendee Emails"),onChange:"SET_ATTENDEES",path:"attendees",render:"IF_CALENDAR_SELECTED",required:!0,value:[]},{componentName:t.componentName.switch,helperText:a("Whether to send notifications about the event update."),id:"send-notifications",label:a("Send Notifications"),onChange:"SET_SEND_NOTIFICATIONS",path:"sendNotifications",render:"IF_CALENDAR_SELECTED",size:"small",value:!1}]},actions:{CONNECTION_ADD_CHANGE:l,HANDLE_SELECT_EVENT:o("eventSelectorId"),IF_CONNECTION_SELECTED:({$:e})=>{var n;return i((n=e.getComponent("connection-id"))==null?void 0:n.value)},REFETCH_CALENDAR_LIST:({$:e})=>c(e),REFETCH_EVENTS_LIST:({$:e})=>E(e),SET_ATTENDEES:o("attendees"),SET_SEND_NOTIFICATIONS:o("sendNotifications"),SET_CONNECTION:async({$:e,e:n})=>{o("connectionId")({$:e,e:n}),await c(e)},HANDLE_SELECT_CALENDAR:async({$:e,e:n})=>{o("calendarId")({$:e,e:n}),await E(e)},IF_CALENDAR_SELECTED:({$:e})=>{var n,d;return i((n=e.getComponent("connection-id"))==null?void 0:n.value)&&i((d=e.getComponent("calendar-id"))==null?void 0:d.value)},ON_MACHINE_LOAD:async({$:e})=>{r(e,[{db:"connectionId",id:"connection-id"},{db:"calendarId",id:"calendar-id"},{db:"eventSelectorId",id:"event-select"},{db:"attendees",id:"attendees"},{db:"sendNotifications",id:"send-notifications"}]),await Promise.all([c(e),E(e)])}}}));export{p as default};
