Liferay.Loader.define("@liferay/commerce-pricing-web@4.0.81/commerce_price_lists/commerce_price_entry/js/PriceEntry",["module","exports","require"],(function(e,t,c){window;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function _default(e){(function handleOverrideDiscount({namespace:e}){const t=document.getElementById("".concat(e,"discountLevels")),c=document.getElementById("".concat(e,"overrideDiscount"));if(t&&c){const n=[document.getElementById("".concat(e,"discountLevel1")),document.getElementById("".concat(e,"discountLevel2")),document.getElementById("".concat(e,"discountLevel3")),document.getElementById("".concat(e,"discountLevel4"))];c.addEventListener("change",(e=>{e.target.checked?t.classList.remove("hide"):t.classList.add("hide"),n.forEach((t=>{t&&(e.target.checked?(t.disabled=!1,t.classList.remove("disabled")):(t.disabled=!0,t.classList.add("disabled")))}))}))}})(e),function handlePriceOnApplication({namespace:e}){const t=document.getElementById("".concat(e,"priceOnApplication")),c=document.getElementById("".concat(e,"price-entry-price-settings"));t&&c&&t.addEventListener("change",(e=>{let t=[c];t=t.concat(Array.from(c.getElementsByTagName("button"))),t=t.concat(Array.from(c.getElementsByTagName("input"))),t=t.concat(Array.from(c.getElementsByTagName("label"))),t.forEach((t=>{t&&!t.classList.contains("base-price")&&(e.target.checked?(t.disabled=!0,t.classList.add("disabled")):(t.disabled=!1,t.classList.remove("disabled")))}))}))}(e)}}));
//# sourceMappingURL=PriceEntry.js.map