// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("../../chunks/tslib.es6 ../../core/deprecate ../../core/Logger ../../core/reactiveUtils ../../core/uid ../../core/accessorSupport/decorators/property ../../core/has ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./featureFormUtils ./InputBase".split(" "),function(d,f,g,h,l,e,b,q,m,n,p){b=class extends p{constructor(a){super(a);this._expressionTrackingHandles=new Map;this.id=l.generateUID().toString();this.type="group"}initialize(){this.addHandles([h.watch(()=>[this.visible, this.inputs],([a])=>{const {inputs:c}=this;a=a?void 0:!1;for(const k of c)n.isFieldInput(k)&&(k.required=a)},{initial:!0,equals:(a,c)=>c[0]===a[0]&&c[1]===a[1]})])}destroy(){for(const a of this._expressionTrackingHandles.values())a.remove()}get initialState(){return this.element.initialState||"expanded"}get inputs(){return this._get("inputs")}set inputs(a){this.removeAllHandles();a&&this.addHandles(a.map(c=>h.watch(()=>c.visible,()=>this._dirtyEvaluatedVisibilityExpression())));this._set("inputs", a)}get label(){return this.element.label}set label(a){const {element:c}=this;c&&(c.label=a)}get open(){return"expanded"===this.initialState}set open(a){this._override("open",a)}get state(){f.deprecatedProperty(g.getLogger(this),"state",{replacement:"open",version:"4.28",warnOnce:!0});return this.open?"expanded":"collapsed"}set state(a){f.deprecatedProperty(g.getLogger(this),"state",{replacement:"open",version:"4.28",warnOnce:!0});this.open="expanded"===a}get visible(){return!1!==this.evaluatedVisibilityExpression&& this.inputs&&this.inputs.some(a=>a.visible)}_dirtyEvaluatedVisibilityExpression(){const {element:a}=this;a.visibilityExpression&&this.notifyChange("evaluatedVisibilityExpression")}};d.__decorate([e.property()],b.prototype,"id",void 0);d.__decorate([e.property()],b.prototype,"initialState",null);d.__decorate([e.property()],b.prototype,"inputs",null);d.__decorate([e.property()],b.prototype,"label",null);d.__decorate([e.property()],b.prototype,"open",null);d.__decorate([e.property()],b.prototype,"type", void 0);d.__decorate([e.property()],b.prototype,"visible",null);return b=d.__decorate([m.subclass("esri.widgets.FeatureForm.GroupInput")],b)});