import { z } from "zod/v4";
import type { JSX } from "solid-js";
import type { ComponentMeta } from "../../meta";
import type { VirtualItem } from "../../primitives/create-virtualizer";
export const VirtualListRootPropsSchema = z.object({ count: z.number(), estimateSize: z.number().optional(), overscan: z.number().optional(), horizontal: z.boolean().optional() });
export interface VirtualListRootProps extends Omit<z.infer<typeof VirtualListRootPropsSchema>, "count" | "estimateSize">, Omit<JSX.HTMLAttributes<HTMLDivElement>, "children"> {
  count: number;
  estimateSize?: number | ((index: number) => number);
  children: (item: VirtualItem) => JSX.Element;
}
export const VirtualListMeta: ComponentMeta = {
  name: "VirtualList",
  description: "Virtualized scrollable list that only renders visible items, for large datasets",
  parts: ["Root"] as const,
  requiredParts: ["Root"] as const,
} as const;
