import { CheckCircleIcon, WarningIcon } from "@chakra-ui/icons";
import { Box, Text } from "@chakra-ui/react";
import React from "react";
import { PiWarningBold } from "react-icons/pi";

const ToastBox = ({ message, status }) => {
  return (
    <Box
      color="white"
      rounded={"sm"}
      className="web-text-large d-flex gap-2 align-items-center"
      p={3}
      bg={status === "error" ? "red.500" : status === "warn" ? "yellow.500" : status === "info" ?  "blue.500" : "green.500"}
    >

      {status === "error" || status === "warn" ? <PiWarningBold/> : status === "info" ?  <WarningIcon/>  : <CheckCircleIcon /> }
      <Text as={"span"}>{message}</Text>
    </Box>
  );
};

export default ToastBox;
