


const utilizeAlert = async () => {
    const { createStandaloneToast } = await import("@chakra-ui/react");
    const { toast } = createStandaloneToast();


    const info = (title: string, message: string, id: number = 0) => {
        toast({
            id,
            title,
            description: message,
            colorScheme: "blue",
            status: "info",
            position: "top-right",
            isClosable: false,
            duration: 3000,
        });
    };

    const error = (title: string, message: string, id: number = 0) => {
        toast({
            id,
            title,
            description: message,
            colorScheme: "red",
            status: "error",
            position: "top-right",
            isClosable: false,
            duration: 3000,
        });
    };

    return {
        info,
        error,
    };
};

export const { info, error } = await utilizeAlert();