"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[7302],{87302(g,E,r){r.d(E,{GroupingToMatrixTransformerEditor:()=>c});var e=r(74848),u=r(96540),s=r(52358),d=r(72396),n=r(72480),v=r(6634),o=r(87748),m=r(75251);const c=({input:f,options:l,onChange:t})=>{const _=(0,m.ZI)(f).map(a=>({label:a,value:a})),i=(0,d.w)().getVariables().map(a=>({value:"$"+a.name,label:"$"+a.name})),C=(0,u.useCallback)(a=>{t({...l,columnField:a?.value})},[t,l]),b=(0,u.useCallback)(a=>{t({...l,rowField:a?.value})},[t,l]),M=(0,u.useCallback)(a=>{t({...l,valueField:a?.value})},[t,l]),x=(0,u.useCallback)(a=>{t({...l,emptyValue:a?.value})},[t,l]);return(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(v.C,{children:[(0,e.jsx)(n.I,{label:(0,s.t)("transformers.grouping-to-matrix-transformer-editor.label-column","Column"),labelWidth:8,children:(0,e.jsx)(o.l6,{options:[..._,...i],value:l.columnField,onChange:C,isClearable:!0})}),(0,e.jsx)(n.I,{label:(0,s.t)("transformers.grouping-to-matrix-transformer-editor.label-row","Row"),labelWidth:8,children:(0,e.jsx)(o.l6,{options:[..._,...i],value:l.rowField,onChange:b,isClearable:!0})}),(0,e.jsx)(n.I,{label:(0,s.t)("transformers.grouping-to-matrix-transformer-editor.label-cell-value","Cell value"),labelWidth:10,children:(0,e.jsx)(o.l6,{options:[..._,...i],value:l.valueField,onChange:M,isClearable:!0})}),(0,e.jsx)(n.I,{label:(0,s.t)("transformers.grouping-to-matrix-transformer-editor.label-empty-value","Empty value"),children:(0,e.jsx)(o.l6,{options:(0,m.wS)(),value:l.emptyValue,onChange:x,isClearable:!0})})]})})}}}]);

//# sourceMappingURL=7302.3d3e36596dcb27fff627.js.map