// All material copyright ESRI, All Rights Reserved, unless otherwise specified.// See https://js.arcgis.com/4.6/esri/copyright.txt for details.//>>builtdefine("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Widget ./support/widget dojo/i18n!../nls/common ./Expand/ExpandViewModel".split(" "),function(r,t,q,d,e,l,c,m,n){returnfunction(p){functionb(a){a=p.call(this)||this;a.autoCollapse=!1;a.collapseIconClass="";a.collapseTooltip="";a.content="";a.expanded=!1;a.expandIconClass="";a.expandTooltip="";a.group=null;a.iconNumber=0;a.view=null;a.viewModel=newn;returna}q(b,p);b.prototype.expand=function(){this.viewModel.expanded=!0};b.prototype.collapse=function(){this.viewModel.expanded=!1};b.prototype.toggle=function(){this.viewModel.expanded=!this.viewModel.expanded};b.prototype.render=function(){vara=this.viewModel.expanded,b=this.expandTooltip||m.expand,d=this.collapseTooltip||m.collapse,b=a?d:b,d=this.collapseIconClass||"esri-icon-collapse",e=this.expandIconClass||"esri-icon-expand",d=(f={},f["esri-expand__icon--expanded"]=a,f[d]=a,f[e]=!a,f),f=(g={},g["esri-expand__container--expanded"]=a,g),g=(h={},h["esri-expand__content--expanded"]=a,h),h=(k={},k["esri-expand__mask--expanded"]=a,k),k=(e=this.iconNumber)&&!a?c.tsx("span",{key:"expand__icon-number",class:"esri-expand__icon-number"},e):null,a=e&&a?c.tsx("span",{key:"expand__expand-icon-number",class:c.join("esri-expand__icon-number","esri-expand__icon-number--expanded")},e):null;returnc.tsx("div",{class:"esri-expand esri-widget"},c.tsx("div",{bind:this,onclick:this._toggle,class:"esri-expand__mask",classes:h}),c.tsx("div",{class:"esri-expand__container",classes:f},c.tsx("div",{class:"esri-expand__panel"},c.tsx("div",{bind:this,onclick:this._toggle,onkeydown:this._toggle,"aria-label":b,title:b,role:"button",tabindex:"0",class:"esri-widget-button"},k,c.tsx("span",{"aria-hidden":"true",class:"esri-collapse__icon",classes:d}),c.tsx("span",{class:"esri-icon-font-fallback-text"},b)),a),c.tsx("div",{class:"esri-expand__content",classes:g,bind:this},this._renderContent())));varf,g,h,k};b.prototype._toggle=function(){this.toggle()};b.prototype._renderContent=function(){vara=this.content;return"string"===typeofa?c.tsx("div",{innerHTML:a}):a&&a.isInstanceOf&&a.isInstanceOf(l)?a.render():ainstanceofHTMLElement?c.tsx("div",{bind:a,afterCreate:this._attachToNode}):a&&"function"===typeofa.postMixInProperties&&"function"===typeofa.buildRendering&&"function"===typeofa.postCreate&&"function"===typeofa.startup?c.tsx("div",{bind:a.domNode,afterCreate:this._attachToNode}):null};b.prototype._attachToNode=function(a){a.appendChild(this)};d([e.aliasOf("viewModel.autoCollapse")],b.prototype,"autoCollapse",void0);d([e.property(),c.renderable()],b.prototype,"collapseIconClass",void0);d([e.property(),c.renderable()],b.prototype,"collapseTooltip",void0);d([e.property(),c.renderable()],b.prototype,"content",void0);d([e.aliasOf("viewModel.expanded"),c.renderable()],b.prototype,"expanded",void0);d([e.property(),c.renderable()],b.prototype,"expandIconClass",void0);d([e.property(),c.renderable()],b.prototype,"expandTooltip",void0);d([e.aliasOf("viewModel.group")],b.prototype,"group",void0);d([e.property(),c.renderable()],b.prototype,"iconNumber",void0);d([e.aliasOf("viewModel.view"),c.renderable()],b.prototype,"view",void0);d([e.property({type:n}),c.renderable("viewModel.state")],b.prototype,"viewModel",void0);d([c.accessibleHandler()],b.prototype,"_toggle",null);returnb=d([e.subclass("esri.widgets.Expand")],b)}(e.declared(l))});