import { SearchQuery } from '../models/search.model';

export function createSearchQueryKey(query: SearchQuery): string {
  return JSON.stringify({
    text: query.text.trim().toLowerCase(),
    categoryIds: query.categoryIds,
    subcategoryIds: query.subcategoryIds,
    filters: query.filters,
    sort: query.sort,
    page: query.page,
    pageSize: query.pageSize,
  });
}
