/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as t}from"tslib";import e from"./Camera.js";import{JSONSupport as r}from"./core/JSONSupport.js";import{property as o,cast as i,subclass as s}from"./core/accessorSupport/decorators.js";import{fromJSON as a}from"./geometry/support/jsonUtils.js";import{geometryTypes as n}from"./geometry/support/typeUtils.js";var p;let l=p=class extends r{constructor(t){super(t),this.rotation=0,this.scale=0,this.targetGeometry=null,this.camera=null}castRotation(t){return(t%=360)<0&&(t+=360),t}clone(){return new p({rotation:this.rotation,scale:this.scale,targetGeometry:null!=this.targetGeometry?this.targetGeometry.clone():null,camera:null!=this.camera?this.camera.clone():null})}};t([o({type:Number,json:{write:!0,origins:{"web-map":{default:0,write:!0},"web-scene":{write:{overridePolicy:m}}}}})],l.prototype,"rotation",void 0),t([i("rotation")],l.prototype,"castRotation",null),t([o({type:Number,json:{write:!0,default:0}})],l.prototype,"scale",void 0),t([o({types:n,json:{read:a,write:!0,origins:{"web-scene":{read:a,write:{overridePolicy:m}}}}})],l.prototype,"targetGeometry",void 0),t([o({type:e,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}})],l.prototype,"camera",void 0),l=p=t([s("esri.Viewpoint")],l);const c=l;function m(){return{enabled:!this.camera}}export{c as default};
