import { __decorate } from "tslib";
import { Vue, Component, Prop } from 'vue-property-decorator';
import './menu-icon.less';
/**
 * 平台菜单按钮适配
 *
 * @export
 * @class MenuIcon
 * @extends {Vue}
 */
let MenuIcon = class MenuIcon extends Vue {
    /**
     * 绘制图标
     *
     * @returns {*}
     * @memberof MenuIcon
     */
    render() {
        var _a, _b;
        if (this.item) {
            if (this.item.iconcls || ((_a = this.item.getPSSysImage) === null || _a === void 0 ? void 0 : _a.cssClass)) {
                return <i class={this.item.iconcls || this.item.getPSSysImage.cssClass}/>;
            }
            if (this.item.icon || ((_b = this.item.getPSSysImage) === null || _b === void 0 ? void 0 : _b.imagePath)) {
                return <img src={this.item.icon || this.item.getPSSysImage.imagePath}/>;
            }
        }
        return <span />;
    }
};
__decorate([
    Prop()
], MenuIcon.prototype, "item", void 0);
MenuIcon = __decorate([
    Component({})
], MenuIcon);
export { MenuIcon };
