var __awaiter=this&&this.__awaiter||function(t,n,e,r){function i(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r["throw"](t))}catch(t){o(t)}}function c(t){t.done?e(t.value):i(t.value).then(a,u)}c((r=r.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(t){return function(n){return c([t,n])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;i=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){e.label=a[1];break}if(a[0]===6&&e.label<o[1]){e.label=o[1];o=a;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(a);break}if(o[2])e.ops.pop();e.trys.pop();continue}a=n.call(t,e)}catch(t){a=[6,t];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{B as BackendApiClient}from"./api-client-a68152b8.js";var BenefitsApi=function(){function t(){}t.prototype.getBenefitsAsync=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,BackendApiClient.instance.url("benefits").get().json()]}))}))};t.prototype.postDocumentAsync=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,BackendApiClient.instance.url("document").formData(t).post().badRequest((function(){throw new Error("Failed to upload document")})).json()]}))}))};t.prototype.postIconAsync=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,BackendApiClient.instance.url("icon").formData(t).post().badRequest((function(){throw new Error("Failed to upload icon")})).json()]}))}))};t.prototype.getShopifyUrl=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,BackendApiClient.instance.url("shopify-url").get().json()]}))}))};return t}();var benefitsApi=new BenefitsApi;export{benefitsApi as b};