Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_chunk = require("../../chunk-BN4qSVkS.cjs");
const require_styles_themes = require("../../styles/themes.cjs");
const require_styles_common = require("../../styles/common.cjs");
let _emotion_styled = require("@emotion/styled");
_emotion_styled = require_chunk.__toESM(_emotion_styled);
let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
//#region src/components/Table/TableEmptyState.tsx
const TableEmptyState = (props) => {
	const lines = [];
	for (let i = 0; i < 10; i++) {
		const percentage = randomIntFromInterval(70, 100);
		lines.push(/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(TableEmptyStateLine, { percentage }, i));
	}
	return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)(StyledTableEmptyState, { children: [lines, props.cardTitle || props.cardText ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(TableEmptyStateCardContainer, { children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)(TableEmptyStateCard, { children: [props.cardTitle ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(TableEmptyStateCardTitle, { children: props.cardTitle }) : null, props.cardText ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(TableEmptyStateCardText, { children: props.cardText }) : null] }) }) : null] });
};
const StyledTableEmptyState = _emotion_styled.default.div`
  position: relative;
  ${require_styles_common.standardContentInset.css}
`;
const TableEmptyStateLine = _emotion_styled.default.div`
  background: linear-gradient(
    90deg,
    ${({ theme }) => require_styles_themes.isDark(theme) ? theme.c1Neutral : theme.c05Neutral} 0%,
    rgba(242, 242, 242, 0) 100%
  );
  height: 16px;
  margin: 15px 0;
  width: ${(props) => props.percentage}%;
`;
function randomIntFromInterval(min, max) {
	return Math.floor(Math.random() * (max - min + 1) + min);
}
const TableEmptyStateCardContainer = _emotion_styled.default.div`
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: absolute;
  top: 0;
  height: 100%;
  width: 100%;
`;
const TableEmptyStateCard = _emotion_styled.default.div`
  ${require_styles_common.standardCardShadow}
  ${require_styles_common.standardBorderRadius(16)}
  padding: 32px;
  width: 320px;
  max-width: 100%;
  ${({ theme }) => require_styles_themes.themeOr(`background-color: ${theme.bg}`, "transparent")({ theme })};
`;
const TableEmptyStateCardTitle = _emotion_styled.default.p`
  font-weight: bold;
  margin: 0;
`;
const TableEmptyStateCardText = _emotion_styled.default.p`
  color: ${({ theme }) => theme.c6Neutral};
  margin-top: 6px;
  margin-bottom: 0;
`;
//#endregion
exports.TableEmptyState = TableEmptyState;
