/*
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{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 n}from"./patterns/utils.js";import{white as a}from"./support/colors.js";import{screenSizeProperty as p}from"./support/materialUtils.js";import{Symbol3DMaterial as m}from"./support/Symbol3DMaterial.js";import{lineJoins as c,lineCaps as y}from"./support/symbolLayerUtils3D.js";import{enumeration as u}from"../core/accessorSupport/decorators/enumeration.js";var j;let h=class extends s{static{j=this}constructor(t){super(t),this.material=null,this.type="line",this.join="miter",this.cap="butt",this.pattern=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,marker:null!=this.marker?this.marker.clone():null};return new j(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,material:new m({color:(t.color||a).clone()}),marker:t.marker?new i({placement:t.marker.placement,style:t.marker.style,color:t.marker.color?.clone()??null}):null};return new j(r)}};t([r({type:m,json:{write:!0}})],h.prototype,"material",void 0),t([u({Line:"line"},{readOnly:!0})],h.prototype,"type",void 0),t([r({type:c,json:{write:!0,default:"miter"}})],h.prototype,"join",void 0),t([r({type:y,json:{write:!0,default:"butt"}})],h.prototype,"cap",void 0),t([r({...p,json:{write:{isRequired:!0}}})],h.prototype,"size",null),t([r(n)],h.prototype,"pattern",void 0),t([r({types:{key:"type",base:i,typeMap:{style:i}},json:{write:!0}})],h.prototype,"marker",void 0),h=j=t([o("esri.symbols.LineSymbol3DLayer")],h);export{h as default};
