import request from '@/utils/request.js'

// ─── Nannies ─────────────────────────────────────────────────────────────────
export const nannyApi = {
  getList: (params) => request.get('/nanny/nannies', { params }),
  getDetail: (id) => request.get(`/nanny/nannies/${id}`),
  create: (data) => request.post('/nanny/nannies', data),
  update: (id, data) => request.put(`/nanny/nannies/${id}`, data),
  delete: (id) => request.delete(`/nanny/nannies/${id}`)
}

// ─── Nanny Orders ────────────────────────────────────────────────────────────
export const nannyOrderApi = {
  getList: (params) => request.get('/nanny/orders', { params }),
  getDetail: (id) => request.get(`/nanny/orders/${id}`),
  create: (data) => request.post('/nanny/orders', data),
  update: (id, data) => request.put(`/nanny/orders/${id}`, data),
  delete: (id) => request.delete(`/nanny/orders/${id}`)
}

// ─── Nanny Schedules ─────────────────────────────────────────────────────────
export const nannyScheduleApi = {
  getList: (params) => request.get('/nanny/schedules', { params }),
  create: (data) => request.post('/nanny/schedules', data)
}
