"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "OctoprintHttpClientBuilder", {
    enumerable: true,
    get: function() {
        return OctoprintHttpClientBuilder;
    }
});
const _defaulthttpclientbuilder = require("../../../shared/default-http-client.builder");
const _octoprintserviceconstants = require("../constants/octoprint-service.constants");
class OctoprintHttpClientBuilder extends _defaulthttpclientbuilder.DefaultHttpClientBuilder {
    build() {
        if (!this.axiosOptions.baseURL) {
            throw new Error("Base URL is required");
        }
        return super.build();
    }
    withXApiKeyHeader(apiKey) {
        if (!apiKey?.length) {
            throw new Error("XApiKey header may not be an empty string");
        }
        this.withHeaders({
            [_octoprintserviceconstants.apiKeyHeaderKey]: apiKey
        });
        return this;
    }
}

//# sourceMappingURL=octoprint-http-client.builder.js.map