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