"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }



var _chunkRSHN4K6Ncjs = require('./chunk-RSHN4K6N.cjs');



var _chunkOBHJBBPCcjs = require('./chunk-OBHJBBPC.cjs');

// src/components/Table/TableEmptyState.tsx
var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);
var _jsxruntime = require('@emotion/react/jsx-runtime');
var TableEmptyState = (props) => {
  const lines = [];
  for (let i = 0; i < 10; i++) {
    const percentage = randomIntFromInterval(70, 100);
    lines.push(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableEmptyStateLine, { percentage }, i));
  }
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, StyledTableEmptyState, { children: [
    lines,
    props.cardTitle || props.cardText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableEmptyStateCardContainer, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableEmptyStateCard, { children: [
      props.cardTitle ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableEmptyStateCardTitle, { children: props.cardTitle }) : null,
      props.cardText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableEmptyStateCardText, { children: props.cardText }) : null
    ] }) }) : null
  ] });
};
var StyledTableEmptyState = _styled2.default.div`
  position: relative;
  ${_chunkRSHN4K6Ncjs.standardContentInset.css}
`;
var TableEmptyStateLine = _styled2.default.div`
  background: linear-gradient(
    90deg,
    ${({ theme }) => _chunkOBHJBBPCcjs.isDark.call(void 0, 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);
}
var TableEmptyStateCardContainer = _styled2.default.div`
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: absolute;
  top: 0;
  height: 100%;
  width: 100%;
`;
var TableEmptyStateCard = _styled2.default.div`
  ${_chunkRSHN4K6Ncjs.standardCardShadow}
  ${_chunkRSHN4K6Ncjs.standardBorderRadius.call(void 0, 16)}
  padding: 32px;
  width: 320px;
  max-width: 100%;
  ${({ theme }) => _chunkOBHJBBPCcjs.themeOr.call(void 0, `background-color: ${theme.bg}`, "transparent")({ theme })};
`;
var TableEmptyStateCardTitle = _styled2.default.p`
  font-weight: bold;
  margin: 0;
`;
var TableEmptyStateCardText = _styled2.default.p`
  color: ${({ theme }) => theme.c6Neutral};
  margin-top: 6px;
  margin-bottom: 0;
`;



exports.TableEmptyState = TableEmptyState;
