import { jsx, jsxs } from 'react/jsx-runtime';
import { Alert, HStack, AlertTitle, AlertDescription, Flex, VStack, Image, Heading } from '@chakra-ui/react';
import img from '../../assets/no-data.svg.js';

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

export { Empty as default };
//# sourceMappingURL=Empty.js.map
