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 m } from "./index-2be62fff.js";
import { f as n } from "./lodash-226cb5b1.js";
import { lA as p, lR as c, lS as d } from "./ant-design-icons-14ab96af.js";
import { memo as j, useState as f, useMemo as u } from "react";
import "./loglevel-5e7e37fc.js";
import { TransferTableItemListComp as g } from "./transferTableItemComp-3b89cd05.js";
import { q as h, T as b } from "./antd-97b654da.js";
import "./axios-125479b5.js";
import "./redux-devtools-f8b1cd80.js";
import "./alasql-f59e855e.js";
import "./react-router-8d1fc2f1.js";
import "./fontawesome-89eb6278.js";
import "react-dom";
import "./dnd-kit-e67c9595.js";
import "./moment-d8baa15a.js";
import "./crypto-js-8020edb5.js";
import "./dayjs-7fc5ce65.js";
import "./styled-components-c6abe9a3.js";
import "./numbro-48e81844.js";
import "./papaparse-088c0adc.js";
import "./uuid-82f303b2.js";
import "./supabase-2e4a9112.js";
import "./fetch-6a200310.js";
import "./react-draggable-fda4f1cb.js";
import "./remark-gfm-e9b5dec7.js";
import "./buffer-e20f80c8.js";
import "./rehype-raw-41b6145f.js";
import "./parse5-6476676e.js";
import "./rehype-sanitize-deb53e9a.js";
import "./simplebar-react-cab52c82.js";
import "./react-best-gradient-color-picker-812be7ee.js";
import "./ua-parser-js-1d18a3f8.js";
import "./clsx-469c2c43.js";
import "./codemirror-edf161cb.js";
import "./really-relaxed-json-e5391d6a.js";
import "./immer-c0428a8d.js";
import "./redux-saga-1b0a458d.js";
import "./hotkeys-js-0dddb21a.js";
import "./cnchar-8c3eaa86.js";
import "./react-documents-ae08f8b5.js";
import "./sql-formatter-69e8df59.js";
import "./rc-trigger-9e54e169.js";
import "./react-json-view-364658b4.js";
import "./qrcode-react-e4f7745b.js";
import "./katex-cda5b990.js";
import "./ecogis-maps-10bb29cf.js";
import "./devextreme-28d23085.js";
import "./exceljs-1678d36b.js";
import "./file-saver-es-c18fae8f.js";
const y = { dataManual: i(l), dataTarget: i(l), columnsLeft: g, columnsRight: g, leftTitle: m, rightTitle: m }, 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 m2 = "left" === e4 ? t3 : r3;
    return p(b, { rowSelection: { onSelectAll(e5, t4) {
      const r4 = t4.map(({ key: e6 }) => e6), a2 = e5 ? n.difference(r4, l2) : n.difference(l2, r4);
      o3(a2, e5);
    }, onSelect({ key: e5 }, t4) {
      i3(e5, t4);
    }, selectedRowKeys: l2 }, columns: m2, 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
};
