import { get } from '@/utils/request';

// 公开接口
export function getRoomList(params: {
  page?: number;
  pageSize?: number;
  keyword?: string;
  type?: string;
  minPrice?: number;
  maxPrice?: number;
  city?: string;
  merchantId?: number;
  sortBy?: string;
  checkIn?: string;
  checkOut?: string;
  roomCount?: number;
  adultCount?: number;
}) {
  return get('/api/app/rooms', params);
}

export function getRoomDetail(id: number) {
  return get(`/api/app/rooms/${id}`);
}

export function getRoomCalendar(id: number, startDate: string, endDate: string) {
  return get(`/api/app/rooms/${id}/calendar`, { startDate, endDate });
}
