import{_ as w}from"./index-CZps0rIN.js?v=1773287522785";import{g as v,m as k,i as B}from"./index-BTglIPU2.js?v=1773287522785";import{c as C}from"./copy-D-wIKr0q.js?v=1773287522785";import{u as b}from"./useLoading-CZ2gSAW7.js?v=1773287522785";import{o as h,b as x}from"./ssh-g_xvV-TS.js?v=1773287522785";import{B as K,k as $}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{k as H,R as D,r as R,$ as j,Z as A,a0 as o,S as p,X as I,a9 as t,j as n,aa as i}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";const L={class:"p-20px"},Z=H({__name:"view",setup(N){const{t:u}=D(),s=R(""),_=()=>{C(s.value)},m=()=>{window.open("".concat(v(),"/ssh_security?action=download_key"))},d=async()=>{await h({ssh:"yes",type:"ed25519"},!1),await r(),k.success(u("Security.SSH.Basic.SSHKey.view_2"))},{loading:f,setLoading:c}=b(),r=async()=>{try{c(!0);const{message:e}=await x();B(e)&&(s.value=e.result)}finally{c(!1)}};return r(),(e,l)=>{const y=w,a=K,g=$;return j(),A("div",L,[o(y,{value:p(s),"onUpdate:value":l[0]||(l[0]=S=>I(s)?s.value=S:null),loading:p(f),rows:10},null,8,["value","loading"]),o(g,{class:"mt-16px",size:12},{default:t(()=>[o(a,{type:"primary",onClick:_},{default:t(()=>[n(i(e.$t("Public.Btn.Copy")),1)]),_:1}),o(a,{type:"primary",onClick:m},{default:t(()=>[n(i(e.$t("Public.Btn.Download")),1)]),_:1}),o(a,{onClick:d},{default:t(()=>[n(i(e.$t("Security.SSH.Basic.SSHKey.view_1")),1)]),_:1})]),_:1})])}}});export{Z as default};
