'use strict';

var jsxRuntime = require('react/jsx-runtime');
var react = require('@chakra-ui/react');
var noData = require('../../assets/no-data.cjs');

const Empty = ({ errorCode, description = "No data found" }) => {
  if (!!errorCode) {
    return /* @__PURE__ */ jsxRuntime.jsx(react.Alert, { status: "error", rounded: "md", children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { spacing: 0, children: [
      /* @__PURE__ */ jsxRuntime.jsx(
        react.AlertTitle,
        {
          "data-testid": "no-data-error-title",
          textColor: "brand.500",
          children: `Error (${errorCode}):`
        }
      ),
      /* @__PURE__ */ jsxRuntime.jsx(react.AlertDescription, { "data-testid": "no-data-error-description", textColor: "brand.600", children: description })
    ] }) });
  }
  return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { alignItems: "center", justifyContent: "center", textAlign: "center", p: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 1, children: [
    /* @__PURE__ */ jsxRuntime.jsx(react.Image, { "data-testid": "no-data-image", src: noData, boxSize: "64px", alt: "no-data" }),
    /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { as: "h1", "data-testid": "no-data-heading", opacity: "0.5", size: "md", fontWeight: "normal", children: description })
  ] }) });
};

module.exports = Empty;
//# sourceMappingURL=Empty.cjs.map
