/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as e}from"tslib";import t from"../Color.js";import{JSONMap as r}from"../core/jsonMap.js";import{clone as o}from"../core/lang.js";import{toPt as s}from"../core/screenUtils.js";import{property as i,subclass as l}from"../core/accessorSupport/decorators.js";import p from"./MarkerSymbol.js";import n from"./SimpleLineSymbol.js";import{writer as a}from"../core/accessorSupport/decorators/writer.js";import{enumeration as h}from"../core/accessorSupport/decorators/enumeration.js";var c;const m=new r({esriSMSCircle:"circle",esriSMSSquare:"square",esriSMSCross:"cross",esriSMSX:"x",esriSMSDiamond:"diamond",esriSMSTriangle:"triangle",esriSMSPath:"path"});let u=c=class extends p{constructor(...e){super(...e),this.color=new t([255,255,255,.25]),this.type="simple-marker",this.style="circle",this.outline=new n}normalizeCtorArgs(e,t,r,o){if(e&&"string"!=typeof e)return e;const i={};return e&&(i.style=e),null!=t&&(i.size=s(t)),r&&(i.outline=r),o&&(i.color=o),i}writeColor(e,t){e&&"x"!==this.style&&"cross"!==this.style&&(t.color=e.toJSON()),null===e&&(t.color=null)}get size(){return this._get("size")??12}set size(e){this._set("size",e)}set path(e){this.style="path",this._set("path",e)}clone(){return new c({angle:this.angle,color:o(this.color),outline:this.outline&&this.outline.clone(),path:this.path,size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${super.hash()}.${this.color&&this.color.hash()}.${this.path}.${this.style}.${this.outline?.hash()}`}};e([i({type:t})],u.prototype,"color",void 0),e([a("color")],u.prototype,"writeColor",null),e([h({esriSMS:"simple-marker"},{readOnly:!0})],u.prototype,"type",void 0),e([i()],u.prototype,"size",null),e([i({type:m.apiValues,json:{read:m.read,write:m.write}})],u.prototype,"style",void 0),e([i({type:String,json:{write:!0}})],u.prototype,"path",null),e([i({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":n}},json:{default:null,write:!0}})],u.prototype,"outline",void 0),u=c=e([l("esri.symbols.SimpleMarkerSymbol")],u);export{u as default};
