/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as t}from"tslib";import{px2pt as e}from"../core/screenUtils.js";import{property as r,subclass as o}from"../core/accessorSupport/decorators.js";import i from"./LineStyleMarker3D.js";import s from"./Symbol3DLayer.js";import l from"./patterns/LineStylePattern3D.js";import{symbol3dLinePatternProperty as a}from"./patterns/utils.js";import{white as n}from"./support/colors.js";import{screenSizeProperty as p}from"./support/materialUtils.js";import m from"./support/Symbol3DMaterial.js";import{lineJoins as c,lineCaps as u}from"./support/symbolLayerUtils3D.js";import{enumeration as y}from"../core/accessorSupport/decorators/enumeration.js";var h;let j=class extends s{static{h=this}constructor(t){super(t),this.material=null,this.type="line",this.join="miter",this.cap="butt",this.pattern=null,this.imagePattern=null,this.marker=null}get size(){return this._get("size")??e(1)}set size(t){this._set("size",t)}clone(){const t={enabled:this.enabled,material:null!=this.material?this.material.clone():null,size:this.size,join:this.join,cap:this.cap,pattern:null!=this.pattern?this.pattern.clone():null,imagePattern:null!=this.imagePattern?this.imagePattern.clone():null,marker:null!=this.marker?this.marker.clone():null};return new h(t)}static fromSimpleLineSymbol(t){const r={enabled:!0,size:t.width??e(1),cap:t.cap||"butt",join:t.join||"miter",pattern:t.style?new l({style:t.style}):null,imagePattern:null,material:new m({color:(t.color||n).clone()}),marker:t.marker?new i({placement:t.marker.placement,style:t.marker.style,color:t.marker.color?.clone()??null}):null};return new h(r)}};t([r({type:m,json:{write:!0}})],j.prototype,"material",void 0),t([y({Line:"line"},{readOnly:!0})],j.prototype,"type",void 0),t([r({type:c,json:{write:!0,default:"miter"}})],j.prototype,"join",void 0),t([r({type:u,json:{write:!0,default:"butt"}})],j.prototype,"cap",void 0),t([r({...p,json:{write:{isRequired:!0}}})],j.prototype,"size",null),t([r(a)],j.prototype,"pattern",void 0),t([r()],j.prototype,"imagePattern",void 0),t([r({types:{key:"type",base:i,typeMap:{style:i}},json:{write:!0}})],j.prototype,"marker",void 0),j=h=t([o("esri.symbols.LineSymbol3DLayer")],j);export{j as default};
