/*
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","../../../../intl","../../../../core/maybe","../../../../core/quantityFormatUtils","../../../../core/unitUtils","../../../../core/accessorSupport/decorators/property","../../../../core/arrayUtils","../../../../core/has","../../../../core/accessorSupport/ensureType","../../../../core/accessorSupport/decorators/subclass","../../../../widgets/Widget","../../../../widgets/support/widgetUtils","../../../../widgets/support/decorators/messageBundle","../../../../intl/number"],(function(t,e,o,r,i,n,s,a,l,u,c,p,m,g,_,h){"use strict";t.TooltipContent=function(t){function o(){var e;return(e=t.apply(this,arguments)||this)._messagesUnits=null,e._messagesTooltip=null,e}e._inheritsLoose(o,t);var r=o.prototype;return r._formatScale=function(t){return h.formatNumber(t,{style:"percent",maximumFractionDigits:0})},r._formatRelativeOrientation=function(t){return h.formatNumber(t,{maximumFractionDigits:2,minimumFractionDigits:2,signDisplay:"exceptZero"})},r._formatLength=function(t,e,o){return n.formatLength(this._messagesUnits,t,i.unwrapOr(e,this._units.length),o)},r._formatRelativeLength=function(t){return n.formatRelativeLength(this._messagesUnits,t,this._units.length)},r._formatVerticalLength=function(t){return n.formatVerticalLength(this._messagesUnits,t,this._units.verticalLength)},r._formatRelativeVerticalLength=function(t){return n.formatRelativeVerticalLength(this._messagesUnits,t,this._units.verticalLength)},r._formatTotalLength=function(t){return n.formatLength(this._messagesUnits,t,this._units.length)},r._formatArea=function(t){return n.formatArea(this._messagesUnits,t,this._units.area)},r._formatPercentage=function(t){return h.formatNumber(t.value,{style:"percent"})},e._createClass(o,[{key:"_units",get:function(){const t=s.getDefaultUnitForView(this.tooltip.view);return{length:t,verticalLength:t,area:t}}}]),o}(m),o.__decorate([a.property()],t.TooltipContent.prototype,"info",void 0),o.__decorate([a.property()],t.TooltipContent.prototype,"tooltip",void 0),o.__decorate([a.property()],t.TooltipContent.prototype,"_units",null),o.__decorate([_.messageBundle("esri/core/t9n/Units"),a.property()],t.TooltipContent.prototype,"_messagesUnits",void 0),o.__decorate([_.messageBundle("esri/views/interactive/tooltip/t9n/Tooltip"),a.property()],t.TooltipContent.prototype,"_messagesTooltip",void 0),t.TooltipContent=o.__decorate([p.subclass("esri.views.interactive.tooltip.content.TooltipContent")],t.TooltipContent),Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
