(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@wm/components/base'), require('@wm/core')) :
    typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common', '@wm/components/base', '@wm/core'], factory) :
    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {}, global.wm.components.page = global.wm.components.page || {}, global.wm.components.page.rightpanel = {}), global.ng.core, global.ng.common, global.wm.components.base, global.wm.core));
})(this, (function (exports, i0, common, base, core) { 'use strict';

    function _interopNamespaceDefault(e) {
        var n = Object.create(null);
        if (e) {
            Object.keys(e).forEach(function (k) {
                if (k !== 'default') {
                    var d = Object.getOwnPropertyDescriptor(e, k);
                    Object.defineProperty(n, k, d.get ? d : {
                        enumerable: true,
                        get: function () { return e[k]; }
                    });
                }
            });
        }
        n.default = e;
        return Object.freeze(n);
    }

    var i0__namespace = /*#__PURE__*/_interopNamespaceDefault(i0);

    const registerProps = () => {
        base.register('wm-right-panel', new Map([
            ['class', base.PROP_STRING],
            ['columnwidth', base.PROP_NUMBER],
            ['content', base.PROP_STRING],
            ['name', base.PROP_STRING],
            ['hint', base.PROP_STRING],
            ['arialabel', base.PROP_STRING]
        ]));
    };

    const DEFAULT_CLS = 'app-right-panel';
    const WIDGET_CONFIG = {
        widgetType: 'wm-right-panel',
        hostClass: DEFAULT_CLS
    };
    class RightPanelDirective extends base.StylableComponent {
        static { this.initializeProps = registerProps(); }
        constructor(inj, explicitContext) {
            super(inj, WIDGET_CONFIG, explicitContext);
            base.styler(this.nativeElement, this, base.APPLY_STYLES_TYPE.CONTAINER);
        }
        onPropertyChange(key, nv, ov) {
            if (key === 'columnwidth') {
                core.switchClass(this.nativeElement, `col-sm-${nv}`, ov ? ` col-sm-${ov}` : '');
            }
            else {
                super.onPropertyChange(key, nv, ov);
            }
        }
        static { this.ɵfac = function RightPanelDirective_Factory(t) { return new (t || RightPanelDirective)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
        static { this.ɵdir = /*@__PURE__*/ i0__namespace.ɵɵdefineDirective({ type: RightPanelDirective, selectors: [["", "wmRightPanel", ""]], exportAs: ["wmRightPanel"], features: [i0__namespace.ɵɵProvidersFeature([
                    base.provideAsWidgetRef(RightPanelDirective)
                ]), i0__namespace.ɵɵInheritDefinitionFeature] }); }
    }
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RightPanelDirective, [{
            type: i0.Directive,
            args: [{
                    selector: '[wmRightPanel]',
                    providers: [
                        base.provideAsWidgetRef(RightPanelDirective)
                    ],
                    exportAs: 'wmRightPanel'
                }]
        }], () => [{ type: i0__namespace.Injector }, { type: undefined, decorators: [{
                    type: i0.Inject,
                    args: ['EXPLICIT_CONTEXT']
                }, {
                    type: i0.Optional
                }] }], null); })();

    const components = [
        RightPanelDirective
    ];
    class RightPanelModule {
        static { this.ɵfac = function RightPanelModule_Factory(t) { return new (t || RightPanelModule)(); }; }
        static { this.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: RightPanelModule }); }
        static { this.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [common.CommonModule,
                base.WmComponentsModule] }); }
    }
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RightPanelModule, [{
            type: i0.NgModule,
            args: [{
                    imports: [
                        common.CommonModule,
                        base.WmComponentsModule
                    ],
                    declarations: [...components],
                    exports: [...components]
                }]
        }], null, null); })();
    (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(RightPanelModule, { declarations: [RightPanelDirective], imports: [common.CommonModule,
            base.WmComponentsModule], exports: [RightPanelDirective] }); })();

    exports.RightPanelDirective = RightPanelDirective;
    exports.RightPanelModule = RightPanelModule;

}));
