import{b as r,i}from"./useflows-BpG3C9m1.js";import{e as t}from"./main-few-lands-burn.js";import{s as d,h as E}from"./machine.-BRuqPpdF.js";import{h as s,c as l}from"./commons.-bP-saOXM.js";import{f as a}from"./machineh-5vGV0ecU.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const N=r(({helpers:o})=>({states:{components:[l(o),{allowClear:!0,componentName:o.componentName.select,fieldType:"config",helperText:t("Select the spreadsheet."),id:"spreadsheet-id",label:t("Spreadsheet"),onChange:"HANDLE_SPREADSHEET",onRefetch:"REFETCH_SPREADSHEETS",optionFilterProp:"label",options:[],render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:o.componentName.mixInput,helperText:t("The title of the new worksheet."),id:"title",label:t("Worksheet Title"),onChange:"HANDLE_TITLE",path:"addSheet.properties.title",render:"IF_SPREADSHEET_SELECTED",required:!0,value:[]}]},actions:{CONNECTION_ADD_CHANGE:s,HANDLE_TITLE:E("title"),IF_CONNECTION_SELECTED:({$:e})=>i(e.getComponent("connection-id")?.value),IF_SPREADSHEET_SELECTED:({$:e})=>i(e.getComponent("spreadsheet-id")?.value),REFETCH_SPREADSHEETS:({$:e})=>a(e),SET_CONNECTION:({$:e,e:n})=>{E("connectionId")({$:e,e:n}),a(e)},HANDLE_SPREADSHEET:({$:e,e:n})=>{E("spreadsheetId")({$:e,e:n})},ON_MACHINE_LOAD:({$:e})=>{d(e,[{db:"connectionId",id:"connection-id"},{db:"spreadsheetId",id:"spreadsheet-id"},{db:"title",id:"title"}]),a(e)}}}));export{N as default};
