class BaseComponent {
    _component_base_ui;

    constructor(component_base_ui) {
        this._component_base_ui = component_base_ui;
        if (this._component_base_ui && this._component_base_ui.length) {
            this._component_base_ui.data('initialized', 'true');
        }
    }

    show() {
        if (this._component_base_ui) {
            this._component_base_ui.show();
        }
    }

    hide() {
        if (this._component_base_ui) {
            this._component_base_ui.hide();
        }
    }

    fadeIn(duration = 300) {
        if (this._component_base_ui) {
            this._component_base_ui.fadeIn(duration);
        }
    }

    fadeOut(duration = 300) {
        if (this._component_base_ui) {
            this._component_base_ui.fadeOut(duration);
        }
    }

    addClass(className) {
        if (this._component_base_ui) {
            this._component_base_ui.addClass(className);
        }
    }

    removeClass(className) {
        if (this._component_base_ui) {
            this._component_base_ui.removeClass(className);
        }
    }

    toggleClass(className) {
        if (this._component_base_ui) {
            this._component_base_ui.toggleClass(className);
        }
    }
}

export default BaseComponent;
