export interface AppointmentSlot {
  start: string
  end: string
}

export interface ServiceAvailability {
  day: string
  enabled: boolean
  slots: AppointmentSlot[]
}

export interface Service {
  _id: string
  name: string
  salonId: string
  description: string
  basePrice: number
  surchargePricePercentage: number
  duration: number
  availability: ServiceAvailability[]
  surchargeHours: ServiceAvailability[]
  createdAt: string
  updatedAt: string
  __v: number
}

export interface Client {
  _id: string
  name: string
  email: string
  phone: string
  salonId: string
  status: string
  totalVisits: number
  totalSpent: number
  favoriteServices: string[]
  loyaltyPoints: number
  appliedOffers: any[]
  couponHistory: any[]
  newsletterSubscribed: boolean
  smsSubscribed: boolean
  createdAt: string
  updatedAt: string
}

export interface Stylist {
  _id: string
  name: string
  salonId: string
  email: string
  phone: string
  services: string[]
  workingHours: ServiceAvailability[]
  active: boolean
  createdAt: string
  updatedAt: string
  __v: number
}

import { Offer } from "./offers"

export interface Appointment {
  _id: string
  start: string
  end: string
  status: string
  service: Service
  client: Client
  stylist: Stylist
  offer?: Offer
  salonId?: string
  generatedBy?: string
}

export interface AppointmentsResponse {
  appointments: Appointment[]
  total: number
  page: number
  limit: number
}

export interface AppointmentsArrayResponse extends Array<Appointment> { }

export interface GetAppointmentsParams {
  range?: "daily" | "weekly" | "monthly"
  date?: string
  stylistId?: string
}

export interface StylistAppointment {
  _id: string
  start: string
  end: string
  status: string
  client: string
}

export interface StylistAppointmentsResponse {
  page: number
  limit: number
  total: number
  data: StylistAppointment[]
}

export interface GetStylistAppointmentsParams {
  stylistId: string
  page?: number
  limit?: number
}

export interface CancelledAppointment {
  _id: string
  appointmentId: string
  salonId: string
  stylistId: string
  clientId: string
  cancelledAt: string
  cancelledBy: string
  client_name: string
  client_phone: string
  client_email: string
  reason: string
  createdAt: string
  updatedAt: string
  __v: number
}
