var _a;
import { __decorate, __extends } from "tslib";
import Vue from 'vue';
import Component from 'vue-class-component';
import { Prop } from 'vue-property-decorator';
import { BREADCRUMBS_NAME, LINK_NAME } from '../component-names';
import { MLink, MLinkIconPosition, MLinkMode } from '../link/link';
import WithRender from './breadcrumbs.html?style=./breadcrumbs.scss';
var MBreadcrumbs = /** @class */ (function (_super) {
    __extends(MBreadcrumbs, _super);
    function MBreadcrumbs() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.linkMode = MLinkMode.Link;
        _this.iconPosition = MLinkIconPosition.Left;
        return _this;
    }
    Object.defineProperty(MBreadcrumbs.prototype, "definedItems", {
        get: function () {
            return this.items.filter(function (item) { return item.text || item.iconName; });
        },
        enumerable: false,
        configurable: true
    });
    MBreadcrumbs.prototype.itemDivider = function (index) {
        return index < this.definedItems.length ? this.definedItems[index].divider || this.divider : '';
    };
    __decorate([
        Prop({ default: [] })
    ], MBreadcrumbs.prototype, "items", void 0);
    __decorate([
        Prop({ default: '/' })
    ], MBreadcrumbs.prototype, "divider", void 0);
    __decorate([
        Prop({ default: false })
    ], MBreadcrumbs.prototype, "disabled", void 0);
    MBreadcrumbs = __decorate([
        WithRender,
        Component({
            components: (_a = {},
                _a[LINK_NAME] = MLink,
                _a)
        })
    ], MBreadcrumbs);
    return MBreadcrumbs;
}(Vue));
export { MBreadcrumbs };
var BreadcrumbsPlugin = {
    install: function (v) {
        v.prototype.$log.debug(BREADCRUMBS_NAME, 'plugin.install');
        v.component(BREADCRUMBS_NAME, MBreadcrumbs);
    }
};
export default BreadcrumbsPlugin;
//# sourceMappingURL=breadcrumbs.js.map