import { __decorate, __extends } from "tslib";
import Vue from 'vue';
import Component from 'vue-class-component';
import { Emit, Prop } from 'vue-property-decorator';
import { Enums } from '../../utils/enums/enums';
import { ICON_BUTTON_NAME } from '../component-names';
import IconPlugin, { MIcon } from '../icon/icon';
import WithRender from './icon-button.html?style=./icon-button.scss';
export var MIconButtonSkin;
(function (MIconButtonSkin) {
    MIconButtonSkin["Light"] = "light";
    MIconButtonSkin["Dark"] = "dark";
    MIconButtonSkin["Primary"] = "primary";
    MIconButtonSkin["Secondary"] = "secondary";
    MIconButtonSkin["Link"] = "link";
    MIconButtonSkin["Bold"] = "bold";
})(MIconButtonSkin || (MIconButtonSkin = {}));
var MIconButton = /** @class */ (function (_super) {
    __extends(MIconButton, _super);
    function MIconButton() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.hasSlot = false;
        return _this;
    }
    MIconButton.prototype.onKeydown = function (event) { };
    MIconButton.prototype.onClick = function (event) {
        this.$emit('click', event);
    };
    MIconButton.prototype.onFocus = function (event) {
        this.$emit('focus');
    };
    MIconButton.prototype.onBlur = function (event) {
        this.$emit('blur');
    };
    Object.defineProperty(MIconButton.prototype, "isSkinLight", {
        get: function () {
            return this.skin === MIconButtonSkin.Light;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MIconButton.prototype, "isSkinDark", {
        get: function () {
            return this.skin === MIconButtonSkin.Dark;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MIconButton.prototype, "isSkinPrimary", {
        get: function () {
            return this.skin === MIconButtonSkin.Primary;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MIconButton.prototype, "isSkinSecondary", {
        get: function () {
            return this.skin === MIconButtonSkin.Secondary;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MIconButton.prototype, "isSkinLink", {
        get: function () {
            return this.skin === MIconButtonSkin.Link;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MIconButton.prototype, "isSkinBold", {
        get: function () {
            return this.skin === MIconButtonSkin.Bold;
        },
        enumerable: false,
        configurable: true
    });
    __decorate([
        Prop({
            default: MIconButtonSkin.Light,
            validator: function (value) { return Enums.toValueArray(MIconButtonSkin).indexOf(value) !== -1; }
        })
    ], MIconButton.prototype, "skin", void 0);
    __decorate([
        Prop()
    ], MIconButton.prototype, "disabled", void 0);
    __decorate([
        Prop({ default: '44px' })
    ], MIconButton.prototype, "buttonSize", void 0);
    __decorate([
        Prop({ default: 'm-svg__close-clear' })
    ], MIconButton.prototype, "iconName", void 0);
    __decorate([
        Prop({ default: '20px' })
    ], MIconButton.prototype, "iconSize", void 0);
    __decorate([
        Prop({ default: true })
    ], MIconButton.prototype, "ripple", void 0);
    __decorate([
        Prop()
    ], MIconButton.prototype, "title", void 0);
    __decorate([
        Emit('keydown')
    ], MIconButton.prototype, "onKeydown", null);
    MIconButton = __decorate([
        WithRender,
        Component({
            components: {
                MIcon: MIcon
            }
        })
    ], MIconButton);
    return MIconButton;
}(Vue));
export { MIconButton };
var IconButtonPlugin = {
    install: function (v, options) {
        v.prototype.$log.debug(ICON_BUTTON_NAME, 'plugin.install');
        v.use(IconPlugin);
        v.component(ICON_BUTTON_NAME, MIconButton);
    }
};
export default IconButtonPlugin;
//# sourceMappingURL=icon-button.js.map