"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[53],{27214:(t,e,i)=>{i.r(e),i.d(e,{plugin:()=>m});var s=i(92394),n=i(78755),o=i(62709),a=i(2511),d=i(76687),r=i(31461),h=i(17292),p=i(71980),l=i(52010);function u(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class c extends d.Component{constructor(t){super(t),u(this,"element",void 0),u(this,"initElement",(t=>(this.element=new h.f(o.e,t.options.root),this.updateSize(t),this.element.updateData(this.dims),this.element))),u(this,"updateSize",(t=>{const{width:e,height:i}=t;this.element.options.constraint={vertical:r.fJ.Top,horizontal:r._5.Left},this.element.options.placement={left:0,top:0,width:e,height:i}})),u(this,"dims",{getColor:t=>(0,p.FP)(this.props.data,t),getScale:t=>(0,p.pb)(this.props.data,t),getScalar:t=>(0,p.z2)(this.props.data,t),getText:t=>(0,p.WO)(this.props.data,t),getResource:t=>(0,p.Qz)(this.props.data,t)}),this.element=this.initElement(t)}shouldComponentUpdate(t){var e,i;const{width:s,height:n,data:o}=this.props;let a=!1;return s===t.width&&n===t.height||(this.updateSize(t),a=!0),o!==t.data&&(this.element.updateData(this.dims),a=!0),(null===(e=this.props.options)||void 0===e?void 0:e.root)!==(null===(i=t.options)||void 0===i?void 0:i.root)&&(this.initElement(t),a=!0),a}render(){const{width:t,height:e}=this.props;return(0,l.jsx)("div",{style:{width:t,height:e,overflow:"hidden",position:"relative"},children:this.element.render()})}}const g={root:{config:{path:{mode:p.Q8.Fixed,fixed:"img/icons/unicons/analysis.svg"},fill:{fixed:"green"}}}},m=new s.c(c).setNoPadding().useFieldConfig({standardOptions:{[n.qb.Mappings]:{settings:{icon:!0}}}}).setPanelOptions((t=>{t.addNestedOptions({category:["Icon"],path:"root",build:(t,e)=>{o.e.registerOptionsUI(t,e),a.I.addBackground(t,e),a.I.addBorder(t,e)},defaultValue:g.root})}))}}]);
//# sourceMappingURL=iconPanel.2b4282f456e83cb29bc0.js.map