import{a,b as m}from"./chunk-72VW6HLU.js";import{ga as l,la as c}from"./chunk-I3FGJX2C.js";var b=(()=>{let o=class o{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(s=>{let i=s;i.style.transition="all 1s",this._themeMode.currentTheme==a.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"],r=Array.from(document.querySelectorAll(t.map(e=>`${e}`).join(","))).filter(e=>e.textContent&&e.textContent.trim().length>0);r.length>0&&r[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)"),r=[".dx-custom-number-input-error-message","tis-error-message",".wk-autocomplete__error-message"];if(t){let e=Array.from(t.querySelectorAll(r.map(s=>`${s}`).join(","))).filter(s=>s.textContent&&s.textContent.trim().length>0);e.length>0&&e[0].scrollIntoView({behavior:"smooth",block:"center",inline:"center"})}},300)}};o.\u0275fac=function(r){return new(r||o)(c(m))},o.\u0275prov=l({token:o,factory:o.\u0275fac});let n=o;return n})();export{b as a};
//# sourceMappingURL=chunk-XMVX6Z6E.js.map
