/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as t}from"tslib";import o from"../Color.js";import e from"../core/Collection.js";import{clone as r}from"../core/lang.js";import{property as s,subclass as l}from"../core/accessorSupport/decorators.js";import i from"./IconSymbol3DLayer.js";import m from"./ObjectSymbol3DLayer.js";import a from"./Symbol3D.js";import y from"./TextSymbol3DLayer.js";import{hasVisibleCallout as n,hasVisibleVerticalOffset as c,calloutProperty as p}from"./callouts/calloutUtils.js";import f from"./callouts/LineCallout3D.js";import b from"./support/Symbol3DVerticalOffset.js";import{enumeration as u}from"../core/accessorSupport/decorators/enumeration.js";var h;const S=e.ofType({base:null,key:"type",typeMap:{icon:i,object:m,text:y}});let w=h=class extends a{constructor(t){super(t),this.verticalOffset=null,this.callout=null,this.symbolLayers=new S,this.type="point-3d"}supportsCallout(){if((this.symbolLayers?this.symbolLayers.length:0)<1)return!1;for(const t of this.symbolLayers.items)switch(t.type){case"icon":case"text":case"object":continue;default:return!1}return!0}hasVisibleCallout(){return n(this)}hasVisibleVerticalOffset(){return c(this)}clone(){return new h({verticalOffset:r(this.verticalOffset),callout:r(this.callout),styleOrigin:r(this.styleOrigin),symbolLayers:r(this.symbolLayers),thumbnail:r(this.thumbnail)})}static fromSimpleMarkerSymbol(t){return new h({symbolLayers:new e([i.fromSimpleMarkerSymbol(t)])})}static fromPictureMarkerSymbol(t){return new h({symbolLayers:new e([i.fromPictureMarkerSymbol(t)])})}static fromCIMSymbol(t){const r=t.data?.symbol?.type;if("CIMPointSymbol"!==r)return null;const s=t.data.symbol;return new h(s?.callout?{symbolLayers:new e([i.fromCIMSymbol(t)]),callout:new f({size:.5,color:new o([0,0,0])}),verticalOffset:new b({screenLength:40})}:{symbolLayers:new e([i.fromCIMSymbol(t)])})}static fromTextSymbol(t){return new h({symbolLayers:new e([y.fromTextSymbol(t)])})}};t([s({type:b,json:{write:!0}})],w.prototype,"verticalOffset",void 0),t([s(p)],w.prototype,"callout",void 0),t([s({type:S,json:{origins:{"web-scene":{write:!0}}}})],w.prototype,"symbolLayers",void 0),t([u({PointSymbol3D:"point-3d"},{readOnly:!0})],w.prototype,"type",void 0),w=h=t([l("esri.symbols.PointSymbol3D")],w);export{w as default};
