import{e as n,q as r,K as c,s as y,G as d,a as S}from"./index-DjCrtoJM.js";import{u as l}from"./studio-tools-C1zamUp1.js";function C(){const e=n.c(7),{org:o}=r(),u=l();let i;e[0]!==o.id?(i=c.secrets(o.id),e[0]=o.id,e[1]=i):i=e[1];let t;e[2]!==u?(t=async()=>await u.call("SECRET_LIST",{}),e[2]=u,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:a}=y(s);return a.secrets}function p(){const e=n.c(8),{org:o}=r(),u=l(),i=d();let t;e[0]!==u?(t=async f=>await u.call("SECRET_CREATE",{...f}),e[0]=u,e[1]=t):t=e[1];let s;e[2]!==o||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:c.secrets(o.id)})},e[2]=o,e[3]=i,e[4]=s):s=e[4];let a;return e[5]!==t||e[6]!==s?(a={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=a):a=e[7],S(a)}export{p as a,C as u};
