import { IsOptional, IsString, MaxLength, MinLength } from 'class-validator';

/**
 * Query for `GET /payment-settlements/customer-search` — typed-as-you-go
 * autocomplete on the Payment Collection screen's Customer field.
 *
 * Returns distinct (guest_name + guest_mobile) pairs from active queries
 * so the FE can populate the name field while keeping mobile + email
 * hidden but pre-filled on select. Mobile is still the lookup key for
 * the existing customer-outstanding / customer-balance endpoints.
 */
export class CustomerSearchQueryDto {
  @IsString()
  @MinLength(2)
  @MaxLength(100)
  q: string;
}
