Liferay.Loader.define("commerce-product-content-web@4.0.77/product_detail/render/js/util/index",["module","exports","require"],(function(e,t,n){window;{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"))}}Object.defineProperty(t,"__esModule",{value:!0}),t.updateProductFields=function updateProductFields(e){const t=e.cpInstance,n=document.querySelector("[data-text-cp-instance-availability-estimate]")||{},a=document.querySelector("[data-text-cp-instance-gtin]")||{},i=document.querySelector("[data-text-cp-instance-manufacturer-part-number]")||{},c=document.querySelector("[data-text-cp-instance-sku]")||{},o=document.querySelector("[data-text-cp-instance-stock-quantity]")||{};n.jsonData=t.availabilityEstimate,a.jsonData=t.gtin,i.jsonData=t.manufacturerPartNumber,c.jsonData=t.sku,[n,a,i,c].forEach(fillField),o.innerHTML=t.stockQuantity?t.stockQuantity+Liferay.Language.get("in-stock"):"",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||""}}}));
//# sourceMappingURL=index.js.map