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 { InputLabel } from '../../mixins/input-label/input-label';
import { InputState } from '../../mixins/input-state/input-state';
import { InputMaxWidth, InputWidth } from '../../mixins/input-width/input-width';
import { ModulVue } from '../../utils/vue/vue';
import { DATEPICKER_NAME, DATERANGEPICKER_NAME, PERIODPICKER_NAME } from '../component-names';
import { MDatepicker } from '../datepicker/datepicker';
import { MPeriodpicker } from '../periodpicker/periodpicker';
import WithRender from './daterangepicker.html';
var MDaterangepicker = /** @class */ (function (_super) {
    __extends(MDaterangepicker, _super);
    function MDaterangepicker() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Object.defineProperty(MDaterangepicker.prototype, "periodPickerProps", {
        get: function () {
            return { value: this.value, min: this.min, max: this.max };
        },
        enumerable: false,
        configurable: true
    });
    MDaterangepicker.prototype.updateValue = function (newValue) {
        return newValue;
    };
    __decorate([
        Prop()
    ], MDaterangepicker.prototype, "value", void 0);
    __decorate([
        Prop()
    ], MDaterangepicker.prototype, "min", void 0);
    __decorate([
        Prop()
    ], MDaterangepicker.prototype, "max", void 0);
    __decorate([
        Prop({
            default: function () { return Vue.prototype.$i18n.translate('m-daterangepicker:label.from'); }
        })
    ], MDaterangepicker.prototype, "labelFrom", void 0);
    __decorate([
        Prop({
            default: function () { return Vue.prototype.$i18n.translate('m-daterangepicker:label.to'); }
        })
    ], MDaterangepicker.prototype, "labelTo", void 0);
    __decorate([
        Prop({
            default: true
        })
    ], MDaterangepicker.prototype, "convertToIso", void 0);
    __decorate([
        Prop({ default: InputMaxWidth.Small })
    ], MDaterangepicker.prototype, "maxWidth", void 0);
    __decorate([
        Prop({ default: false })
    ], MDaterangepicker.prototype, "hideInternalErrorMessage", void 0);
    __decorate([
        Prop({ default: false })
    ], MDaterangepicker.prototype, "skipInputValidation", void 0);
    __decorate([
        Emit('input')
    ], MDaterangepicker.prototype, "updateValue", null);
    MDaterangepicker = __decorate([
        WithRender,
        Component({
            components: (_a = {},
                _a[DATEPICKER_NAME] = MDatepicker,
                _a[PERIODPICKER_NAME] = MPeriodpicker,
                _a),
            mixins: [
                InputLabel,
                InputState,
                InputWidth
            ]
        })
    ], MDaterangepicker);
    return MDaterangepicker;
}(ModulVue));
export { MDaterangepicker };
var DaterangepickerPlugin = {
    install: function (v) {
        v.component(DATERANGEPICKER_NAME, MDaterangepicker);
    }
};
export default DaterangepickerPlugin;
//# sourceMappingURL=daterangepicker.js.map