
import { hotelRoom, hotelRoomAdd, hotelRoomEdit, getRoomId, hotelRoomRoomStatus, getHotelData, updateHotel } from '@/api/grogshop'

const grogshop = {
  actions: {
    HotelRoom({ commit }, data) {
      return new Promise((resolve, reject) => {
        hotelRoom(data).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    },
    HotelRoomAdd({ commit }, data) {
      return new Promise((resolve, reject) => {
        hotelRoomAdd(data).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    },

    HotelRoomEdit({ commit }, data) {
      return new Promise((resolve, reject) => {
        hotelRoomEdit(data).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    },
    GetHotelData({ commit }, data) {
      return new Promise((resolve, reject) => {
        getHotelData(data).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    },
    GetRoomId({ commit }, data) {
      return new Promise((resolve, reject) => {
        getRoomId(data).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    },
    HotelRoomRoomStatus({ commit }, data) {
      return new Promise((resolve, reject) => {
        hotelRoomRoomStatus(data).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    },
    UpdateHotel({ commit }, data) {
      return new Promise((resolve, reject) => {
        updateHotel(data).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    }
  }
}
export default grogshop
