import { item } from '@wix/benefit-programs';

export async function myQueryFunction() {
  const results = await item.queryItems().find();

  if (results.items.length > 0) {
    const items = results.items;
    const firstItem = items[0];
    const pageSize = results.pageSize;
    const hasNext = results.hasNext();
    const hasPrev = results.hasPrev();
    const length = results.length;
    const query = results.query;

    return items;
  } else {
    // Handle if no matching items found
  }
}
