/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass","../Widget","../support/decorators/accessibleHandler","../support/jsxFactory","../support/widgetUtils"],(function(t,e,s,i,o,r,n,c,a,l,p){"use strict";const d={button:"esri-widget--button esri-widget",disabled:"esri-disabled",interactive:"esri-interactive",iconText:"esri-icon-font-fallback-text",icon:"esri-icon"};let u=function(e){function s(){var t;return(t=e.apply(this,arguments)||this).enabled=!0,t.iconClass="",t.title="",t}t._inheritsLoose(s,e);var i=s.prototype;return i.render=function(){const t=this.enabled?0:-1,e={[d.disabled]:!this.enabled,[d.interactive]:this.enabled},s={[this.iconClass]:!!this.iconClass};return l.tsx("div",{bind:this,class:this.classes(d.button,e),onclick:this._triggerAction,onkeydown:this._triggerAction,role:"button",tabIndex:t,title:this.title},l.tsx("span",{"aria-hidden":"true",role:"presentation",class:this.classes(d.icon,s)}),l.tsx("span",{class:d.iconText},this.title))},i._triggerAction=function(){this.action.call(this)},s}(c);e.__decorate([s.property()],u.prototype,"action",void 0),e.__decorate([s.property()],u.prototype,"enabled",void 0),e.__decorate([s.property()],u.prototype,"iconClass",void 0),e.__decorate([s.property()],u.prototype,"title",void 0),e.__decorate([a.accessibleHandler()],u.prototype,"_triggerAction",null),u=e.__decorate([n.subclass("esri.widgets.IconButton")],u);return u}));
