/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{pt2px as e}from"../../../../core/screenUtils.js";import{fromArray as n,fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isExtrudeSymbol3DLayer as o,isFillSymbol3DLayer as r}from"./layerUtils.js";function i(e){return e&&e.enabled&&(o(e)||r(e))&&null!=e.edges}function c(e){return e&&e.enabled&&e.edges||null}function s(e,n){return l(c(e),n)}function l(o,r){if(null==o)return null;const i=null!=o.color?n(o.color.toUnitRGBA()):t(0,0,0,0),c=e(o.size),s=e(o.extensionLength);switch(o.type){case"solid":return u({color:i,size:c,extensionLength:s,...r});case"sketch":return a({color:i,size:c,extensionLength:s,...r});default:return}}function u(e){return{...f,...e,type:0}}function a(e){return{...p,...e,type:1}}const f={color:t(0,0,0,.2),size:1,extensionLength:0,opacity:1,objectTransparency:1,hasSlicePlane:!1},p={color:t(0,0,0,.2),size:1,extensionLength:0,opacity:1,objectTransparency:1,hasSlicePlane:!1};export{s as createMaterial,l as createMaterialFromEdges,u as createSolidEdgeMaterial,i as hasEdges};
