/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e,subclass as n}from"../../core/accessorSupport/decorators.js";import s from"../../geometry/Point.js";import i from"./ControlPoint.js";import{reader as p}from"../../core/accessorSupport/decorators/reader.js";import{writer as l}from"../../core/accessorSupport/decorators/writer.js";function m(o){return null!=o?.sourcePoint&&null!=o.mapPoint}let c=class extends(r(t)){constructor(o){super(o),this.frame=null,this.controlPoints=null}readControlPoints(o){return o.map(o=>({sourcePoint:{x:o.frameX,y:o.frameY},mapPoint:new s(o.point)}))}writeControlPoints(o,r){null!=o&&m(o[0])&&(r.controlPoints=o.map(o=>{const r=o.sourcePoint,t=o.mapPoint;return{frameX:r.x,frameY:r.y,point:t.toJSON()}}))}};o([e({type:String})],c.prototype,"frame",void 0),o([e({type:[i],json:{write:{allowNull:!1,isRequired:!0}}})],c.prototype,"controlPoints",void 0),o([p("controlPoints")],c.prototype,"readControlPoints",null),o([l("controlPoints")],c.prototype,"writeControlPoints",null),c=o([n("esri.layers.support.VideoFrame")],c);const a=c;export{a as default};
