import{aa as d,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{h as a,s as r}from"./machine.-tangy-colts-beg-869.js";import{h as l,c as s}from"./googleca-tangy-colts-beg-652.js";import{f as i,a as E}from"./machineh-tangy-colts-beg-81.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(n,t){return this.cache.has(n)?this.cache.get(n):(this.cache.set(n,t),t)}};const S=d(({helpers:n})=>({states:{components:[s(n),{componentName:n.componentName.select,fieldType:"config",helperText:e("Select the calendar where you want to create the event."),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:n.componentName.select,helperText:e("Select an event from the calendar."),id:"event-select",label:e("Select Event"),onChange:"HANDLE_SELECT_EVENT",onRefetch:"REFETCH_EVENTS_LIST",optionFilterProp:"label",options:[],path:"eventSelectorId",render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:n.componentName.mixInput,helperText:e("Enter the event title or subject."),id:"summary",label:e("Summary"),onChange:"SET_SUMMARY",path:"summary",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:n.componentName.mixInput,helperText:e("Enter a description for the event."),id:"description",label:e("Description"),onChange:"SET_DESCRIPTION",path:"description",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:n.componentName.mixInput,helperText:e("Enter the event start date. You can enter date and time together, e.g., 2025-12-20 07:30"),id:"start-time",label:e("Start Date"),onChange:"SET_START_TIME",path:"start",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:n.componentName.mixInput,helperText:e("Enter the event end date. You can enter date and time together, e.g., 2025-12-20 08:30"),id:"end-time",label:e("End Date"),onChange:"SET_END_TIME",path:"end",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:n.componentName.mixInput,helperText:e("Enter the location of the event."),id:"location",label:e("Location"),onChange:"SET_LOCATION",path:"location",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:n.componentName.mixInput,helperText:e("Enter attendee email addresses separated by commas."),id:"attendees",label:e("Attendees"),onChange:"SET_ATTENDEES",path:"attendees",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:n.componentName.select,helperText:e("Select the visibility of the event."),id:"visibility",label:e("Visibility"),onChange:"SET_VISIBILITY",options:[{label:e("Public"),value:"public"},{label:e("Private"),value:"private"}],path:"visibility",render:"IF_CONNECTION_SELECTED",value:"public"},{componentName:n.componentName.switch,helperText:e("Whether to send notifications about the creation of the event."),id:"send-notifications",label:e("Send Notifications"),onChange:"SET_SEND_NOTIFICATIONS",path:"sendNotifications",render:"IF_CONNECTION_SELECTED",size:"small",value:!1},{componentName:n.componentName.switch,helperText:e("Whether attendees other than the organizer can modify the event."),id:"guests-can-modify",label:e("Guests Can Modify"),onChange:"SET_GUESTS_CAN_MODIFY",path:"guestsCanModify",render:"IF_CONNECTION_SELECTED",size:"small",value:!1}]},actions:{CONNECTION_ADD_CHANGE:l,HANDLE_SELECT_EVENT:a("eventSelectorId"),IF_CONNECTION_SELECTED:({$:t})=>{var o;return c((o=t.getComponent("connection-id"))==null?void 0:o.value)},REFETCH_CALENDAR_LIST:({$:t})=>E(t),REFETCH_EVENTS_LIST:({$:t})=>i(t),SET_ATTENDEES:a("attendees"),SET_DESCRIPTION:a("description"),SET_END_TIME:a("endTime"),SET_GUESTS_CAN_MODIFY:a("guestsCanModify"),SET_LOCATION:a("location"),SET_SEND_NOTIFICATIONS:a("sendNotifications"),SET_START_TIME:a("startTime"),SET_SUMMARY:a("summary"),SET_VISIBILITY:a("visibility"),SET_CONNECTION:async({$:t,e:o})=>{a("connectionId")({$:t,e:o}),await E(t)},HANDLE_SELECT_CALENDAR:async({$:t,e:o})=>{a("calendarId")({$:t,e:o}),await i(t)},ON_MACHINE_LOAD:async({$:t})=>{r(t,[{db:"connectionId",id:"connection-id"},{db:"calendarId",id:"calendar-id"},{db:"summary",id:"summary"},{db:"description",id:"description"},{db:"startTime",id:"start-time"},{db:"endTime",id:"end-time"},{db:"location",id:"location"},{db:"attendees",id:"attendees"},{db:"visibility",id:"visibility"},{db:"sendNotifications",id:"send-notifications"},{db:"guestsCanModify",id:"guests-can-modify"},{db:"eventSelectorId",id:"event-select"}]),await Promise.all([E(t),i(t)])}}}));export{S as default};
