import { z } from 'zod';

/**
 * Schema for filter groups that organize filter inputs into logical sections.
 * Groups provide a way to categorize related filters together for better organization.
 *
 * @property group - Unique identifier for the filter group
 * @property label - Optional display name for the filter group in the UI
 * @property description - Optional detailed explanation of what this filter group represents
 */
export const FilterGroupSchema = z
  .object({
    group: z
      .string()
      .describe(
        'Unique identifier for the filter group, used for referencing in code.',
      ),
    label: z
      .string()
      .optional()
      .describe(
        'Human-readable name for the filter group displayed in the UI.',
      ),
    description: z
      .string()
      .optional()
      .describe(
        "Detailed explanation of the filter group's purpose or contents, may be shown as helper text.",
      ),
  })
  .describe('FilterGroup');

export type FilterGroup = z.infer<typeof FilterGroupSchema>;
