import{d as f,Q as g,U as s,i as a,bg as h,F as y,e as C,s as T,V as A}from"./index.7994470a.js";import"./index.6449f9de.js";import"./index.889feca1.js";import{T as F,a as i}from"./index.a28173c9.js";import{b as P}from"./index.9eb2b8e9.js";import{C as S}from"./index.777f4790.js";import{s as d,P as w,A as x,C as k,a as E}from"./album-my.fc2b30ef.js";import{S as M}from"./index.f99f2504.js";import{g as R}from"./music.d2ae34a8.js";import{u as V}from"./hooks.04c1f931.js";import"./use-id.117b75b2.js";import"./use-tab-status.00d7316c.js";import"./use-refs.ad5f4144.js";import"./index.ec643df3.js";import"./index.b3dca421.js";import"./index.ab866de2.js";import"./index.2fbdc579.js";import"./icon-xin.df8ab2d7.js";import"./icon_uploader.9f387137.js";import"./icon_album.fa329df6.js";import"./icon_album_active.ce98b2a8.js";import"./icon_exquisite.69e33c80.js";import"./icon_music_active.3b316ab8.js";import"./icon-play.bc9e7aab.js";import"./index.570461cd.js";var q=f({name:"Practice",emits:["favorite"],setup(t,{expose:u,emit:p}){const n=g(),e=s(0),{isLoading:l,state:o,execute:m}=P(r=>C.get("/music/sheet/practice",{prefix:T.platformType==="TEACHER"?"/api-teacher":"/api-student",params:{rows:(r==null?void 0:r.rows)||3}}),null);return u({reload:m}),()=>{var c;const r=((c=o.value)==null?void 0:c.data.rows)||[];return e.value===0&&(e.value=r.length),a(y,null,[e.value>0&&a(S,{title:"\u6700\u8FD1\u7EC3\u4E60",border:!1},null),a("div",{class:d.practice},[a(M,{list:r,onDetail:v=>{const b=location.origin+location.pathname+"#/music-detail?id="+v.id;h(b,()=>{n.push({path:"/music-detail",query:{id:v.id}})})}},null)])])}}}),re=f({name:"MusicPersonal",setup(){localStorage.setItem("behaviorId",R());const t=s("personal"),u=s(),p=s(),n=s();return A(()=>{V("\u6211\u7684\u4E50\u8C31")}),()=>a("div",{class:d.personal},[a(q,{ref:n,onFavorite:()=>{var e,l,o,m;t.value==="personal"?(l=(e=u.value)==null?void 0:e.reset)==null||l.call(e):t.value==="collection"&&((m=(o=p.value)==null?void 0:o.reset)==null||m.call(o))}},null),a(F,{color:"var(--van-primary)",background:"transparent",lineWidth:20,shrink:!0,active:t.value,"onUpdate:active":e=>t.value=e,onChange:e=>t.value=e},{default:()=>[a(i,{title:"\u6211\u7684\u5355\u66F2",name:"personal"},null),a(i,{title:"\u6211\u7684\u4E13\u8F91",name:"personal-album"},null),a(i,{title:"\u6536\u85CF\u5355\u66F2",name:"collection"},null),a(i,{title:"\u6536\u85CF\u4E13\u8F91",name:"album"},null),a(i,{title:"\u8D60\u9001\u5355\u66F2",name:"personal-gift"},null),a(i,{title:"\u8D60\u9001\u4E13\u8F91",name:"album-gift"},null)]}),(t.value==="personal"||t.value==="personal-gift")&&a(w,{ref:u,gift:t.value==="personal-gift"?1:0,onFavorite:()=>{var e,l;(l=(e=n.value)==null?void 0:e.reload)==null||l.call(e)}},null),(t.value==="personal-album"||t.value==="album-gift")&&a(x,{gift:t.value==="album-gift"?1:0},null),t.value==="collection"&&a(k,{ref:p,onFavorite:()=>{var e,l;(l=(e=n.value)==null?void 0:e.reload)==null||l.call(e)}},null),t.value==="album"&&a(E,null,null)])}});export{re as default};
