import { U as e, ag as t, ah as r, av as a, dr as s, aj as o, ds as i, dt as l, a6 as n } from "./index-f50c05c4.js";
import { f as m } from "./lodash-f1e42446.js";
import { lA as p, lR as c, lS as d } from "./ant-design-icons-b1480d8d.js";
import { memo as j, useState as f, useMemo as u } from "react";
import "./loglevel-6fb66d22.js";
import { TransferTableItemListComp as g } from "./transferTableItemComp-d5a84a6a.js";
import { q as h, T as b } from "./antd-04a23d13.js";
import "./axios-84bb1c75.js";
import "./redux-devtools-d38e5b33.js";
import "./alasql-0ff6dabf.js";
import "./react-router-a1807b5b.js";
import "./fontawesome-2445f580.js";
import "react-dom";
import "./dnd-kit-56a2f36f.js";
import "./dayjs-844325ae.js";
import "./styled-components-1e696d6b.js";
import "./numbro-c1edb412.js";
import "./papaparse-1bac8e5f.js";
import "./uuid-82f303b2.js";
import "./supabase-c27c62e3.js";
import "./fetch-a3c8ad94.js";
import "./react-draggable-60f59f09.js";
import "./remark-gfm-f2973785.js";
import "./buffer-d3713d77.js";
import "./rehype-raw-41b6145f.js";
import "./parse5-6476676e.js";
import "./rehype-sanitize-deb53e9a.js";
import "./simplebar-react-e1b123a3.js";
import "./react-best-gradient-color-picker-4dd60dac.js";
import "./ua-parser-js-094f59ba.js";
import "./clsx-469c2c43.js";
import "./crypto-js-d5eac8ba.js";
import "./codemirror-73d8c217.js";
import "./really-relaxed-json-49b6a70d.js";
import "./immer-c0428a8d.js";
import "./redux-saga-5514e228.js";
import "./hotkeys-js-0dddb21a.js";
import "./cnchar-5678e6bc.js";
import "./react-documents-eb6de859.js";
import "./sql-formatter-69e8df59.js";
import "./rc-trigger-5125aafe.js";
import "./react-json-view-9403d8a1.js";
import "./qrcode-react-cb73d2b6.js";
import "./katex-a34f0265.js";
import "./ecogis-maps-bb0d63f9.js";
import "./devextreme-2fa5bb9a.js";
const y = { dataManual: i(l), dataTarget: i(l), columnsLeft: g, columnsRight: g, leftTitle: n, rightTitle: n }, T = j((e2) => {
  const [t2, r2] = f([]), s2 = e2.dataManual.map((e3, t3) => ({ ...e3, key: t3 + 1 }));
  e2.dataTarget.map((e3, t3) => ({ ...e3, key: t3 + 1 }));
  const o2 = u(() => e2.columnsLeft.map((e3) => ({ title: e3.children.label.getView(), dataIndex: e3.children.dataField.getView(), onEvent: e3.children.onEvent.getView() })), [e2.columnsLeft]), i2 = u(() => e2.columnsRight.map((e3) => ({ title: e3.children.label.getView(), dataIndex: e3.children.dataField.getView(), onEvent: e3.children.onEvent.getView() })), [e2.columnsRight]);
  return p("div", { style: { padding: "24px" }, children: p(({ title: e3, leftColumns: t3, rightColumns: r3, ...s3 }) => p(h, { ...s3, titles: e3, showSelectAll: false, children: ({ direction: e4, filteredItems: s4, onItemSelectAll: o3, onItemSelect: i3, selectedKeys: l2 }) => {
    const n2 = "left" === e4 ? t3 : r3;
    return p(b, { rowSelection: { onSelectAll(e5, t4) {
      const r4 = t4.map(({ key: e6 }) => e6), a2 = e5 ? m.difference(r4, l2) : m.difference(l2, r4);
      o3(a2, e5);
    }, onSelect({ key: e5 }, t4) {
      i3(e5, t4);
    }, selectedRowKeys: l2 }, columns: n2, dataSource: s4, size: "small", locale: { emptyText: p("div", { children: a("transferTable.noData") }) }, onRow: ({ key: e5 }) => ({ onClick: () => {
      i3(e5, !l2.includes(e5));
    } }) });
  } }), { title: [e2.leftTitle, e2.rightTitle], dataSource: s2, targetKeys: t2, onChange: (e3, t3, a2) => {
    r2(e3);
  }, leftColumns: o2, rightColumns: i2 }) });
}), w = o(new e(y, (e2) => {
  const r2 = t(e2, "TransferTableComp");
  return p(T, { ...r2 });
}).setPropertyViewFn((e2) => c(d, { children: [c(r, { name: a("transferTable.dataConfigsSection"), children: [e2.dataManual.propertyView({ label: a("transferTable.dataSourceLabel") }), e2.dataTarget.propertyView({ label: a("transferTable.dataTargetLabel") })] }), c(r, { name: a("transferTable.columnsLeftSection"), children: [e2.leftTitle.propertyView({ label: a("transferTable.titleLabel") }), s(e2.columnsLeft)] }), c(r, { name: a("transferTable.columnsRightSection"), children: [e2.rightTitle.propertyView({ label: a("transferTable.titleLabel") }), s(e2.columnsRight)] })] })).build(), []);
export {
  w as TransferTableComp
};
