const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RxMUSm29.js","./BOMWTB7S.js","./Dk4AzF7j.js","./entry.CN1Tt2no.css","./D7D5X_-3.js","./BnFHREeV.js"])))=>i.map(i=>d[i]);
import{d,v,i as S,P as y,j as b,c as k,o as $,w as i,a,s as h,m as n,q as w,ab as K,A as O,ac as P}from"./Dk4AzF7j.js";import{_ as T}from"./B_jJHUd2.js";import{d as z,s as A}from"./CJbRX-Xv.js";const B=K(()=>P(()=>import("./RxMUSm29.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url).then(s=>s.default||s)),C=d({__name:"MetricSettingsTrigger",props:{metricKey:{},label:{default:"Settings"},title:{default:"Open metric settings"}},emits:["saveSettings"],setup(s,{emit:r}){const c=r,l=s,t=v(!1);z({[A.settings]:()=>t.value=!t.value}),S().query.settings&&(t.value=!0);const m=()=>{t.value=!1,c("saveSettings")},{tracker:_}=y();return b(t,e=>{e&&_("metric_settings_trigger","click",`Open metric settings for ${l.metricKey}`)}),(e,o)=>{const u=h,p=B,g=T;return $(),k(g,{open:n(t),"onUpdate:open":o[0]||(o[0]=f=>O(t)?t.value=f:null),arrow:"",content:{align:"start",side:"bottom"}},{content:i(()=>[a(p,{"setting-type":e.metricKey,onSaveSettings:m},null,8,["setting-type"])]),default:i(()=>[a(u,{variant:n(t)?"solid":"subtle",color:"neutral",title:e.$t(e.title),label:e.$t(e.label),size:"sm",icon:n(w).icoSettings},null,8,["variant","title","label","icon"])]),_:1},8,["open"])}}}),q=Object.assign(C,{__name:"MetricSettingsTrigger"});export{q as _};
