import { getAllServices, getCatalogFieldOptions } from "@/lib/admin-queries";
import { CatalogSearch } from "./CatalogSearch";

export const revalidate = 0;

export default async function CatalogPage() {
  const [services, options] = await Promise.all([
    getAllServices(),
    getCatalogFieldOptions(),
  ]);

  return (
    <div>
      <div className="flex items-center justify-between mb-6">
        <h1 className="text-2xl font-bold text-[#1a1a1a]">Catalogo Servizi</h1>
      </div>

      <CatalogSearch services={services} options={options} />
    </div>
  );
}
