/*
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/Accessor","../../../core/maybe","../../../core/accessorSupport/decorators/property","../../../core/arrayUtils","../../../core/has","../../../core/accessorSupport/ensureType","../../../core/accessorSupport/decorators/subclass","../../../properties/defaultUnit","./AnalysisView3D","./interfaces","./DirectLineMeasurement/DirectLineMeasurementController","./DirectLineMeasurement/DirectLineMeasurementVisualization"],(function(e,t,i,a,n,r,o,l,s,u,y,p,c,d){"use strict";let _=function(t){function i(e){var i;return(i=t.call(this,e)||this).type="direct-line-measurement-view-3d",i.analysis=null,i.result=null,i.measurementMode=p.MeasurementMode.Auto,i.elevationAlignedStartPoint=null,i.elevationAlignedEndPoint=null,i}e._inheritsLoose(i,t);var n=i.prototype;return n.initialize=function(){const e=this.view,t=this.analysis;this._analysisVisualization=new d.DirectLineMeasurementVisualization({view:e,analysis:t,analysisView:this}),this._analysisController=new c.DirectLineMeasurementController({view:e,analysis:t,viewData:this})},n.destroy=function(){this._analysisController=a.destroyMaybe(this._analysisController),this._analysisVisualization=a.destroyMaybe(this._analysisVisualization)},e._createClass(i,[{key:"updating",get:function(){var e;return!(null==(e=this._analysisVisualization)||!e.loadingMessages)}},{key:"viewMode",get:function(){return this._analysisVisualization.viewMode}},{key:"actualVisualizedMeasurement",get:function(){return this._analysisVisualization.actualVisualizedMeasurement}},{key:"visualElementOrientation",get:function(){return this._analysisVisualization.visualElementOrientation},set:function(e){this._analysisVisualization.visualElementOrientation=e}},{key:"allowVisualElementsOrientationChange",get:function(){return this._analysisVisualization.allowVisualElementsOrientationChange},set:function(e){this._analysisVisualization.allowVisualElementsOrientationChange=e}},{key:"triangleCollapseRatioThreshold",get:function(){return this._analysisVisualization.triangleCollapseRatioThreshold},set:function(e){this._analysisVisualization.triangleCollapseRatioThreshold=e}},{key:"directLabelText",get:function(){return this._analysisVisualization.labels.direct.text}},{key:"horizontalLabelText",get:function(){return this._analysisVisualization.labels.horizontal.text}},{key:"verticalLabelText",get:function(){return this._analysisVisualization.labels.vertical.text}},{key:"unit",get:function(){return a.unwrapOr(this.analysis.unit,this._defaultUnit)}},{key:"testData",get:function(){var e;return this.destroyed?{labels:null,stripeLength:null,visualization:null,controller:null}:{...null==(e=this._analysisVisualization)?void 0:e.testData,visualization:this._analysisVisualization,controller:this._analysisController}}}]),i}(y.AnalysisView3D(i));t.__decorate([n.property()],_.prototype,"updating",null),t.__decorate([n.property({readOnly:!0})],_.prototype,"type",void 0),t.__decorate([n.property({constructOnly:!0,nonNullable:!0})],_.prototype,"analysis",void 0),t.__decorate([n.property()],_.prototype,"result",void 0),t.__decorate([n.property()],_.prototype,"measurementMode",void 0),t.__decorate([n.property()],_.prototype,"elevationAlignedStartPoint",void 0),t.__decorate([n.property()],_.prototype,"elevationAlignedEndPoint",void 0),t.__decorate([n.property({readOnly:!0})],_.prototype,"viewMode",null),t.__decorate([n.property({readOnly:!0})],_.prototype,"actualVisualizedMeasurement",null),t.__decorate([n.property()],_.prototype,"visualElementOrientation",null),t.__decorate([n.property()],_.prototype,"allowVisualElementsOrientationChange",null),t.__decorate([n.property()],_.prototype,"triangleCollapseRatioThreshold",null),t.__decorate([n.property({readOnly:!0})],_.prototype,"directLabelText",null),t.__decorate([n.property({readOnly:!0})],_.prototype,"horizontalLabelText",null),t.__decorate([n.property({readOnly:!0})],_.prototype,"verticalLabelText",null),t.__decorate([n.property()],_.prototype,"_analysisVisualization",void 0),t.__decorate([n.property()],_.prototype,"_analysisController",void 0),t.__decorate([n.property()],_.prototype,"unit",null),t.__decorate([n.property(u.defaultUnitPropertyMetadata)],_.prototype,"_defaultUnit",void 0),_=t.__decorate([s.subclass("esri.views.3d.analysis.DirectLineMeasurementAnalysisView3D")],_);return _}));
