import{ap as e,dU as t,_ as a,dX as s}from"./page_layout.js?v=1763625242172";import{u as l}from"./public.js?v=1763625242172";import{a as o,_ as i}from"./index.vue_vue_type_script_setup_true_lang14.js?v=1763625242172";import{k as n,P as r,r as d,R as p,S as u,U as c,X as m,a4 as x,V as _,a3 as v,aj as f,I as w,ap as g}from"./vue.js?v=1763625242172";import{au as h,dh as j}from"./naive.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";const y={class:"p-24px"},S={class:"flex items-center pl-12px"},b={class:"flex-1 ml-14px"},C={class:"text-16px font-bold text-font1"},k={class:"p-10px mt-24px mx-12px text-14px",style:{backgroundColor:"var(--site-confirm-calc-box-bg)"}},N={class:"mt-10px"},R=n({__name:"index",props:{data:{}},setup(n,{expose:R}){const{t:T}=r(),U=n,{rows:z}=U.data,D=e(),X=t(),$=d(null),H=d(""),I=d(!1),P=d("");let V=null;const q=e=>{g((()=>{(e=>{var t;P.value=e,I.value=!0,null==(t=$.value)||t.focus(),V&&clearTimeout(V),V=window.setTimeout((()=>{I.value=!1}),3e3)})(e)}))()},A=async(e,t=!1)=>await s({project_name:e.name},t),B=e=>{l({title:T("Site.Cert.index_56"),hideClose:!0,component:o,data:{title:T("Site.Cert.index_56"),api:A,data:z,callback:t=>{e(),E(t)}}})},E=e=>{X.setRefresh(!0),l({title:T("Site.DelSite.index_11"),width:440,footer:!0,component:i,data:{title:T("Site.Cert.index_56"),data:e,status:"done",columns:[{key:"name",title:T("Site.TableRow.index_1"),ellipsis:{tooltip:{width:"trigger"}}}]}})};return R({onConfirm:async({hide:e})=>""==H.value?(q(T("Site.DelSite.ContentText5")),!1):H.value!==T("Node.index_41")?(q(T("Node.index_38")),!1):(await(async e=>{1===z.length?(await A(z[0],!0),X.setRefresh(!0),null==e||e()):B(e)})(e),void e())}),(e,t)=>{const s=a,l=h,o=j;return p(),u("div",y,[c("div",S,[m(s,{name:"base-warning",size:"34",color:"#f0a020"}),c("div",b,[c("div",C,[c("div",null,x(e.$t("Node.index_39")),1)])])]),c("div",k,[c("div",null,x(e.$t("Node.index_40",[_(T)("Node.index_41")])),1),c("div",N,[m(o,{show:_(I),"onUpdate:show":t[1]||(t[1]=e=>f(I)?I.value=e:null),trigger:"manual",placement:"top-start","arrow-point-to-center":!0,style:w({"--n-color":_(D).errorColor,"--n-text-color":"#fff"})},{trigger:v((()=>[m(l,{ref_key:"inputRef",ref:$,value:_(H),"onUpdate:value":t[0]||(t[0]=e=>f(H)?H.value=e:null),size:"small",placeholder:""},null,8,["value"])])),default:v((()=>[c("div",null,x(_(P)),1)])),_:1},8,["show","style"])])])])}}});export{R as default};
