import { __decorate, __extends } from "tslib";
import { Component, Emit, Prop } from 'vue-property-decorator';
import { Enums } from '../../utils/enums/enums';
import { ModulVue } from '../../utils/vue/vue';
import { EMPTY_AREA_NAME } from '../component-names';
import { MAdd } from './../add/add';
import { MButton, MButtonSkin } from './../button/button';
import { MSvg } from './../svg/svg';
import WithRender from './empty-area.html?style=./empty-area.scss';
export var MEmptyAreaButtonType;
(function (MEmptyAreaButtonType) {
    MEmptyAreaButtonType["Button"] = "button";
    MEmptyAreaButtonType["AddButton"] = "add-button";
})(MEmptyAreaButtonType || (MEmptyAreaButtonType = {}));
var MEmptyArea = /** @class */ (function (_super) {
    __extends(MEmptyArea, _super);
    function MEmptyArea() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.buttonSkin = MButtonSkin.Secondary;
        return _this;
    }
    MEmptyArea.prototype.emitButtonClick = function () { };
    Object.defineProperty(MEmptyArea.prototype, "isButtonTypeAdd", {
        get: function () {
            return this.buttonType === MEmptyAreaButtonType.AddButton;
        },
        enumerable: true,
        configurable: true
    });
    __decorate([
        Prop()
    ], MEmptyArea.prototype, "text", void 0);
    __decorate([
        Prop()
    ], MEmptyArea.prototype, "buttonText", void 0);
    __decorate([
        Prop({
            default: MEmptyAreaButtonType.AddButton,
            validator: function (value) {
                return Enums.toValueArray(MEmptyAreaButtonType).includes(value);
            }
        })
    ], MEmptyArea.prototype, "buttonType", void 0);
    __decorate([
        Prop()
    ], MEmptyArea.prototype, "svgName", void 0);
    __decorate([
        Emit('button-click')
    ], MEmptyArea.prototype, "emitButtonClick", null);
    MEmptyArea = __decorate([
        WithRender,
        Component({
            components: { MButton: MButton, MAdd: MAdd, MSvg: MSvg }
        })
    ], MEmptyArea);
    return MEmptyArea;
}(ModulVue));
export { MEmptyArea };
var EmptyAreaPlugin = {
    install: function (v, options) {
        v.component(EMPTY_AREA_NAME, MEmptyArea);
    }
};
export default EmptyAreaPlugin;
//# sourceMappingURL=empty-area.js.map