import{d as a,a as t,B as l,j as u,w as n,x as d,G as o,H as i}from"./vendor.a0144ce9.js";/* empty css               *//* empty css               *//* empty css               *//* empty css               */import{r as c}from"./index.3d95a92c.js";var h=a({name:"MusicListItem",props:{data:{type:Object,default:()=>null}},render(){return this.data?t("div",null,null):null}}),p={"list-contaner":"_list-contaner_v1ygs_1"};function f(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!d(e)}var s=a({name:"MusicList",props:{auditStatus:{type:Number,default:0}},data(){return{list:[],loading:!1,error:!1,finished:!1,page:1}},methods:{async FetchList(){this.loading=!0;try{const e=await c.post("/api-web/music/sheet/list",{data:{auditStatus:this.auditStatus}});e.data.length&&(this.list=this.list.concat(e.data))}catch{this.error=!0}this.loading=!1},toUpload(){this.$router.push({path:"/music-upload"})}},render(){let e;return t("div",{class:p["list-contaner"]},[t(l,{onClick:this.toUpload},{default:()=>[u("\u4E0A\u4F20\u66F2\u8C31")]}),t(n,{loading:this.loading,error:this.error,finished:this.finished,onLoad:this.FetchList},f(e=this.list.map(r=>t(h,{data:r},null)))?e:{default:()=>[e]})])}}),b=a({name:"MusicListSwitch",render(){return t("div",null,[t(o,null,{default:()=>[t(i,{title:"\u5DF2\u4E0A\u67B6"},{default:()=>[t(s,{auditStatus:0},null)]}),t(i,{title:"\u5BA1\u6838\u4E2D"},{default:()=>[t(s,{auditStatus:1},null)]}),t(i,{title:"\u5BA1\u6838\u5931\u8D25"},{default:()=>[t(s,{auditStatus:2},null)]})]})])}});export{b as default};
