import { __decorate, __extends } from "tslib";
import Component from 'vue-class-component';
import { Prop } from 'vue-property-decorator';
import { Enums } from '../../utils/enums/enums';
import { ModulVue } from '../../utils/vue/vue';
import { PLUS_NAME } from '../component-names';
import WithRender from './plus.html?style=./plus.scss';
export var MPlusSkin;
(function (MPlusSkin) {
    MPlusSkin["Default"] = "default";
    MPlusSkin["Light"] = "light";
    MPlusSkin["CurrentColor"] = "current-color";
})(MPlusSkin || (MPlusSkin = {}));
var MPlus = /** @class */ (function (_super) {
    __extends(MPlus, _super);
    function MPlus() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Object.defineProperty(MPlus.prototype, "title", {
        get: function () {
            return this.open ? this.titleClose : this.titleOpen;
        },
        enumerable: false,
        configurable: true
    });
    MPlus.prototype.onClick = function (event) {
        if (!this.disabled) {
            this.$emit('click', event);
        }
    };
    __decorate([
        Prop()
    ], MPlus.prototype, "titleOpen", void 0);
    __decorate([
        Prop()
    ], MPlus.prototype, "titleClose", void 0);
    __decorate([
        Prop()
    ], MPlus.prototype, "open", void 0);
    __decorate([
        Prop()
    ], MPlus.prototype, "large", void 0);
    __decorate([
        Prop()
    ], MPlus.prototype, "border", void 0);
    __decorate([
        Prop({
            default: MPlusSkin.Default,
            validator: function (value) { return Enums.toValueArray(MPlusSkin).includes(value); }
        })
    ], MPlus.prototype, "skin", void 0);
    __decorate([
        Prop()
    ], MPlus.prototype, "disabled", void 0);
    MPlus = __decorate([
        WithRender,
        Component
    ], MPlus);
    return MPlus;
}(ModulVue));
export { MPlus };
var PlusPlugin = {
    install: function (v, options) {
        v.component(PLUS_NAME, MPlus);
    }
};
export default PlusPlugin;
//# sourceMappingURL=plus.js.map