/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../core/accessorSupport/PropertyOrigin","./layerUtils"],(function(e,r,t){"use strict";const i=e=>"feature"===e.type&&!e.isTable,o={feature:{predicate:t.isFeatureServiceLayer,propertyGroups:[{id:"blend-mode",properties:["blendMode"],predicate:i},{id:"charts",properties:["charts"]},{id:"custom-parameters",properties:["customParameters"]},{id:"definition-expression",properties:["definitionExpression"]},{id:"effect",properties:["effect","featureEffect"],predicate:i},{id:"feature-reduction",properties:["featureReduction"],predicate:i},{id:"floor-info",properties:["floorInfo"],predicate:i},{id:"form-template",properties:["formTemplate"]},{id:"labels",properties:["labelingInfo","labelsVisible"],predicate:i},{id:"legend-enabled",properties:["legendEnabled"],predicate:i},{id:"opacity",properties:["opacity"],predicate:i},{id:"order-by",properties:["orderBy"],predicate:i},{id:"popup",properties:["popupTemplate","popupEnabled"]},{id:"refresh-interval",properties:["refreshInterval"]},{id:"renderer",properties:["renderer"],predicate:i},{id:"scale-range",properties:["minScale","maxScale"],predicate:i},{id:"use-view-time",properties:["useViewTime"]}]}};function p(e){return o[e.type].propertyGroups.filter((r=>!r.predicate||r.predicate(e)))}function n(e){const r=p(e),t=[];for(const i of r)t.push(...i.properties);return t}function d(e,r,t){return e.originIdOf(r)<t?"source":"overridden"}function s(e,t,i){const o=r.writableNameToId(i),{id:p,properties:n}=t,s=n.map((r=>d(e,r,o))).reduce(((e,r)=>e===r?e:"overridden"));return{id:p,properties:[...n],status:s}}function a(e,t,i){const o=r.writableNameToId(i);e.revert(t,r.idToReadableName(o-1))}function c(e,t,i){const o=r.writableNameToId(i),p=e,n=p.originIdOf(t);n<o&&n!==r.OriginId.COMPUTED&&p.updateOrigin(t,r.idToWritableName(o))}function u(e){const r=o[e.type];return!(!r||r.predicate&&!r.predicate(e))}function f(e,r){if(!u(e))return;const t=p(e).map((t=>s(e,t,r)));return{propertyGroupOriginInfos:t,status:t.map((e=>e.status)).reduce(((e,r)=>e===r?e:"mixed"))}}function l(e,r){if(!u(e))return;const t=n(e);for(const i of t)a(e,i,r)}function m(e,r){if(!u(e))return;const t=n(e);for(const i of t)c(e,i,r)}e.clearOverrides=l,e.disconnectFromSource=m,e.getLayerOriginInfo=f,e.isSupportedLayer=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
