import { B as BackendApiClient } from './api-client-a68152b8.js';

class BenefitsApi {
  async getBenefitsAsync() {
    return BackendApiClient.instance.url(`benefits`).get().json();
  }
  async postDocumentAsync(req) {
    return BackendApiClient.instance
      .url(`document`)
      .formData(req)
      .post()
      .badRequest(() => {
      throw new Error('Failed to upload document');
    })
      .json();
  }
  async postIconAsync(req) {
    return BackendApiClient.instance
      .url(`icon`)
      .formData(req)
      .post()
      .badRequest(() => {
      throw new Error('Failed to upload icon');
    })
      .json();
  }
  async getShopifyUrl() {
    return BackendApiClient.instance.url(`shopify-url`).get().json();
  }
}
const benefitsApi = new BenefitsApi();

export { benefitsApi as b };
