import React from "react";

interface IProps {
    name?: string,
    status?: "success" | "error",
    color?: string,
    size?: "small" | "default" | "large",
}

const Mdicon: React.FC<IProps> = (props: IProps) => {
    const name = props.name ? props.name : "image";

    const getSize = (size: string) => {
        switch (size) {
        case "small":
            return 14;
        case "default":
            return "inherit";
        case "large":
            return 48;
        default:
        // adasdas
        }
    };

    return (
        <span
            role="img"
            aria-label={name}
            className="anticon anticon-mdi"
            style={{
                color: props.color ? props.color : "inherit",
            }}
        >
            <span
                className="material-symbols-outlined"
                style={{
                    fontSize: getSize(props.size ? props.size : "default"),
                }}
            >
                {name}
            </span>
        </span>
    );
};

export default Mdicon;
