import { z } from 'zod';

export const banUserSchema = z.object({
  reason: z.string().min(1, 'Ban reason is required').max(500),
});

export const changeRoleSchema = z.object({
  role: z.enum(['USER', 'MODERATOR', 'ADMIN', 'SUPER_ADMIN']),
});

export const rejectListingSchema = z.object({
  reason: z.string().min(1, 'Rejection reason is required').max(500),
});

export const resolveReportSchema = z.object({
  status: z.enum(['RESOLVED', 'DISMISSED']),
  resolution: z.string().max(500).optional(),
});

export const updateSettingsSchema = z.object({
  listingFee: z.number().min(0).optional(),
  commissionPercent: z.number().min(0).max(100).optional(),
  autoApprove: z.boolean().optional(),
  maxImagesPerListing: z.number().int().min(1).max(20).optional(),
  maxListingsFreeTier: z.number().int().min(1).optional(),
  proPrice: z.number().min(0).optional(),
  businessPrice: z.number().min(0).optional(),
  promotionDayPrice: z.number().min(0).optional(),
  blockedKeywords: z.array(z.string()).optional(),
  rentalCommissionPercent: z.number().min(0).max(100).optional(),
  rentalAutoApprove: z.boolean().optional(),
  maxRentalImagesPerListing: z.number().int().min(1).max(30).optional(),
  bookingExpiryHours: z.number().int().min(1).max(720).optional(),
  rentalPromotionDayPrice: z.number().min(0).optional(),
});
