"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const XEUtils = require("xe-utils");
const dom = require("./dom.js");
const rowMoveCls = "row--drag-move";
function moveRowAnimateToTb(elemList, offsetTop) {
  XEUtils.arrayEach(elemList, (trEl) => {
    trEl.style.transform = `translateY(${offsetTop}px)`;
  });
  requestAnimationFrame(() => {
    XEUtils.arrayEach(elemList, (trEl) => {
      dom.addClass(trEl, rowMoveCls);
      trEl.style.transform = "";
    });
  });
}
function clearRowAnimate(elem, clss) {
  setTimeout(() => {
    if (elem) {
      XEUtils.arrayEach(elem.querySelectorAll(clss.map((cls) => `${cls}.${rowMoveCls}`).join(",")), (elem2) => dom.removeClass(elem2, rowMoveCls));
    }
  }, 500);
}
exports.clearRowAnimate = clearRowAnimate;
exports.moveRowAnimateToTb = moveRowAnimateToTb;
