var h=Object.defineProperty;var p=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var b=(s,t,e)=>t in s?h(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,r=(s,t)=>{for(var e in t||(t={}))k.call(t,e)&&b(s,e,t[e]);if(p)for(var e of p(t))C.call(t,e)&&b(s,e,t[e]);return s};import{d as m,u as w,k as f,a,F as c,C as v,I as x,j as y}from"./vendor.cd162bf7.js";/* empty css               *//* empty css              */import{s as i,r as j,C as T}from"./index.a9c80450.js";import{b as g}from"./index.a576332b.js";import{c as I}from"./index.926ca9c5.js";import{u as _,S}from"./hooks.9d08351a.js";import{I as E}from"./item.6f8e93af.js";import{m as N,g as A}from"./music.2b301688.js";/* empty css                */import"./music-icon.c20abf48.js";import"./init-user-icon.6387573f.js";import"./favorite.cb69f4f9.js";import"./index.bf04a798.js";/* empty css              */import"./code-down-load.47d90056.js";import"./logo.bcac726b.js";import"./browser.ebb85846.js";import"./icon_teacher.cb128c00.js";import"./orderStatus.86d72629.js";import"./index.339fc024.js";const R="_songbook_wa4hu_1",L="_sticky_wa4hu_11",U="_title_wa4hu_14",D="_albumContainer_wa4hu_20",F="_album_wa4hu_20",$="_main_wa4hu_38",B="_favorite_wa4hu_41",H="_img_wa4hu_55";var o={songbook:R,sticky:L,title:U,albumContainer:D,album:F,main:$,favorite:B,img:H},V=m({name:"Songbook",setup(){w();const s={};i.version&&(s.version=i.version||"",s.platform=i.platformType==="STUDENT"?"ios-student":"ios-teacher");const t=i.platformType==="STUDENT"?"/api-student":"/api-teacher";s.myself=!1;const e=_(S.SEARCH);e&&(s.subjectIds=e.id);const{isLoading:d,state:l}=g(j.post(`${t}/music/album/list`,{data:r({},s)}),null),u=f();return()=>a(c,null,[l.value&&l.value.data.rows.length?a(c,null,[a(v,{class:o.title,title:"\u4E13\u8F91","is-link":!0,to:"/music-album",value:"\u66F4\u591A",border:!1},null),a("div",{class:o.albumContainer},[l.value.data.rows.map(n=>a("div",{class:o.album,key:n.id,onClick:()=>u.push("/music-album-detail/"+n.id)},[a("div",{class:o.main},[a(x,{class:o.img,src:n.albumCoverUrl},null),a("p",{class:o.favorite},[a("span",null,[n.albumFavoriteCount]),y("\u4EBA\u6536\u85CF")])]),a("h4",{class:I(o.title,"van-ellipsis")},[n.albumName])]))])]):null])}}),q=m({name:"Songbook",setup(){f();const s={myself:!1};i.version&&(s.version=i.version||"",s.platform=i.platformType==="STUDENT"?"ios-student":"ios-teacher"),console.log("music-list");const t=_(S.SEARCH);t&&(s.subjectIds=t.id);const e=i.platformType==="STUDENT"?"/api-student":"/api-teacher",{isLoading:d,state:l}=g(j.post(`${e}/music/sheet/list`,{data:r({},s)}),null);return()=>l.value&&l.value.data.rows.length?a(c,null,[a(v,{class:o.title,title:"\u66F2\u8C31","is-link":!0,to:"/music-list",value:"\u66F4\u591A",border:!1},null),a("div",{class:o.listContainer},[l.value.data.rows.map(u=>a(E,{data:u,onClick:n=>{N(n)}},null))])]):!d.value&&a(T,{tips:"\u6682\u65E0\u66F2\u8C31",classImgSize:"SMALL",btnStatus:!1},null)}}),ms=m({name:"Songbook",setup(){return localStorage.setItem("behaviorId",A()),()=>a("div",{class:o.songbook},[a(V,null,null),a(q,null,null)])}});export{ms as default};
