import{b as r,i}from"./useflows-BpG3C9m1.js";import{e as t}from"./main-few-lands-burn.js";import{s as l,h as a}from"./machine.-BRuqPpdF.js";import{h as c,c as h}from"./commons.-bP-saOXM.js";import{f as E}from"./machineh-5vGV0ecU.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const _=r(({helpers:o})=>({states:{components:[h(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 sheet to search for."),id:"title",label:t("Title"),onChange:"HANDLE_TITLE",path:"title",render:"IF_SPREADSHEET_SELECTED",required:!0,value:[]},{componentName:o.componentName.switch,helperText:t("If enabled, only an exact title match will be returned. Otherwise, it will return sheets that contain the title."),id:"exact-match",label:t("Exact Match?"),onChange:"HANDLE_EXACT_MATCH",path:"exactMatch",render:"IF_SPREADSHEET_SELECTED",value:!1}]},actions:{CONNECTION_ADD_CHANGE:c,HANDLE_EXACT_MATCH:a("exactMatch"),HANDLE_TITLE:a("title"),IF_CONNECTION_SELECTED:({$:e})=>i(e.getComponent("connection-id")?.value),IF_SPREADSHEET_SELECTED:({$:e})=>i(e.getComponent("spreadsheet-id")?.value),REFETCH_SPREADSHEETS:({$:e})=>E(e),SET_CONNECTION:({$:e,e:n})=>{a("connectionId")({$:e,e:n}),E(e)},HANDLE_SPREADSHEET:({$:e,e:n})=>{a("spreadsheetId")({$:e,e:n})},ON_MACHINE_LOAD:({$:e})=>{l(e,[{db:"connectionId",id:"connection-id"},{db:"spreadsheetId",id:"spreadsheet-id"},{db:"title",id:"title"},{db:"exactMatch",id:"exact-match"}]),E(e)}}}));export{_ as default};
