/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../TimeExtent","../../geometry/Extent","../../geometry/SpatialReference","../../chunks/persistableUrlUtils","../../support/timeUtils","../../symbols/support/ElevationInfo","../../webdoc/support/opacityUtils"],(function(e,i,n,r,t,a,o,s){"use strict";const l={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:!0}},c={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,i)=>!i.disablePopup},write:{enabled:!0,writer(e,i,n){i[n]=!e}}}},p={type:Boolean,value:!0,json:{name:"showLabels",write:!0}},d={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:t.write}}},y={type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:!0}},u={value:null,type:o.default,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:!0}};function f(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const m={type:Number,json:{origins:{"web-document":{write:!0,read:!0},"portal-item":{write:!0}}}},w={...m,json:{...m.json,origins:{"web-document":{...m.json.origins["web-document"],write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,i,n)=>n&&"service"!==n.origin||!i.drawingInfo||void 0===i.drawingInfo.transparency?i.layerDefinition&&i.layerDefinition.drawingInfo&&void 0!==i.layerDefinition.drawingInfo.transparency?s.transparencyToOpacity(i.layerDefinition.drawingInfo.transparency):void 0:s.transparencyToOpacity(i.drawingInfo.transparency)}}},g={type:i,readOnly:!0,get(){var e,i;if(null==(e=this.layer)||!e.timeInfo)return null;const{datesInUnknownTimezone:n,timeOffset:r,useViewTime:t}=this.layer,o=null==(i=this.view)?void 0:i.timeExtent;let s=this.layer.timeExtent;n&&(s=a.toLocalTimeExtent(s));let l=t?o&&s?o.intersection(s):o||s:s;if(!l||l.isEmpty||l.isAllTime)return l;r&&(l=l.offset(-r.value,r.unit)),n&&(l=a.toUTCTimeExtent(l));const c=this._get("timeExtent");return l.equals(c)?c:l}},b={type:n,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,i)=>{const t=n.fromJSON(e);return null!=i.spatialReference&&"object"==typeof i.spatialReference&&(t.spatialReference=r.fromJSON(i.spatialReference)),t}}}},read:!1}},v={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},j={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}},I={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}},S={json:{write:{ignoreOrigin:!0},origins:{"web-map":{read:!1,write:!1}}}};e.combinedViewLayerTimeExtentProperty=g,e.elevationInfo=u,e.id=v,e.labelsVisible=p,e.legendEnabled=y,e.listMode=S,e.maxScale=I,e.minScale=j,e.opacity=m,e.opacityDrawingInfo=w,e.popupEnabled=c,e.readOnlyService=f,e.sceneLayerFullExtent=b,e.screenSizePerspectiveEnabled=l,e.url=d,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
