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

export const revalidate = 0;

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

  return (
    <div className="space-y-6">
      <PageHeader
        title="Catalogo Servizi"
        subtitle="Configura e gestisci le singole voci di servizio offerte"
      />
      <CatalogSearch services={services} options={options} />
    </div>
  );
}
