var _a;
import { __decorate, __extends } from "tslib";
import Component from 'vue-class-component';
import { Emit, Prop } from 'vue-property-decorator';
import { ModulVue } from '../../utils/vue/vue';
import { ADD_NAME, LINK_NAME } from '../component-names';
import { MLink, MLinkIconPosition, MLinkSkin } from '../link/link';
import WithRender from './add.html';
import './add.scss';
var MAdd = /** @class */ (function (_super) {
    __extends(MAdd, _super);
    function MAdd() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    MAdd.prototype.emitClick = function () { };
    MAdd.prototype.onClick = function () {
        if (this.disabled) {
            return;
        }
        this.emitClick();
    };
    __decorate([
        Prop()
    ], MAdd.prototype, "disabled", void 0);
    __decorate([
        Prop({ default: true })
    ], MAdd.prototype, "underline", void 0);
    __decorate([
        Prop({
            default: MLinkSkin.Default,
            validator: function (value) {
                return value === MLinkSkin.Default ||
                    value === MLinkSkin.Light ||
                    value === MLinkSkin.Text;
            }
        })
    ], MAdd.prototype, "skin", void 0);
    __decorate([
        Prop({
            default: MLinkIconPosition.Left,
            validator: function (value) {
                return value === MLinkIconPosition.Left || value === MLinkIconPosition.Right;
            }
        })
    ], MAdd.prototype, "iconPosition", void 0);
    __decorate([
        Prop({ default: '24px' })
    ], MAdd.prototype, "iconSize", void 0);
    __decorate([
        Emit('click')
    ], MAdd.prototype, "emitClick", null);
    MAdd = __decorate([
        WithRender,
        Component({
            components: (_a = {},
                _a[LINK_NAME] = MLink,
                _a)
        })
    ], MAdd);
    return MAdd;
}(ModulVue));
export { MAdd };
var AddPlugin = {
    install: function (v, options) {
        v.prototype.$log.debug(ADD_NAME, 'plugin.install');
        v.component(ADD_NAME, MAdd);
    }
};
export default AddPlugin;
//# sourceMappingURL=add.js.map