import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import React from "react";
import { ModAlertErrorProps } from "./TAlert";
import { RxExclamationTriangle } from "react-icons/rx";

class ModAlertError extends React.Component<ModAlertErrorProps> {
  constructor(props: ModAlertErrorProps) {
    super(props);
  }

  render(): React.ReactNode {
    return (
      <Alert className={this.props.className} variant={"destructive"}>
        <RxExclamationTriangle color="red" size={18} />
        <AlertTitle>Error</AlertTitle>

        <AlertDescription>{this.props.content}</AlertDescription>
      </Alert>
    );
  }
}

export { ModAlertError };
