import request from '@/utils/request';

export function getRoomCalendar(roomId: number, startDate: string, endDate: string) {
  return request.get(`/api/merchant/room-calendar/${roomId}`, {
    params: { startDate, endDate },
  });
}

export function batchUpdateCalendar(data: {
  roomId: number;
  startDate: string;
  endDate: string;
  price?: number;
  stock?: number;
  status?: string;
}) {
  return request.put('/api/merchant/room-calendar/batch', data);
}

export function singleDayUpdate(data: {
  roomId: number;
  date: string;
  price?: number;
  stock?: number;
  status?: string;
}) {
  return request.put('/api/merchant/room-calendar/single', data);
}
