import { __decorate, __extends } from "tslib";
import { Component, Emit, Prop } from 'vue-property-decorator';
import { MediaQueries } from '../../../mixins/media-queries/media-queries';
import { ModulVue } from '../../../utils/vue/vue';
import { MCheckbox } from '../../checkbox/checkbox';
import { MRadioStyle } from '../../radio-style/radio-style';
import WithRender from './select-item.html?style=./select-item.scss';
var MSelectItem = /** @class */ (function (_super) {
    __extends(MSelectItem, _super);
    function MSelectItem() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    MSelectItem.prototype.emitClick = function ($event) { };
    Object.defineProperty(MSelectItem.prototype, "isItemActive", {
        get: function () {
            return !this.disabled;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MSelectItem.prototype, "isFocused", {
        get: function () {
            return this.isItemActive && this.focused;
        },
        enumerable: false,
        configurable: true
    });
    MSelectItem.prototype.onClick = function ($event) {
        if (!this.disabled) {
            this.emitClick($event);
        }
    };
    __decorate([
        Prop()
    ], MSelectItem.prototype, "label", void 0);
    __decorate([
        Prop()
    ], MSelectItem.prototype, "value", void 0);
    __decorate([
        Prop()
    ], MSelectItem.prototype, "disabled", void 0);
    __decorate([
        Prop()
    ], MSelectItem.prototype, "waiting", void 0);
    __decorate([
        Prop()
    ], MSelectItem.prototype, "readonly", void 0);
    __decorate([
        Prop()
    ], MSelectItem.prototype, "selected", void 0);
    __decorate([
        Prop()
    ], MSelectItem.prototype, "multiselect", void 0);
    __decorate([
        Prop()
    ], MSelectItem.prototype, "focused", void 0);
    __decorate([
        Prop({ default: false })
    ], MSelectItem.prototype, "hideRadioButtonMobile", void 0);
    __decorate([
        Prop()
    ], MSelectItem.prototype, "id", void 0);
    __decorate([
        Emit('click')
    ], MSelectItem.prototype, "emitClick", null);
    MSelectItem = __decorate([
        WithRender,
        Component({
            components: {
                MRadioStyle: MRadioStyle,
                MCheckbox: MCheckbox
            },
            mixins: [MediaQueries]
        })
    ], MSelectItem);
    return MSelectItem;
}(ModulVue));
export { MSelectItem };
//# sourceMappingURL=select-item.js.map