export enum OfferType {
  NTH_VISIT = "nth_visit",
  FESTIVE = "festive",
  SPEND_THRESHOLD = "spend_threshold"
}

export enum DiscountType {
  PERCENTAGE = "percentage",
  FIXED = "fixed"
}

export interface CreateOfferPayload {
  title: string
  description: string
  type: OfferType
  discountType: DiscountType
  discountValue: number
  startDate?: string
  endDate?: string
  visitCount?: number
  spendThreshold?: number
  isActive: boolean
  message?: string
}

export interface Offer {
  _id: string
  salonId: string
  title: string
  description: string
  type: OfferType
  discountType: DiscountType
  discountValue: number
  startDate?: string
  endDate?: string
  visitCount?: number
  spendThreshold?: number
  isActive: boolean
  message?: string
  createdAt: string
  updatedAt: string
  __v?: number
}

// Convenience alias for arrays returned by list endpoints
export type OffersResponse = Offer[]

export interface ClientOffersResponse {
  stats: {
    totalSpend: number
    appointmentCount: number
  }
  offers: Offer[]
}
