/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../core/Error","../../core/JSONSupport","../../core/maybe","../../core/object","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass","../effects/jsonUtils","./FeatureFilter"],(function(e,r,t,l,i,o,s,c,u,n,a,d,f){"use strict";var p;const w={read:{reader:d.read},write:{writer:d.write,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},h={read:{reader:d.read},write:{writer:d.write,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},y={name:"showExcludedLabels",default:!0};let b=p=function(r){function l(e){var t;return(t=r.call(this,e)||this).filter=null,t.includedEffect=null,t.excludedEffect=null,t.excludedLabelsVisible=!1,t}e._inheritsLoose(l,r);var o=l.prototype;return o.write=function(e,l){const i=r.prototype.write.call(this,e,l);if(null!=l&&l.origin){if(i.filter){const e=Object.keys(i.filter);var o;if(e.length>1||"where"!==e[0])return null==(o=l.messages)||o.push(new t("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:l.layer,effect:this})),null}var s;if("showExcludedLabels"in i)return null==(s=l.messages)||s.push(new t("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:l.layer,effect:this})),null}return i},o.clone=function(){return new p({filter:i.isSome(this.filter)&&this.filter.clone(),includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})},l}(l.JSONSupport);r.__decorate([s.property({type:f,json:{write:{allowNull:!0,writer(e,r,t,l){const i=null==e?void 0:e.write({},l);i&&0!==Object.keys(i).length?o.setDeepValue(t,i,r):o.setDeepValue(t,null,r)}}}})],b.prototype,"filter",void 0),r.__decorate([s.property({json:{write:!0,origins:{"web-map":w,"portal-item":w}}})],b.prototype,"includedEffect",void 0),r.__decorate([s.property({json:{write:!0,origins:{"web-map":h,"portal-item":h}}})],b.prototype,"excludedEffect",void 0),r.__decorate([s.property({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":y,"portal-item":y}}})],b.prototype,"excludedLabelsVisible",void 0),b=p=r.__decorate([a.subclass("esri.layers.support.FeatureEffect")],b);return b}));
