import{as as a,J as s,l as e,V as l}from"./utils-lib.js?v=1761009159";import{r as t,c as i,o,B as n,k as r,l as m,C as u,p,e as d,M as c,x,y as v,A as f}from"./base-lib.js?v=1761009159";import{u as y}from"./useStore5.js?v=1761009159";import{getContentIndex as j,setContentIndex as b}from"./site.js?v=1761009159";const{siteInfo:w}=y(),V=t(""),_=t(!1),g=async()=>{_.value=!0;try{const{data:a}=await j({id:w.value.id});V.value=a.split(",").join("\n")}catch(s){a(s)}finally{_.value=!1}},h=async()=>{(await s({loading:"正在保存默认文档，请稍后...",request:b({id:w.value.id,Index:V.value.split("\n").join(",")}),message:!0})).status&&g()},k={class:"flex items-end mb-[12px]"},C=i({__name:"index",setup:(a,{expose:s})=>(o(g),s({init:g}),(a,s)=>{const t=e,i=f,o=l,y=n("bt-loading");return r(),m("div",null,[u((r(),m("div",k,[d(t,{modelValue:p(V),"onUpdate:modelValue":s[0]||(s[0]=a=>c(V)?V.value=a:null),type:"textarea",resize:"none",rows:12,width:"42rem",class:"!w-42rem",placeholder:"请输入内容"},null,8,["modelValue"]),d(i,{type:"primary",class:"!ml-[12px]",onClick:p(h)},{default:x((()=>s[1]||(s[1]=[v(" 保存 ")]))),_:1},8,["onClick"])])),[[y,p(_)],[y,"正在加载中，请稍后...","title"]]),d(o,{options:[{content:"默认文档，每行一个，优先级由上至下"}],class:"ml-[20px] mt-[20px]"})])})});export{C as _};
