System.register([],function(_export,_context){"use strict";function e(e,t){e.preventDefault(),e.stopPropagation();var _t$minWidth=t.minWidth,n=_t$minWidth===void 0?50:_t$minWidth,i=t.startX,o=t.startWidth,l=t.element,r=e.target;r.classList.add("resizing");var a=function a(e){e.preventDefault(),e.stopPropagation();var t=e.pageX-i,r=Math.max(n,o+t);l.style.width=r+"px",function(e,t){var n=e.closest("nile-table-body");if(!n)return;var i="nile-table-header-item"===e.tagName.toLowerCase(),o="nile-table-cell-item",l=function(e,t){var n=e.closest("nile-table-row");if(n){var _i=n.querySelectorAll(t);return Array.from(_i).indexOf(e);}return 0;}(e,i?"nile-table-header-item":"nile-table-cell-item");n.querySelectorAll("nile-table-row").forEach(function(e){var n=e.querySelectorAll(o);n[l]&&(n[l].style.width=t+"px");});}(l,r);},_c=function c(){r.classList.remove("resizing"),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",_c);};return document.addEventListener("mousemove",a),document.addEventListener("mouseup",_c),function(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",_c);};}function t(e){var t=e.querySelectorAll("nile-table-header-item"),n=e.querySelectorAll("nile-table-cell-item");t.forEach(function(e){e.style.removeProperty("width");}),n.forEach(function(e){e.style.removeProperty("width");});}function n(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:50;return function(i){e(i,{minWidth:n,startX:i.pageX,startWidth:t.offsetWidth,element:t});};}function i(e){var t=Array.from(e.children),n=t.some(function(e){return"nile-table-header-item"===e.tagName.toLowerCase()&&e.hasAttribute("resizable");}),i=t.some(function(e){return"nile-table-cell-item"===e.tagName.toLowerCase()&&e.hasAttribute("resizable");});return n||i;}_export({c:n,h:i,r:t});return{setters:[],execute:function execute(){}};});
//# sourceMappingURL=resizable-table-helper.cjs.js.map
