import { post } from '#/api/http'

import { BasicService } from '../basic'

class SpCoinTradeService extends BasicService {
  async cancelOrder(data: any) {
    return await post('/org/currencyOrder/cancelOrder', data)
  }

  async createOrder(data: any) {
    return await post<any>('/org/currencyOrder/createOrder', data)
  }

  async offline(data: any) {
    return await post('/org/currencyProduct/offSell', data)
  }

  async publish(data: any) {
    return await post('/org/currencyProduct/publish', data)
  }

  protected findPageUrl(): string {
    return '/org/currencyProduct/list'
  }

  protected removeUrl(): string {
    throw new Error('Method not implemented.')
  }

  protected saveOrUpdateUrl(): string {
    throw new Error('Method not implemented.')
  }
}

export const spCoinTradeService = new SpCoinTradeService()
