import { ArrowChevronUp16BoldSecondaryIcon } from '@cloudtower/icons-react';
import Icon from '../Icon/index.js';
import cs from 'classnames';
import React__default, { createContext } from 'react';
import useElementsSize from '../../hooks/useElementsSize.js';

const TableLoadingStyle = "E_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.createElement("div", {
    className: `${TableLoadingStyle} table-loading`
  }, rows.map(i => /* @__PURE__ */React__default.createElement("div", {
    key: i,
    className: "table-loading-item"
  }, /* @__PURE__ */React__default.createElement("div", {
    className: "checkbox-loading"
  }), /* @__PURE__ */React__default.createElement("div", {
    className: "td-loading"
  }), /* @__PURE__ */React__default.createElement("div", {
    className: "td-loading"
  }), /* @__PURE__ */React__default.createElement("div", {
    className: "td-loading"
  }))));
};
const KitTableContext = createContext({});
const ColumnTitle = props => {
  const {
    title,
    sortOrder
  } = props;
  return /* @__PURE__ */React__default.createElement(React__default.Fragment, null, title, /* @__PURE__ */React__default.createElement(Icon, {
    alt: "arrowChevronUp16BoldSecondary",
    className: cs("order-icon", sortOrder),
    src: ArrowChevronUp16BoldSecondaryIcon
  }));
};
const EmptyRowMenu = () => {
  return /* @__PURE__ */React__default.createElement(React__default.Fragment, null);
};

export { ColumnTitle, EmptyRowMenu, KitTableContext, TableLoading };
