import { __decorate, __extends } from "tslib";
import Component from 'vue-class-component';
import { Prop } from 'vue-property-decorator';
import { InputLabel } from '../../mixins/input-label/input-label';
import { InputManagement } from '../../mixins/input-management/input-management';
import { InputState } from '../../mixins/input-state/input-state';
import { InputMaxWidth, InputWidth } from '../../mixins/input-width/input-width';
import L10nPlugin from '../../utils/l10n/l10n';
import { ModulVue } from '../../utils/vue/vue';
import { MONEYFIELD_NAME } from '../component-names';
import { MDecimalfield } from '../decimalfield/decimalfield';
import WithRender from './moneyfield.html?style=./moneyfield.scss';
// TODO: Everything here is dispensable.  This will be all replaced by a wrapper of decimal-field.
var MMoneyfield = /** @class */ (function (_super) {
    __extends(MMoneyfield, _super);
    function MMoneyfield() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Object.defineProperty(MMoneyfield.prototype, "currencyDetail", {
        get: function () {
            return this.$l10n.getCurrencyDetail(this.currentLocale);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MMoneyfield.prototype, "currentLocale", {
        get: function () {
            return this.$i18n.currentLocale;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MMoneyfield.prototype, "bindData", {
        get: function () {
            return Object.assign({}, this.$props || {}, this.$attrs || {});
        },
        enumerable: false,
        configurable: true
    });
    __decorate([
        Prop()
    ], MMoneyfield.prototype, "value", void 0);
    __decorate([
        Prop({ default: InputMaxWidth.Small })
    ], MMoneyfield.prototype, "maxWidth", void 0);
    __decorate([
        Prop({
            default: 11
        })
    ], MMoneyfield.prototype, "precision", void 0);
    MMoneyfield = __decorate([
        WithRender,
        Component({
            inheritAttrs: false,
            components: {
                MDecimalfield: MDecimalfield
            },
            mixins: [
                InputState,
                InputWidth,
                InputLabel,
                InputManagement
            ]
        })
    ], MMoneyfield);
    return MMoneyfield;
}(ModulVue));
export { MMoneyfield };
var MoneyFieldPlugin = {
    install: function (v) {
        v.use(L10nPlugin);
        v.component(MONEYFIELD_NAME, MMoneyfield);
    }
};
export default MoneyFieldPlugin;
//# sourceMappingURL=moneyfield.js.map