'use strict';

var base = module.superModule;
//Load our stock information decorator
var stockInformation = require('*/cartridge/models/product/decorators/stockInformation');

/**
 * Decorate product with product line item information
 * @param {Object} product - Product Model to be decorated
 * @param {dw.catalog.Product} apiProduct - Product information returned by the script API
 * @param {Object} options - Options passed in from the factory
 * @returns {Object} - Decorated product model
 */
function fullProduct(product, apiProduct, options) {
    
    //Call base, pass all the same paramters
    base.call(this, product, apiProduct, options);
    //use decorator to lead invintory from product api
    stockInformation(product,apiProduct);
    return product;
}

module.exports = fullProduct;
