import { apiClient } from './apiClient'

export const productService = {
  /**
   * Tag Search / Product Search logic
   */
  async searchProducts(query, options = {}) {
    return apiClient('/api/v1/products/search', {
      method: 'POST',
      data: { query, ...options }
    })
  },

  /**
   * Get specific SKU details
   */
  async getSku(sku) {
    return apiClient(\`/api/v1/products/\${sku}\`)
  },

  /**
   * Ultra Description Generator / Manager
   */
  async generateProductDescription(sku, context) {
    return apiClient('/api/v1/products/generate-desc', {
      method: 'POST',
      data: { sku, context }
    })
  },

  /**
   * Store Search / Availability
   */
  async getStoreAvailability(sku) {
    return apiClient(\`/api/v1/store/availability/\${sku}\`)
  }
}
