/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as t}from"tslib";import{clone as o}from"../../../core/lang.js";import{property as e,subclass as s}from"../../../core/accessorSupport/decorators.js";import r from"./BaseFunctionArguments.js";import{convolutionKernels as n}from"./convolutionUtils.js";import{convolutionKernel as i}from"../../support/rasterFunctionConstants.js";var p;let l=p=class extends r{constructor(){super(...arguments),this.rows=3,this.cols=3,this.kernel=[0,0,0,0,1,0,0,0,0]}set convolutionType(t){this._set("convolutionType",t);const o=n.get(t);if(!o||t===i.userDefined||t===i.none)return;const e=Math.sqrt(o.length);this._set("kernel",o),this._set("cols",e),this._set("rows",e)}clone(){return new p({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:o(this.raster)})}};t([e({json:{type:Number,write:!0}})],l.prototype,"rows",void 0),t([e({json:{type:Number,write:!0}})],l.prototype,"cols",void 0),t([e({json:{name:"type",type:Number,write:!0}})],l.prototype,"convolutionType",null),t([e({json:{type:[Number],write:!0}})],l.prototype,"kernel",void 0),l=p=t([s("esri.layers.raster.functions.ConvolutionFunctionArguments")],l);const c=l;export{c as default};
