import{aa as i,ab as s}from"./_applist-tangy-colts-beg-36.js";import{_ as a}from"./main-tangy-colts-beg.js";import{s as l}from"./machine.-tangy-colts-beg-869.js";import{h as c,c as d}from"./commonut-tangy-colts-beg-392.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(n,e){return this.cache.has(n)?this.cache.get(n):(this.cache.set(n,e),e)}};const E=i(({helpers:n})=>({states:{components:[d(n),{componentName:n.componentName.input,fieldType:"config",id:"offset-id",label:a("Offset"),onChange:"HANDLE_OFFSET_INFO",placeholder:a("Add offset"),render:"IF_CONNECTION_SELECTED",type:"text",value:void 0},{componentName:n.componentName.input,fieldType:"config",id:"limit-info",label:a("Limit"),onChange:"HANDLE_LIMIT_INFO",placeholder:a("Enter limit"),render:"IF_CONNECTION_SELECTED",type:"text",value:void 0},{componentName:n.componentName.select,fieldType:"config",id:"sort-status",label:a("Sort By"),onChange:"SELECT_SORT_STATUS",optionFilterProp:"label",options:[{label:a("Date"),value:"date"},{label:a("Updated At"),value:"updatedAt"},{label:a("Created At"),value:"createdAt"}],placeholder:a("Select sort status"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0}]},actions:{IF_CONNECTION_SELECTED:({$:e})=>{var o;return s((o=e.getComponent("connection-id"))==null?void 0:o.value)},CONNECTION_ADD_CHANGE:c,HANDLE_LIMIT_INFO:async({$:e,e:o})=>{e.setThisComponent(t=>{t.value=o.target.value}),e.setDb(t=>{t.limitInfo=o.target.value})},HANDLE_OFFSET_INFO:async({$:e,e:o})=>{e.setThisComponent(t=>{t.value=o.target.value}),e.setDb(t=>{t.offsetId=o.target.value})},ON_MACHINE_LOAD:async({$:e})=>{l(e,[{db:"connectionId",id:"connection-id"},{db:"offsetId",id:"offset-id"},{db:"sortStatus",id:"sort-status"},{db:"limitInfo",id:"limit-info"}])},SELECT_SORT_STATUS:async({$:e,e:o})=>{e.setThisComponent(t=>{t.value=o}),e.setDb(t=>{t.sortStatus=o})},SET_CONNECTION:async({$:e,e:o})=>{e.setThisComponent(t=>{t.value=o}),e.setDb(t=>{t.connectionId=o})}}}));export{E as default};
