import{aa as i,ab as r}from"./_applist-tangy-colts-beg-36.js";import{_ as n}from"./main-tangy-colts-beg.js";import{h as a,s as E}from"./machine.-tangy-colts-beg-869.js";import{h as c,c as l}from"./googleca-tangy-colts-beg-652.js";import{a as d}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=i(({helpers:t})=>({states:{components:[l(t),{componentName:t.componentName.select,fieldType:"config",helperText:n("Select the calendar containing the event to duplicate."),id:"calendar-id",label:n("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:n("Enter the event ID to duplicate."),id:"event-id",label:n("Event ID"),onChange:"SET_EVENT_ID",path:"eventMixInputId",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:t.componentName.mixInput,helperText:n("Enter the new title for the duplicated event."),id:"new-title",label:n("New Title"),onChange:"SET_NEW_TITLE",path:"newTitle",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:t.componentName.mixInput,helperText:n("Enter the start date for the duplicated event. You can enter date and time together, e.g., 2025-12-20 07:30"),id:"start-date",label:n("Start Date"),onChange:"SET_START_DATE",path:"start",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:t.componentName.mixInput,helperText:n("Enter the end date for the duplicated event. You can enter date and time together, e.g., 2025-12-20 08:30"),id:"end-date",label:n("End Date"),onChange:"SET_END_DATE",path:"end",render:"IF_CONNECTION_SELECTED",required:!0,value:[]}]},actions:{CONNECTION_ADD_CHANGE:c,HANDLE_SELECT_CALENDAR:a("calendarId"),IF_CONNECTION_SELECTED:({$:e})=>{var o;return r((o=e.getComponent("connection-id"))==null?void 0:o.value)},REFETCH_CALENDAR_LIST:({$:e})=>d(e),SET_END_DATE:a("end"),SET_EVENT_ID:a("eventMixInputId"),SET_NEW_TITLE:a("newTitle"),SET_START_DATE:a("start"),SET_CONNECTION:async({$:e,e:o})=>{a("connectionId")({$:e,e:o}),await d(e)},ON_MACHINE_LOAD:async({$:e})=>{E(e,[{db:"connectionId",id:"connection-id"},{db:"calendarId",id:"calendar-id"},{db:"eventMixInputId",id:"event-id"},{db:"newTitle",id:"new-title"},{db:"start",id:"start-date"},{db:"end",id:"end-date"}]),await d(e)}}}));export{p as default};
