import{a as c,b as a}from"./chunk-3D3ZZLNX.js";import{la as n,pa as l}from"./chunk-ISMRT7VU.js";var u=(()=>{class s{constructor(t){this._themeMode=t}highlightAndScrollToItem(t){setTimeout(()=>{let e=document.querySelector("tis-products-table:not(.is-hidden), tis-bonus-products-table:not(.is-hidden)")?.getElementsByTagName("tbody")[1].children[t];e||(e=document.getElementsByTagName("tbody")[1].children[t]),e&&(e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),e.childNodes.forEach(r=>{let i=r;i.style.transition="all 1s",this._themeMode.currentTheme==c.Light?i.style.boxShadow="inset 0 0 15px 10px #fdf4dc, inset 0 0 30px 15px rgba(253, 244, 220, 0.7), inset 0 0 50px 25px rgba(253, 244, 220, 0.5)":i.style.boxShadow="inset 0 0 15px 10px #2b3e42, inset 0 0 30px 15px rgba(21, 101, 107, 0.7), inset 0 0 50px 25px rgba(21, 101, 107, 0.5)",setTimeout(()=>{i.style.boxShadow="none"},1e3)}))},200)}scrollToFirstError(){setTimeout(()=>{let t=[".dx-custom-number-input-error-message","tis-error-message",".wk-autocomplete__error-message"],o=Array.from(document.querySelectorAll(t.map(e=>`${e}`).join(","))).filter(e=>e.textContent&&e.textContent.trim().length>0);o.length>0&&o[0].scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},300)}scrollToFirstErrorFromTable(){setTimeout(()=>{let t=document.querySelector("tis-products-table:not(.is-hidden), tis-bonus-products-table:not(.is-hidden)"),o=[".dx-custom-number-input-error-message","tis-error-message",".wk-autocomplete__error-message"];if(t){let e=Array.from(t.querySelectorAll(o.map(r=>`${r}`).join(","))).filter(r=>r.textContent&&r.textContent.trim().length>0);e.length>0&&e[0].scrollIntoView({behavior:"smooth",block:"center",inline:"center"})}},300)}static{this.\u0275fac=function(o){return new(o||s)(l(a))}}static{this.\u0275prov=n({token:s,factory:s.\u0275fac})}}return s})();export{u as a};
//# sourceMappingURL=chunk-K3KNZMMY.js.map
