import{d as f,M as g,O as s,i as a,be as h,F as y,e as C,s as T,P}from"./index.afa1b71c.js";import"./index.db3b0e47.js";import"./index.7c0d35f2.js";import{T as A,a as i}from"./index.0daa711a.js";import{b as F}from"./index.fce7f544.js";import{C as S}from"./index.8fb41b14.js";import{s as d,P as w,A as x,C as M,a as k}from"./album-my.9fee8db9.js";import{S as E}from"./index.e8a66baf.js";import{g as R}from"./music.9b0ac3f4.js";import{u as q}from"./hooks.ea9ec317.js";import"./use-id.237d90a3.js";import"./use-tab-status.7451baf9.js";import"./use-refs.fee02e7b.js";import"./index.90f19895.js";import"./index.bed38478.js";import"./index.2a4aa690.js";import"./index.637c8eb4.js";import"./icon-xin.ff5e2464.js";import"./icon_uploader.2c2d880e.js";import"./icon_exquisite.f7a49149.js";import"./icon_album_active.17cb3c18.js";import"./icon_music_active.f91f6fcc.js";import"./index.570461cd.js";var D=f({name:"Practice",emits:["favorite"],setup(t,{expose:u,emit:p}){const n=g(),e=s(0),{isLoading:l,state:o,execute:m}=F(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(E,{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)])])}}}),le=f({name:"MusicPersonal",setup(){localStorage.setItem("behaviorId",R());const t=s("personal"),u=s(),p=s(),n=s();return P(()=>{q("\u6211\u7684\u4E50\u8C31")}),()=>a("div",{class:d.personal},[a(D,{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(A,{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(M,{ref:p,onFavorite:()=>{var e,l;(l=(e=n.value)==null?void 0:e.reload)==null||l.call(e)}},null),t.value==="album"&&a(k,null,null)])}});export{le as default};
