/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as o}from"tslib";import{clone as t}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(o){this._set("convolutionType",o);const t=n.get(o);if(!t||o===i.userDefined||o===i.none)return;const e=Math.round(Math.sqrt(t.length));this._set("kernel",t),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:t(this.raster)})}};o([e({json:{type:Number,write:!0}})],l.prototype,"rows",void 0),o([e({json:{type:Number,write:!0,name:"columns"}})],l.prototype,"cols",void 0),o([e({json:{name:"type",type:Number,write:!0}})],l.prototype,"convolutionType",null),o([e({json:{type:[Number],write:!0}})],l.prototype,"kernel",void 0),l=p=o([s("esri.layers.raster.functions.ConvolutionFunctionArguments")],l);const c=l;export{c as default};
