import{b as E,i as l}from"./useflows-BpG3C9m1.js";import{e as t}from"./main-few-lands-burn.js";import{s as i,h as a}from"./machine.-BRuqPpdF.js";import{h as r,c as C,f as m,s as n,a as h}from"./mysqlcom-CIX_d5mm.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const N=E(({helpers:o})=>({states:{components:[h(o),{allowClear:!0,componentName:o.componentName.select,fieldType:"config",helperText:t("Select the table you want to delete rows from."),id:"table-name",label:t("Table"),onChange:"SELECT_TABLE",onRefetch:"REFETCH_TABLES",optionFilterProp:"label",options:[],placeholder:t("Select a table"),render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:o.componentName.select,fieldType:"config",helperText:t("Rows where this column equals the match value will be deleted."),id:"match-column",label:t("Match Column"),onChange:"SELECT_MATCH_COLUMN",onRefetch:"REFETCH_COLUMNS",optionFilterProp:"label",options:[],placeholder:t("Select a column"),render:"IF_TABLE_SELECTED",showSearch:!0,value:void 0},{componentName:o.componentName.mixInput,helperText:t("Enter the value to match for deletion."),id:"match-value",label:t("Match Value"),onChange:"SET_MATCH_VALUE",path:"matchValue",render:"IF_TABLE_SELECTED",required:!0,value:[]}]},actions:{...C,IF_CONNECTION_SELECTED:({$:e})=>l(e.getComponent("connection-id")?.value),IF_TABLE_SELECTED:({$:e})=>l(e.getComponent("table-name")?.value),REFETCH_COLUMNS:({$:e})=>n(e,["match-column"]),REFETCH_TABLES:({$:e})=>m(e),SELECT_MATCH_COLUMN:a("matchColumn"),SET_CONNECTION:r,SET_MATCH_VALUE:a("matchValue"),SELECT_TABLE:({$:e,e:c})=>{a("tableName")({$:e,e:c}),n(e,["match-column"])},ON_MACHINE_LOAD:({$:e})=>{i(e,[{db:"connectionId",id:"connection-id"},{db:"tableName",id:"table-name"},{db:"matchColumn",id:"match-column"},{db:"matchValue",id:"match-value"}]),Promise.all([m(e),n(e,["match-column"])])}}}));export{N as default};
