import { Atom } from "../../atom";
export var IconSize;
(function (IconSize) {
    IconSize[IconSize["small"] = 0] = "small";
    IconSize[IconSize["default"] = 1] = "default";
    IconSize[IconSize["medium"] = 2] = "medium";
})(IconSize || (IconSize = {}));
export class IconAtom extends Atom {
    static { this.CSS_CLASS = "nui-icon"; }
    static { this.iconSize = {
        small: "sm",
        default: "default",
        medium: "md",
    }; }
    async getName() {
        return super.getLocator().getAttribute("icon");
    }
    async getStatus() {
        return super.getLocator().getAttribute("status");
    }
    async getCounter() {
        return super.getLocator().getAttribute("counter");
    }
    getIconByCssClass(cssClass) {
        return super.getLocator().locator(cssClass);
    }
    async getSize() {
        const css = await super.getLocator().getAttribute("class");
        if (!css) {
            return "";
        }
        if (css.search(IconAtom.iconSize.small) !== -1) {
            return IconAtom.iconSize.small;
        }
        else if (css.search(IconAtom.iconSize.medium) !== -1) {
            return IconAtom.iconSize.medium;
        }
        else {
            return IconAtom.iconSize.default;
        }
    }
}
//# sourceMappingURL=icon.atom.js.map