import{aK as a,P as s,k as e,$ as l}from"./utils-lib.js?v=1761009159";import{r as t,c as i,q as o,H as n,v as r,x as m,I as u,y as d,e as p,Q as c,B as x,C as v,G as f}from"./base-lib.js?v=1761009159";import{u as y}from"./useStore4.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]"},I=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,[p(t,{modelValue:d(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"]),p(i,{type:"primary",class:"!ml-[12px]",onClick:d(k)},{default:x(()=>s[1]||(s[1]=[v(" 保存 ",-1)])),_:1,__:[1]},8,["onClick"])])),[[y,d(g)],[y,"正在加载中，请稍后...","title"]]),p(o,{options:[{content:"默认文档，每行一个，优先级由上至下"}],class:"ml-[20px] mt-[20px]"})])})});export{I as _};
