import{aa as c,ab as i}from"./_applist-tangy-colts-beg-36.js";import{_ as a}from"./main-tangy-colts-beg.js";import{h as n,s as d}from"./machine.-tangy-colts-beg-869.js";import{f as r,b as l,h as E,c as s,d as C}from"./machineh-tangy-colts-beg-230.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(o,e){return this.cache.has(o)?this.cache.get(o):(this.cache.set(o,e),e)}};const S=c(({helpers:o})=>({states:{components:[s(o),{allowClear:!0,componentName:o.componentName.select,fieldType:"config",helperText:a("Select your Airtable Base from the list."),id:"base-id",label:a("Select Base"),onChange:"SELECT_BASE",onRefetch:"REFETCH_BASES",optionFilterProp:"label",options:[],placeholder:a("Select Base"),render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{allowClear:!0,componentName:o.componentName.select,fieldType:"config",helperText:a("Select the table where you want to delete a record."),id:"table-id",label:a("Select Table"),onChange:"SELECT_TABLE",onRefetch:"REFETCH_TABLES",optionFilterProp:"label",options:[],path:"table-id",render:"IF_BASE_ID_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:o.componentName.mixInput,fieldType:"config",helperText:a("Enter the Record ID that you want to delete."),id:"record-id",label:a("Record ID"),onChange:"SET_RECORD_ID",path:"record-id",render:"IF_TABLE_SELECTED",required:!0,value:[]}]},actions:{CONNECTION_ADD_CHANGE:E,SELECT_BASE:({$:e,e:t})=>{n("baseId")({$:e,e:t}),r(e)},SELECT_TABLE:({$:e,e:t})=>n("tableId")({$:e,e:t}),IF_BASE_ID_SELECTED:({$:e})=>{var t;return i((t=e.getComponent("base-id"))==null?void 0:t.value)},IF_CONNECTION_SELECTED:({$:e})=>{var t;return i((t=e.getComponent("connection-id"))==null?void 0:t.value)},IF_TABLE_SELECTED:({$:e})=>{var t;return i((t=e.getComponent("table-id"))==null?void 0:t.value)},ON_MACHINE_LOAD:async({$:e})=>{d(e,[{db:"connectionId",id:"connection-id"},{db:"baseId",id:"base-id"},{db:"tableId",id:"table-id"},{db:"recordId",id:"record-id"}]),await Promise.all([l(e),r(e)])},REFETCH_BASES:({$:e})=>l(e),REFETCH_TABLES:({$:e})=>r(e),SET_CONNECTION:({$:e,e:t})=>{n("connectionId")({$:e,e:t}),l(e),C(e,o)},SET_RECORD_ID:n("recordId")}}));export{S as default};
