"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CatalogSummary = exports.ProductCatalog = exports.ProductMetricDimensions = exports.Dimensions = void 0;
const jackson_js_1 = require("jackson-js");
class Dimensions {
    volumetricWeight(carrier_divisor = 5000) {
        return ((this.length * this.height * this.width) * 100) / carrier_divisor;
    }
    transportParcelWeight(carrier_divisor = 5000) {
        const vol_weight = this.volumetricWeight(carrier_divisor);
        return vol_weight > this.weight ? vol_weight : this.weight;
    }
}
__decorate([
    (0, jackson_js_1.JsonProperty)()
], Dimensions.prototype, "height", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], Dimensions.prototype, "length", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], Dimensions.prototype, "width", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], Dimensions.prototype, "weight", void 0);
exports.Dimensions = Dimensions;
class ProductMetricDimensions {
}
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Dimensions] })
], ProductMetricDimensions.prototype, "item", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Dimensions] })
], ProductMetricDimensions.prototype, "package", void 0);
exports.ProductMetricDimensions = ProductMetricDimensions;
class ProductCatalog {
}
__decorate([
    (0, jackson_js_1.JsonProperty)()
], ProductCatalog.prototype, "productId", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], ProductCatalog.prototype, "brand", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [ProductMetricDimensions] })
], ProductCatalog.prototype, "dimensions", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], ProductCatalog.prototype, "parentId", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], ProductCatalog.prototype, "provider", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], ProductCatalog.prototype, "isParent", void 0);
exports.ProductCatalog = ProductCatalog;
class CatalogSummary {
}
__decorate([
    (0, jackson_js_1.JsonProperty)()
], CatalogSummary.prototype, "productId", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], CatalogSummary.prototype, "title", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], CatalogSummary.prototype, "image", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], CatalogSummary.prototype, "locale", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)()
], CatalogSummary.prototype, "description", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Object] })
], CatalogSummary.prototype, "attributes", void 0);
__decorate([
    (0, jackson_js_1.JsonProperty)(),
    (0, jackson_js_1.JsonClassType)({ type: () => [Object] })
], CatalogSummary.prototype, "categories", void 0);
exports.CatalogSummary = CatalogSummary;
//# sourceMappingURL=catalog.js.map