import{j as e,F as d}from"./index-b983ad9b.js";import{r as f,R as m}from"./react-b0e0d18a.js";import{d as l}from"./KB-757eebe4.js";import"./antd-8ca2e36c.js";const p="_suggestions_1gtl1_1",h={suggestions:p};function g({suggestion:s}){if(typeof s=="object"){const o=[];return Object.keys(s).forEach(t=>{o.push(e("dt",{children:t},`${t}-dt`),e("dd",{children:e(g,{suggestion:s[t]})},`${t}-dd`))}),e("dl",{children:o})}return s}function x({event:s,noSplit:o}){const[t,a]=f.useState();return m.useEffect(()=>{if(!s||!s.id)return;let n=!0;return(async()=>{const r={};for(let i of s.measurements||[]){const[,c]=i.split("."),u=await l(o?i:c);u&&(r[c]=u)}n&&a(r)})(),()=>{n=!1}},[s]),t&&Object.keys(t).length?e("div",{className:h.suggestions,children:Object.keys(t).map(n=>e(g,{suggestion:t[n]},n))}):e(d,{children:"暂无"})}export{x as default};
