var x=Object.defineProperty;var f=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var g=(o,t,n)=>t in o?x(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,c=(o,t)=>{for(var n in t||(t={}))F.call(t,n)&&g(o,n,t[n]);if(f)for(var n of f(t))A.call(t,n)&&g(o,n,t[n]);return o};import{b as B,d as O,U as w,bF as y,r as v,o as u,E as l,w as p,c as G,q as b,u as k,F as D,a8 as E,W as H,p as L,t as P,a1 as N,ct as M,cs as V,S as i,aR as d,a2 as W}from"./index-67a30bc6.js";import{g as q}from"./plugin-463a9df8.js";import{u as U}from"./chartEditStore-8254eca3.js";import{i as j}from"./icon-99a136c4.js";const z=O({__name:"index",setup(o){const{BrowsersOutlineIcon:t,SendIcon:n}=j.ionicons5,S=U(),T=w(),h=()=>{const _=N(M.CHART_PREVIEW_NAME,"href");if(!_)return;const{id:r}=T.params,s=typeof r=="string"?r:r[0],a=S.getStorageInfo,e=V(i.GO_CHART_STORAGE_LIST)||[];if(e!=null&&e.length){const m=e.findIndex(R=>R.id===s);m!==-1?(e.splice(m,1,c({id:s},a)),d(i.GO_CHART_STORAGE_LIST,e)):(e.push(c({id:s},a)),d(i.GO_CHART_STORAGE_LIST,e))}else d(i.GO_CHART_STORAGE_LIST,[c({id:s},a)]);W(_,[s],void 0,!0)},C=()=>{q({message:"\u60F3\u4F53\u9A8C\u53D1\u5E03\u529F\u80FD\uFF0C\u8BF7\u524D\u5F80 master-fetch \u5206\u652F\u67E5\u770B: https://gitee.com/MTrun/go-view/tree/master-fetch",positiveText:"\u4E86\u7136",closeNegativeText:!0,onPositiveCallback:()=>{}})},I=y([{select:!0,title:"\u9884\u89C8",icon:E(t),event:h},{select:!0,title:"\u53D1\u5E03",icon:E(n),event:C}]);return(_,r)=>{const s=v("n-button"),a=v("n-space");return u(),l(a,{class:"go-mt-0"},{default:p(()=>[(u(!0),G(D,null,b(k(I),e=>(u(),l(s,{key:e.title,ghost:"",onClick:e.event},{icon:p(()=>[(u(),l(H(e.icon)))]),default:p(()=>[L("span",null,P(e.title),1)]),_:2},1032,["onClick"]))),128))]),_:1})}}});var Z=B(z,[["__scopeId","data-v-618bc8f6"]]);export{Z as default};
