'use strict';

var iconsReact = require('@cloudtower/icons-react');
var index = require('../Icon/index.js');
var cs = require('classnames');
var React = require('react');
var useElementsSize = require('../../hooks/useElementsSize.js');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var cs__default = /*#__PURE__*/_interopDefault(cs);
var React__default = /*#__PURE__*/_interopDefault(React);

const TableLoadingStyle = "E_4100_0_7_t13ef470";
const TableLoading = () => {
  const sizes = useElementsSize({
    loading: ".ant-table-wrapper .ant-spin"
  }, {});
  const rowLength = Math.floor(sizes.loading.height + 8 / 40) || 20;
  const rows = Array.from({
    length: rowLength
  }, (r, i) => i);
  return /* @__PURE__ */React__default.default.createElement("div", {
    className: `${TableLoadingStyle} table-loading`
  }, rows.map(i => /* @__PURE__ */React__default.default.createElement("div", {
    key: i,
    className: "table-loading-item"
  }, /* @__PURE__ */React__default.default.createElement("div", {
    className: "checkbox-loading"
  }), /* @__PURE__ */React__default.default.createElement("div", {
    className: "td-loading"
  }), /* @__PURE__ */React__default.default.createElement("div", {
    className: "td-loading"
  }), /* @__PURE__ */React__default.default.createElement("div", {
    className: "td-loading"
  }))));
};
const KitTableContext = React.createContext({});
const ColumnTitle = props => {
  const {
    title,
    sortOrder
  } = props;
  return /* @__PURE__ */React__default.default.createElement(React__default.default.Fragment, null, title, /* @__PURE__ */React__default.default.createElement(index, {
    alt: "arrowChevronUp16BoldSecondary",
    className: cs__default.default("order-icon", sortOrder),
    src: iconsReact.ArrowChevronUp16BoldSecondaryIcon
  }));
};
const EmptyRowMenu = () => {
  return /* @__PURE__ */React__default.default.createElement(React__default.default.Fragment, null);
};

exports.ColumnTitle = ColumnTitle;
exports.EmptyRowMenu = EmptyRowMenu;
exports.KitTableContext = KitTableContext;
exports.TableLoading = TableLoading;
