import{b as p}from"./useflows-BpG3C9m1.js";import{e}from"./main-few-lands-burn.js";import{s as r}from"./machine.-BRuqPpdF.js";import{h as a}from"./commonut-D3rqJBtm.js";import{a as n}from"./machineh-D8WlVdMZ.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const E=p(({helpers:t})=>({states:{components:[{componentName:t.componentName.mixInput,id:"post-id",label:e("Post Id"),onChange:"HANDLE_ID",path:"postId",render:!0,required:!0,value:void 0},{componentName:t.componentName.select,fieldType:"config",id:"post-category",label:e("Post Category"),mode:"multiple",onChange:"SELECT_CATEGORY",onRefetch:"REFETCH_CATEGORY",options:[],path:"postCategory",placeholder:e("any post category"),render:!0,value:void 0},{componentName:t.componentName.switch,fieldType:"config",helperText:e("If true, don't delete existing categories, just add on. If false, replace the categories with the new categories."),id:"append",label:e("Append"),onChange:"HANDLE_APPEND",path:"append",render:!0,value:!1,wrapperClassName:"my-1"}]},actions:{ON_MACHINE_LOAD:async({$:o})=>{r(o,[{db:"postId",id:"post-id"},{db:"postCategory",id:"post-category"},{db:"append",id:"append"}]),await n(o)},REFETCH_CATEGORY:async({$:o})=>{await n(o)},HANDLE_APPEND:a("append"),HANDLE_ID:a("postId"),SELECT_CATEGORY:a("postCategory")}}));export{E as default};
