/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as e}from"tslib";import{property as t,subclass as r}from"../../../../core/accessorSupport/decorators.js";import s from"../../../Widget.js";import{ToolbarGroupBase as i}from"./ToolbarGroupBase.js";import{tsx as o}from"../../../support/widget.js";import{onResize as d}from"../../../support/widgetUtils.js";const m=Symbol("on-resize-handle-key");let a=class extends(i(s)){constructor(e){super(e),this._measuredWidth=0,this._measuredHeight=0,this._measuredElement=null}destroy(){this._measuredElement=null}get lengthOptions(){return["horizontal"===this.layout?this._measuredWidth:this._measuredHeight]}render(){return o("div",{afterCreate:e=>{this._measuredElement=e.firstElementChild,this.addHandles(d(this._measuredElement,()=>{this._measuredWidth=this._measuredElement?.clientWidth??0,this._measuredHeight=this._measuredElement?.clientHeight??0}),m)},afterRemoved:()=>this.removeHandles(m)},this.children)}};e([t()],a.prototype,"_measuredWidth",void 0),e([t()],a.prototype,"_measuredHeight",void 0),e([t()],a.prototype,"lengthOptions",null),e([t()],a.prototype,"_measuredElement",void 0),a=e([r("esri.widgets.Sketch.support.ResponsiveToolbar.MeasuredContentGroup")],a);export{a as default};
