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: 'For You' },
  limit: 10,
};

export const type = 'deal-row:for-you' as const;
export const category = 'deal-row' as const;
export const labelKey = 'module_labels.deal-row:for-you' as const;
