import{and as p}from"drizzle-orm";import{applyFilter as f}from"./filter.js";import{applySearch as h}from"./search.js";import{applyAfterAndBefore as c}from"./after-and-before.js";const d=(e,t)=>{const o=[],{whereCondition:r}=f(e,t.filter);r&&o.push(r);const{whereCondition:n}=h(e,t);n&&o.push(n);const{whereCondition:i}=c(e,t);return i&&o.push(i),o.length===0?e:o.length===1?e.where(o[0]):e.where(p(...o))};export{d as applyCombinedFilters};
