import{_ as y}from"./index-CZps0rIN.js?v=1773287522785";import{m as h,o as F,p as C,q as w,i as I,n as B,c as $}from"./index-BTglIPU2.js?v=1773287522785";import{L as S}from"./like-CJUjzLhM.js?v=1773287522785";import{k as R,R as j,am as N,r as V,$ as q,Z as E,_ as t,aa as o,a0 as a,a9 as l,X as L,S as M,j as P}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{B as T}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";const A={class:"banner"},D={class:"banner-title"},O={class:"ml-8px"},U={class:"pt-24px px-32px"},X={class:"mt-16px text-primary"},Z={class:"flex justify-center mt-20px"},z=R({__name:"submit",props:{entryId:{}},emits:["close"],setup(p,{emit:d}){const{t:r}=j(),m=N(),u=d;let c="";const _=p,s=V(""),f=()=>{const e=m.currentRoute.value.path,n={site:502,wp:503,ftp:504,database:505,docker:506,security:507,waf:508,mail:509,files:510,logs:511,ssl_domain:512,yakpanelsub:513,terminal:514,crontab:515,softs:516,setting:517,control:518};for(const i in n)if(e.includes(i))return n[i];return 501},b=()=>({questions:{[c]:s.value},submit_entry:_.entryId||f()}),x=async()=>{if(s.value.trim()===""){h.error(r("Component.Feedback.index_5"));return}await F(b()),u("close"),v()},v=()=>{const e=C({hideClose:!0,content:()=>a("div",{class:"flex-center flex-col w-230px h-124px bg-#F1F9F3"},[a("img",{class:"w-56px",src:S},null),a("div",{class:"mt-16px"},[r("Component.Feedback.index_6")])])});setTimeout(()=>{e.hide()},3e3)};return(async()=>{const{message:e}=await w();I(e)&&B(e.res)&&e.res.length>0&&(c=e.res[0].id)})(),(e,n)=>{const i=y,g=T;return q(),E("div",null,[t("div",A,[t("div",D,[t("span",O,o(e.$t("Component.Feedback.index_1")),1)])]),t("div",U,[a(i,{value:M(s),"onUpdate:value":n[0]||(n[0]=k=>L(s)?s.value=k:null),rows:6},{default:l(()=>[t("p",null,o(e.$t("Component.Feedback.index_2")),1),t("p",null,o(e.$t("Component.Feedback.index_3")),1)]),_:1},8,["value"]),t("div",X,o(e.$t("Component.Feedback.index_4")),1),t("div",Z,[a(g,{type:"primary",class:"w-120px",onClick:x},{default:l(()=>[P(o(e.$t("Public.Btn.Submit")),1)]),_:1})])])])}}}),ee=$(z,[["__scopeId","data-v-3be49a6f"]]);export{ee as default};
