import { z } from 'zod';
import type { LocalizedText } from '@/server/page-layout/types';

export interface Config {
  title: LocalizedText;
  limit: number;
}

export const configSchema: z.ZodType<Config> = z.object({
  title: z.object({ he: z.string().min(1), en: z.string().min(1) }),
  limit: z.number().int().min(1).max(30),
});

export const defaultConfig: Config = {
  title: { he: 'עסקאות קבוצתיות', en: 'Group Deals' },
  limit: 10,
};

export const type = 'deal-row:group-deals' as const;
export const category = 'deal-row' as const;
export const labelKey = 'module_labels.deal-row:group-deals' as const;
