// Copyright (c) 2009-2026 SAP SE, All Rights Reserved

sap.ui.define([
    "sap/ui/core/Control"
], (
    Control
) => {
    "use strict";

    /**
     * @alias sap.ushell.ui.launchpad.VizInstanceBase
     * @class
     * @classdesc Wrapper control for tiles. This control must only be created via {@link sap.ushell.services.VisualizationInstantiation#instantiateVisualization}
     *
     * @hideconstructor
     * @extends sap.ui.core.Control
     *
     * @since 1.121.0
     * @private
     * @ui5-restricted sap.esh.search.ui, ux.eng.producthome, ux.eng.s4producthomes1
     */
    const VizInstanceBase = Control.extend("sap.ushell.ui.launchpad.VizInstanceBase", /** @lends sap.ushell.ui.launchpad.VizInstanceBase.prototype */ {
        metadata: {
            library: "sap.ushell",
            properties: {
                /**
                 * Current active state. Can be used to update visibility of the VizInstance.
                 */
                active: { type: "boolean", defaultValue: false }
            }
        },
        renderer: {
            apiVersion: 2,
            render (rm, vizInstance) {
                rm.openStart("div", vizInstance)
                    .class("sapUshellVizInstanceBase")
                    .openEnd()
                    .close("div");
            }
        }
    });

    return VizInstanceBase;
});
