/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../chunks/_rollupPluginBabelHelpers","../../../chunks/tslib.es6","../../../core/maybe","../../../core/accessorSupport/decorators/property","../../../core/arrayUtils","../../../core/has","../../../core/accessorSupport/ensureType","../../../core/accessorSupport/decorators/subclass","../../Widget","../../support/widgetUtils","../../support/jsxFactory"],(function(e,t,o,r,i,l,s,n,a,c,p,u){"use strict";const d={container:"esri-building-level-picker-item",base:"esri-building-level-picker-item__base",hover:"esri-building-level-picker-item--hover",active:"esri-building-level-picker-item--active"};e.LevelItem=function(e){function o(t,o){var r;return(r=e.call(this,t,o)||this).active=!1,r.hovering=!1,r.width=0,r.height=0,r.onSelect=()=>{},r.onFocus=()=>{},r.onBlur=()=>{},r._baseElement=null,r}t._inheritsLoose(o,e);var i=o.prototype;return i.render=function(){return u.tsx("div",{key:this,bind:this,class:this.classes(d.container,{[d.active]:this.active,[d.hover]:this.hovering}),styles:{height:`${this.height}px`}},this._renderBase())},i.focus=function(){r.isNone(this._baseElement)||this._baseElement.focus()},i._renderBase=function(){const e=this.width,t=.8*this.width;return u.tsx("div",{class:d.base,styles:{width:`${Math.round(e)}px`,height:`${Math.round(e)}px`}},u.tsx("button",{bind:this,class:"rect",styles:{width:`${Math.round(t)}px`,height:`${Math.round(t)}px`},onclick:this.onSelect,onfocus:this.onFocus,onblur:this.onBlur,afterCreate:p.storeNode,"data-node-ref":"_baseElement","aria-label":this.label,title:this.label,tabIndex:-1,type:"button"}))},o}(c),o.__decorate([i.property({nonNullable:!0})],e.LevelItem.prototype,"level",void 0),o.__decorate([i.property()],e.LevelItem.prototype,"label",void 0),o.__decorate([i.property({nonNullable:!0})],e.LevelItem.prototype,"active",void 0),o.__decorate([i.property({nonNullable:!0})],e.LevelItem.prototype,"hovering",void 0),o.__decorate([i.property({nonNullable:!0})],e.LevelItem.prototype,"width",void 0),o.__decorate([i.property({nonNullable:!0})],e.LevelItem.prototype,"height",void 0),o.__decorate([i.property({nonNullable:!0})],e.LevelItem.prototype,"onSelect",void 0),o.__decorate([i.property({nonNullable:!0})],e.LevelItem.prototype,"onFocus",void 0),o.__decorate([i.property({nonNullable:!0})],e.LevelItem.prototype,"onBlur",void 0),e.LevelItem=o.__decorate([a.subclass("esri.widgets.BuildingExplorer.BuildingLevelPicker.LevelItem")],e.LevelItem),Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
