/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{JSONMap as e}from"../../core/jsonMap.js";import{excludeTables as r}from"../../core/accessorSupport/layerContainerType.js";import n from"../../geometry/Extent.js";import i from"../../geometry/SpatialReference.js";import{w as a}from"../../chunks/persistableUrlUtils.js";import o from"../../symbols/support/ElevationInfo.js";import t from"../../tables/AttributeTableTemplate.js";import{transparencyToOpacity as s}from"../../webdoc/support/opacityUtils.js";const l={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:{enabled:!0,layerContainerTypes:r}}},p={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,r)=>!r.disablePopup},write:{enabled:!0,writer(e,r,n){r[n]=!e}}}},y={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:{enabled:!0,layerContainerTypes:r}}},d={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:a}}},m={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:{enabled:!0,layerContainerTypes:r}}},c={value:null,type:o,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:{enabled:!0,layerContainerTypes:r}}};function w(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const f={write:{enabled:!0,layerContainerTypes:r},read:!0},g={type:Number,json:{origins:{"web-document":f,"portal-item":{write:{layerContainerTypes:r}}}}},u={...g,json:{...g.json,origins:{"web-document":{...f,write:{enabled:!0,layerContainerTypes:r,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,r,n)=>n&&"service"!==n.origin||!r.drawingInfo||void 0===r.drawingInfo.transparency?r.layerDefinition?.drawingInfo&&void 0!==r.layerDefinition.drawingInfo.transparency?s(r.layerDefinition.drawingInfo.transparency):void 0:s(r.drawingInfo.transparency)}}},b={type:n,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,r)=>{const a=n.fromJSON(e);return null!=r.spatialReference&&"object"==typeof r.spatialReference&&(a.spatialReference=i.fromJSON(r.spatialReference)),a}}}},read:!1}},j={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},v={type:Number,json:{origins:{service:{write:{enabled:!1}}},name:"layerDefinition.minScale",write:{layerContainerTypes:r}}},T={type:Number,json:{origins:{service:{write:{enabled:!1}}},name:"layerDefinition.maxScale",write:{layerContainerTypes:r}}},I={json:{write:{ignoreOrigin:!0,layerContainerTypes:r},origins:{"web-map":{read:!1,write:!1}}}},C={type:t,json:{name:"attributeTableInfo",write:!0}},N=new e({High:"high",Medium:"medium",Low:"low",None:"none"}),h={type:N.apiValues,json:{name:"layerDefinition.barrierWeight",default:"high",read:N.read,write:N.write,origins:{service:{read:!1}}}};export{C as attributeTableTemplate,h as barrierWeight,c as elevationInfo,j as id,y as labelsVisible,m as legendEnabled,I as listMode,T as maxScale,v as minScale,g as opacity,u as opacityDrawingInfo,p as popupEnabled,w as readOnlyService,b as sceneLayerFullExtent,l as screenSizePerspectiveEnabled,d as url};
