import{_ as s}from"./constant-Dkm_Y9q1.js";import{E as e,z as a}from"./vendor-s2rfM_Vj.js";import{u as t}from"./useConfirm-Oxu8PBPd.js";import{u as o,a as n,c as i,f as c}from"./newtab-BWIjnu6l.js";import{B as r}from"./t-r-vendor-gn7FMrPE.js";import"./index-Bf7N7lFc.js";import"./apis-DdFSvwR4.js";const m=""+new URL("code-UG7JHwCy.jpg",import.meta.url).href,l=""+new URL("play-D0r4cN9t.jpg",import.meta.url).href,p=e("div")({name:"WrapUI",class:"wz58lfm",propsAsIs:!1}),d=e("div")({name:"TitleUI",class:"tepmp6t",propsAsIs:!1}),I=e("i")({name:"TitleIconUI",class:"tptgkvx",propsAsIs:!1}),j=e("div")({name:"ContentUI",class:"cgc95au",propsAsIs:!1}),g=e("div")({name:"ContentItemImgWrapUI",class:"chwslpp",propsAsIs:!1}),f=e("img")({name:"ContentItemImgUI",class:"c1ma49px",propsAsIs:!1}),x=e("div")({name:"ContentItemTitleUI",class:"c7slm20",propsAsIs:!1}),v=e("div")({name:"ContentItemUI",class:"c1hqvbmc",propsAsIs:!1}),h=e("div")({name:"UpdateDialogContentUI",class:"u1y67q2",propsAsIs:!1}),u=[{title:"技术控",icon:"code",config:"code",img:m},{title:"轻娱乐",icon:"music",config:"play",img:l}],y=({})=>{const{handleMessage:e}=c(),{onConfirm:m}=t(),l=o((s=>s.setBackgroundInfo)),y=n((s=>s.setStyleInfo)),{setNavigationInfo:U}=i(),_=async({config:t,img:o,title:n})=>{let i={backgroundInfo:{},styleInfo:{},navigationInfo:{}};switch(t){case"code":i=await s((()=>import("./code-DcpXeiQd.js")),[],import.meta.url);break;case"play":i=await s((()=>import("./play-CWk_Z4ja.js")),[],import.meta.url)}m({header:"使用模板",body:a.jsxs(h,{children:[a.jsx("div",{children:"使用模板后将覆盖当前设置"}),a.jsx("div",{className:"update-content-img",children:a.jsx("img",{src:o,alt:""})}),a.jsxs("div",{children:["是否确认使用",a.jsx("span",{children:n}),"模版"]})]})}).then((()=>{var s;l((s=i).backgroundInfo),y(s.styleInfo),U(s.navigationInfo),e.success("更新成功")}))};return a.jsxs(p,{children:[a.jsxs(d,{children:["在线",a.jsx("i",{className:"ovo mine"}),"模版"]}),a.jsx(I,{className:"ovo next"}),a.jsx(j,{children:u.map(((s,e)=>a.jsxs(v,{onClick:()=>_(s),children:[a.jsxs(g,{children:[a.jsx(f,{src:s.img,alt:""}),a.jsx(r,{className:"template-img__btn",size:"large",type:"button",icon:a.jsx("i",{className:"ovo download",style:{fontSize:24}})})]}),a.jsxs(x,{children:[a.jsx("i",{className:"ovo "+s.icon}),s.title]})]},e)))})]})};export{y as default};
