import{aa as p}from"./_applist-tangy-colts-beg-36.js";import{_ as o}from"./main-tangy-colts-beg.js";import{s}from"./machine.-tangy-colts-beg-869.js";import{h as a}from"./commonut-tangy-colts-beg-953.js";import{a as n}from"./machineh-tangy-colts-beg-110.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const l=p(({helpers:e})=>({states:{components:[{componentName:e.componentName.mixInput,id:"post-id",label:o("Post Id"),onChange:"HANDLE_ID",path:"postId",render:!0,required:!0,value:void 0},{componentName:e.componentName.select,fieldType:"config",id:"post-category",label:o("Post Category"),mode:"multiple",onChange:"SELECT_CATEGORY",onRefetch:"REFETCH_CATEGORY",options:[],path:"postCategory",placeholder:o("any post category"),render:!0,value:void 0},{componentName:e.componentName.switch,fieldType:"config",helperText:o("If true, don't delete existing categories, just add on. If false, replace the categories with the new categories."),id:"append",label:o("Append"),onChange:"HANDLE_APPEND",path:"append",render:!0,value:!1,wrapperClassName:"my-1"}]},actions:{ON_MACHINE_LOAD:async({$:t})=>{s(t,[{db:"postId",id:"post-id"},{db:"postCategory",id:"post-category"},{db:"append",id:"append"}]),await n(t)},REFETCH_CATEGORY:async({$:t})=>{await n(t)},HANDLE_APPEND:a("append"),HANDLE_ID:a("postId"),SELECT_CATEGORY:a("postCategory")}}));export{l as default};
