import*as Common from"../common/common.js";import*as UI from"../ui/ui.js";import{ComputedStyleModel,Events}from"./ComputedStyleModel.js";export class ElementsSidebarPane extends UI.Widget.VBox{constructor(e){super(!0,e),this.element.classList.add("flex-none"),this._computedStyleModel=new ComputedStyleModel,this._computedStyleModel.addEventListener(Events.ComputedStyleChanged,this.onCSSModelChanged,this),this._updateThrottler=new Common.Throttler.Throttler(100),this._updateWhenVisible=!1}node(){return this._computedStyleModel.node()}cssModel(){return this._computedStyleModel.cssModel()}computedStyleModel(){return this._computedStyleModel}async doUpdate(){}update(){this._updateWhenVisible=!this.isShowing(),this._updateWhenVisible||this._updateThrottler.schedule(function(){return this.isShowing()?this.doUpdate():Promise.resolve()}.bind(this))}wasShown(){super.wasShown(),this._updateWhenVisible&&this.update()}onCSSModelChanged(e){}}