const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BzN6GH2z.js","./CVosDfjh.js","./B2UyoCas.js","./entry.CFrJT2kr.css","./DeNTsafF.js","./C9KnTrrC.js"])))=>i.map(i=>d[i]);
import{d,r as v,k as S,N as y,l as b,c as k,b as $,w as a,q as i,v as h,u as n,s as w,a9 as K,A as O,aa as T}from"./B2UyoCas.js";import{_ as z}from"./DmViyvlQ.js";import{d as A,s as B}from"./BhXuhlb7.js";const C=K(()=>T(()=>import("./BzN6GH2z.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url).then(s=>s.default||s)),M=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);A({[B.settings]:()=>t.value=!t.value}),S().query.settings&&(t.value=!0);const m=()=>{t.value=!1,c("saveSettings")},{tracker:u}=y();return b(t,e=>{e&&u("metric_settings_trigger","click",`Open metric settings for ${l.metricKey}`)}),(e,o)=>{const _=h,p=C,g=z;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:a(()=>[i(p,{"setting-type":e.metricKey,onSaveSettings:m},null,8,["setting-type"])]),default:a(()=>[i(_,{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"])}}}),E=Object.assign(M,{__name:"MetricSettingsTrigger"});export{E as _};
