import{a5 as V,b as E,r as c,o as $,y as T,q as a,v as x,p as n,P as d,x as m,n as _,s as B,cp as D,cq as q,l as M,bv as N,D as P}from"./index.8d733f79.js";const S={class:"dialog-footer"},I=V({name:"PeakSpectralLine"}),z=Object.assign(I,{emits:["peakValEmit"],setup(L,{expose:b,emit:k}){const{t:w}=E(),{proxy:i}=P(),l=c(!1),u=c([]),t=c();let o;function v(e){e!=null&&e.length&&(u.value=e||[]),l.value=!0,t.value?o=t.value:o=null}function g(e){console.log("table--row--click",e),o=e}function C(){if(!o){i.$modal.msgError(w("selectP"));return}t.value=o,k("peakValEmit",t.value),s()}function s(){i.$refs.peakTableRef.setCurrentRow(t.value),l.value=!1}return b({showModal:v}),(e,r)=>{const p=D,h=q,f=M,y=N;return $(),T(y,{title:e.$t("peakTable"),modelValue:_(l),"onUpdate:modelValue":r[0]||(r[0]=R=>B(l)?l.value=R:null),width:"600px","align-center":!0,onClose:s},{footer:a(()=>[x("div",S,[n(f,{onClick:s},{default:a(()=>[d(m(e.$t("cancel")),1)]),_:1}),n(f,{type:"primary",onClick:C},{default:a(()=>[d(m(e.$t("confirm")),1)]),_:1})])]),default:a(()=>[n(h,{ref:"peakTableRef",data:_(u),onRowClick:g,"row-key":"x","highlight-current-row":"",style:{"z-index":"999"}},{default:a(()=>[n(p,{label:e.$t("frequency"),prop:"x"},null,8,["label"]),n(p,{label:e.$t("amplitude"),prop:"y","show-overflow-tooltip":""},null,8,["label"])]),_:1},8,["data"])]),_:1},8,["title","modelValue"])}}});export{z as default};
