import{d as v,q as I,r as i,x as u,y,U as l,a as e,h as _,a2 as S,S as L,K as Q,X as b}from"./index-869d77fb.js";import{i as E}from"./icon_back-6f7c496c.js";import{M as J}from"./index-d315d9dc.js";import{a as H,b as h}from"./api-b637a269.js";import{N as M}from"./Image-7b636fbd.js";import"./index-0153d173.js";import"./index-1c6c2ec0.js";const G="_container_1fnt5_1",R="_back_1fnt5_10",U="_centerSearch_1fnt5_25",Y="_section_1fnt5_39",T="_directorySection_1fnt5_43",N="_directionc_1fnt5_50",V="_dirItem_1fnt5_63",q="_active_1fnt5_77",x="_content_1fnt5_83",D="_wrap_1fnt5_96",W="_emtpyWrap_1fnt5_103",F="_wrapfirstI_1fnt5_122",K="_wrapItem_1fnt5_126",P="_item_1fnt5_136",X="_name_1fnt5_167",j="_favoriteBtn_1fnt5_174",O="_containerImg_1fnt5_180",Z="_cover_1fnt5_206",z="_loaded_1fnt5_236",$="_containerTablet_1fnt5_239",t={container:G,back:R,centerSearch:U,section:Y,directorySection:T,directionc:N,dirItem:V,active:q,content:x,wrap:D,emtpyWrap:W,wrapfirstI:F,wrapItem:K,item:P,name:X,favoriteBtn:j,containerImg:O,cover:Z,loaded:z,containerTablet:$},aa="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQQAAAFwCAMAAABpZfXvAAAAV1BMVEXy8vL////Pz8/R0dHk5OS3t7fMzMzT09PKysre3t7h4eHAwMDDw8O9vb26urq2trbIyMjGxsbb29vZ2dnX19fV1dXp6enu7u7w8PDr6+v39/f7+/vm5uai4HaqAAAHe0lEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABm50zW5ATBKIpgIZMGnLV8/+cMg6BGLZNdQ+p81bVw1yf3vyDa+fLly5f/iLFnTYcQhBjDoqH50g8j+J8YWAMxxgQbAW1NLYwxYwL8F4wMEWINEB2BWkMdzJL/Bx76DhMHRu1BgbHgPSQ9GD0iOwUaayF48OQJaxgK4oFt4x2ELG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ZoLXRJnqd5evXa1eNZArIkcrh8zyK2mfBROGpok47BSk8qr0Gco5DkHdMVY1eGhULsLaA0D9fvWGDwUApFjAXUJPNf7P09Q42Ve6WpKmX78//i88uXL1++fPny5cuXL19+tweHBAAAAACC/r/2hgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbgLA3LS2LXStLwAAAABJRU5ErkJggg==",Aa=v({name:"baseIndex-list",setup(){I(),i(!1);const A=i([]),w=()=>{l({api:"goBack"})},n=u({musicTagId:null,keyword:null,page:1,rows:999}),p=i(!1),o=u({list:[],loading:!1,favoriteList:[],details:[],bookData:{},showBook:!1,book:{}}),k=i(),m=i([]),C=async()=>{try{const{data:a}=await H();A.value=a||[],A.value.length>0&&(n.musicTagId=A.value[0].id)}catch(a){}},d=async()=>{var g,f;o.loading=!0;const{musicTagId:a,...c}=n,s=await h({musicTagIds:[a],subjectId:((g=Q.user.data)==null?void 0:g.subjectId)||"",...c});(s==null?void 0:s.code)===200&&Array.isArray((f=s==null?void 0:s.data)==null?void 0:f.rows)&&(o.list=s.data.rows.map(r=>(r.load=!1,r.key=Date.now()+r.id,r))),o.loading=!1,p.value=!0};y(async()=>{l({api:"setStatusBarVisibility",content:{isVisibility:0}}),o.loading=!0,await C(),await d(),o.loading=!1});const B=a=>{const c=b.stringify({musicTagId:n.musicTagId,id:a.id,name:a.name}),s=location.origin+location.pathname+"#/co-ai-detail?"+c;console.log("🚀 ~ url:",s),l({api:"openWebView",content:{url:s,orientation:0,isHideTitle:!1,c_orientation:0}})};return()=>e("div",{class:[t.container,L().isTablet?t.containerTablet:""]},[e("div",{class:t.back,onClick:w},[e("img",{src:E},null)]),e("div",{class:[t.centerSearch]},[e("div",{id:"coai-0"},[e(J,{class:["searchNotice"],shape:"round",background:"transparent",clearable:!1,placeholder:"请输入关键字",onSearch:a=>{n.keyword=a,d()}},null)])]),e("div",{class:t.section},[e("div",{class:t.directorySection},[e("div",{class:t.directionc},[A.value.map(a=>e("p",{class:[t.dirItem,n.musicTagId==a.id?t.active:""],onClick:()=>{n.musicTagId=a.id,d()}},[a.name]))])]),e("div",{class:t.content},[e("div",{class:[t.wrap,o.list.length<=0&&!o.loading?t.emtpyWrap:""],ref:k},[o.list.map((a,c)=>e("div",{class:[t.wrapfirstI]},[e("div",{ref:s=>m.value[c]=s,class:[t.wrapItem,o.bookData.id===a.id&&o.showBook?t.wrapItemHide:""],key:a.key,onClick:()=>B(a)},[e("div",{class:t.item},[e(M,_({"data-id":a.id},{id:c==0?"courseware-0":""},{class:[t.cover,a.load?t.loaded:""],objectFit:"cover",src:a.coverImg,fallbackSrc:aa,onLoad:()=>{a.load=!0},onError:()=>{a.load=!0,a.error=!0}}),null)]),e("div",{class:t.name},[a.name])])])),o.list.length<=0&&!o.loading&&e(S,{image:"list",description:"暂无数据"},null)])])])])}});export{Aa as default};