// 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/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../Attachments ../Widget ./FeatureAttachments/FeatureAttachmentsViewModel ./support/FeatureElementInfo ../support/widgetUtils ../support/jsxFactory".split(" "),function(c,e,d,b,q,r,h,k,l,g,m,t,n){b=class extends l{constructor(a,f){super(a,f);this._featureElementInfo=null;this.attachmentsWidget=new k; this.headingLevel=2;this.viewModel=new g}initialize(){this._featureElementInfo=new m;this.addHandles([e.watch(()=>[this.viewModel?.description,this.viewModel?.title,this.headingLevel],()=>this._setupFeatureElementInfo(),e.initial),e.watch(()=>this.viewModel,a=>this.attachmentsWidget.viewModel=a,e.initial)])}destroy(){this.attachmentsWidget.viewModel=null;this.attachmentsWidget.destroy();this._featureElementInfo?.destroy()}get description(){return this.viewModel.description}set description(a){this.viewModel.description= a}get displayType(){return this.attachmentsWidget.displayType}set displayType(a){this.attachmentsWidget.displayType=a}get graphic(){return this.viewModel.graphic}set graphic(a){this.viewModel.graphic=a}get title(){return this.viewModel.title}set title(a){this.viewModel.title=a}render(){const {attachmentsWidget:a}=this;return n.tsx("div",{class:"esri-feature-attachments"},this._featureElementInfo?.render(),a?.render())}_setupFeatureElementInfo(){const {description:a,title:f,headingLevel:p}=this;this._featureElementInfo?.set({description:a, title:f,headingLevel:p})}};c.__decorate([d.property({readOnly:!0})],b.prototype,"attachmentsWidget",void 0);c.__decorate([d.property()],b.prototype,"description",null);c.__decorate([d.property()],b.prototype,"displayType",null);c.__decorate([d.property()],b.prototype,"graphic",null);c.__decorate([d.property()],b.prototype,"headingLevel",void 0);c.__decorate([d.property()],b.prototype,"title",null);c.__decorate([d.property({type:g})],b.prototype,"viewModel",void 0);return b=c.__decorate([h.subclass("esri.widgets.Feature.FeatureAttachments")], b)});