var C=Object.defineProperty,I=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var y=(s,e,a)=>e in s?C(s,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[e]=a,c=(s,e)=>{for(var a in e||(e={}))k.call(e,a)&&y(s,a,e[a]);if(b)for(var a of b(e))A.call(e,a)&&y(s,a,e[a]);return s},x=(s,e)=>I(s,L(e));import{d as P,_ as V,h as q,V as n,a as i,F,w as N,S as T,P as _}from"./vendor.a0144ce9.js";/* empty css               *//* empty css               */import{C as B}from"./index.ccfa57ee.js";import{s as w,C as O,r as R}from"./index.3d95a92c.js";import{I as z}from"./item.86e13af7.js";import{S as D}from"./select-tag.a1caf9cf.js";/* empty css               *//* empty css               *//* empty css               */import"./footer.b1c4a2d9.js";import"./favorite.9bdf4305.js";import"./index.28b40a59.js";/* empty css                *//* empty css                *//* empty css                */import"./index.926ca9c5.js";const E="_sticky_igitw_1";var M={sticky:E},ie=P({name:"Album",props:{hideSearch:{type:Boolean,default:!1},defauleParams:{type:Object,default:()=>({})}},setup({hideSearch:s,defauleParams:e},{expose:a}){const m=V(),f={};w.version&&(f.version=w.version||"",f.platform="ios-student");const l=q(c(c({search:m.query.search||"",albumTagIds:m.query.tagids||"",page:1},f),e)),t=n(null),u=n(!1),g=n(!1),p=n(!1),d=n(!1),h=o=>{l.page=1,l.search=o,t.value=null,v()},v=async()=>{var o;if(!u.value){u.value=!0,p.value=!1;try{const r=await R.post("/api-student/music/album/list",{data:x(c({},l),{idAndName:l.search})});if(t.value){let S=(((o=t.value)==null?void 0:o.rows)||[]).concat(r.data.rows||[]);t.value.rows=S}t.value=t.value||r.data,l.page=r.data.pageNo+1,g.value=r.data.pageNo>=r.data.totalPage}catch{p.value=!0}u.value=!1}},j=o=>{const r=Object.values(o).flat().filter(Boolean).join(",");l.albumTagIds=r,l.page=1,t.value=null,v(),d.value=!1};return a({onSearch:h,onComfirm:j}),()=>i(F,null,[i(N,{loading:u.value,finished:g.value,"finished-text":t.value&&t.value.rows.length?"\u6CA1\u6709\u66F4\u591A\u4E86":"",onLoad:v,error:p.value},{default:()=>[!s&&i(T,{class:M.sticky},{default:()=>[i(B,{modelValue:l.search,showAction:!0,onSearch:h,onFilter:()=>d.value=!0,filterDot:!!l.albumTagIds},null)]}),t.value&&t.value.rows.length?t.value.rows.map(o=>i(z,{data:o},null)):!u.value&&i(O,{tips:"\u6682\u65E0\u66F2\u76EE",classImgSize:"SMALL",btnStatus:!1},null)]}),i(_,{show:d.value,round:!0,closeable:!0,position:"bottom",style:{height:"60%"},teleport:"body","onUpdate:show":o=>d.value=o},{default:()=>[i(D,{defaultValue:m.query.tagids,onConfirm:j,onCancel:()=>{}},null)]})])}});export{ie as default};
