var _a;
import { __decorate, __extends } from "tslib";
import Vue from 'vue';
import Component from 'vue-class-component';
import { Emit, Prop } from 'vue-property-decorator';
import { CHIP_ADD_NAME, CHIP_DELETE_NAME, CHIP_NAME } from '../component-names';
import MChipAdd from './chip-add/chip-add';
import MChipDelete from './chip-delete/chip-delete';
import WithRender from './chip.html';
export var MChipMode;
(function (MChipMode) {
    MChipMode["Add"] = "add";
    MChipMode["Delete"] = "delete";
})(MChipMode || (MChipMode = {}));
export var MChipSize;
(function (MChipSize) {
    MChipSize["Small"] = "small";
    MChipSize["Large"] = "large";
})(MChipSize || (MChipSize = {}));
var MChip = /** @class */ (function (_super) {
    __extends(MChip, _super);
    function MChip() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    MChip.prototype.emitClick = function (_event) { };
    MChip.prototype.emitAdd = function (_event) { };
    MChip.prototype.emitDelete = function () { };
    Object.defineProperty(MChip.prototype, "isModeAdd", {
        get: function () {
            return this.mode === MChipMode.Add;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MChip.prototype, "isModeDelete", {
        get: function () {
            return this.mode === MChipMode.Delete;
        },
        enumerable: false,
        configurable: true
    });
    __decorate([
        Prop()
    ], MChip.prototype, "disabled", void 0);
    __decorate([
        Prop()
    ], MChip.prototype, "tabindex", void 0);
    __decorate([
        Prop({
            default: MChipMode.Add,
            validator: function (value) {
                return value === MChipMode.Add ||
                    value === MChipMode.Delete;
            }
        })
    ], MChip.prototype, "mode", void 0);
    __decorate([
        Prop({
            default: MChipSize.Large,
            validator: function (value) {
                return value === MChipSize.Large ||
                    value === MChipSize.Small;
            }
        })
    ], MChip.prototype, "size", void 0);
    __decorate([
        Emit('click')
    ], MChip.prototype, "emitClick", null);
    __decorate([
        Emit('add')
    ], MChip.prototype, "emitAdd", null);
    __decorate([
        Emit('delete')
    ], MChip.prototype, "emitDelete", null);
    MChip = __decorate([
        WithRender,
        Component({
            components: (_a = {},
                _a[CHIP_ADD_NAME] = MChipAdd,
                _a[CHIP_DELETE_NAME] = MChipDelete,
                _a)
        })
    ], MChip);
    return MChip;
}(Vue));
export { MChip };
var MChipPlugin = {
    install: function (v, options) {
        v.prototype.$log.debug(CHIP_NAME, 'plugin.install');
        v.component(CHIP_NAME, MChip);
    }
};
export default MChipPlugin;
//# sourceMappingURL=chip.js.map