Liferay.Loader.define("commerce-product-content-web@4.0.80/product_detail/render/js/util/index",["module","exports","require","frontend-js-web"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.updateProductFields=function updateProductFields(e){const t=e.cpInstance,n=document.querySelector("[data-text-cp-instance-availability-estimate]")||{},i=document.querySelector("[data-text-cp-instance-gtin]")||{},c=document.querySelector("[data-text-cp-instance-manufacturer-part-number]")||{},o=document.querySelector("[data-text-cp-instance-sku]")||{},r=document.querySelector("[data-text-cp-instance-stock-quantity]")||{};n.jsonData=t.availabilityEstimate,i.jsonData=t.gtin,c.jsonData=t.manufacturerPartNumber,o.jsonData=t.sku,[n,i,c,o].forEach(fillField),r.innerHTML=t.stockQuantity?(0,a.sub)(Liferay.Language.get("x-in-stock"),t.stockQuantity):"",document.querySelector("[data-text-cp-instance-subscription-info]").innerHTML=t.subscriptionInfo||"",document.querySelector("[data-text-cp-instance-delivery-subscription-info]").innerHTML=t.deliverySubscriptionInfo||"",document.querySelector("[data-text-cp-instance-incoming-quantity-label]").innerHTML=t.incomingQuantityLabel||""};var a=n("frontend-js-web");function fillField(e){if(e.jsonData&&e instanceof HTMLElement){const t=e.querySelector("span:nth-child(2)");t&&(t.innerText=Liferay.Util.escape(e.jsonData),e.classList.remove("hide"))}}}}));
//# sourceMappingURL=index.js.map