import{am as a,H as s,j as e,T 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 _}from"./site.js?v=1761009159";const{siteInfo:b}=y(),w=t(""),g=t(!1),h=async()=>{g.value=!0;try{const{data:a}=await j({id:b.value.id});w.value=a.split(",").join("\n")}catch(s){a(s)}finally{g.value=!1}},k=async()=>{(await s({loading:"正在保存默认文档，请稍后...",request:_({id:b.value.id,Index:w.value.split("\n").join(",")}),message:!0})).status&&h()},C={class:"flex items-end mb-[12px]"},V=i({__name:"index",setup:(a,{expose:s})=>(o(h),s({init:h}),(a,s)=>{const t=e,i=f,o=l,y=n("bt-loading");return r(),m("div",null,[u((r(),m("div",C,[d(t,{modelValue:p(w),"onUpdate:modelValue":s[0]||(s[0]=a=>c(w)?w.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(k)},{default:x((()=>s[1]||(s[1]=[v(" 保存 ")]))),_:1,__:[1]},8,["onClick"])])),[[y,p(g)],[y,"正在加载中，请稍后...","title"]]),d(o,{options:[{content:"默认文档，每行一个，优先级由上至下"}],class:"ml-[20px] mt-[20px]"})])})});export{V as _};
