1import{j as y,C as k,_ as v,r as m,o as e,u as o,x as r,q as i,m as d,F as w,y as b,l as _,p as C,Q as f}from"./index.aa9d7842.js";import{L as $}from"./LoadingSpinner.137aa7c1.js";const x={components:{LoadingSpinner:$,CollectionItem:k(()=>v(()=>import("./CollectionItem.9931e356.js"),["assets/CollectionItem.9931e356.js","assets/CollectionItem.b2b4a274.css","assets/index.aa9d7842.js","assets/index.0a72a09a.css","assets/CollectionLayout.6836aabc.js","assets/CollectionLayout.4aee7d70.css"]))},props:{user:{type:Object,required:!0}},data(){return{collections:[],loaded:!1}},watch:{"$store.state.collections.list"(){this.getCollections()}},mounted(){this.getCollections()},methods:{showNewCollectionDialog(){if(!this.$auth.loggedIn()){this.$store.commit("authForm/showRegistration",{text:this.$t("auth_form.descr_save_to_collection")});return}this.$store.commit("dialogs/showNewCollectionDialog",null)},getCollections(){this.$axios.get("collections",{params:{by_user_id:this.user.id,with_items:!0}}).then(s=>{this.collections=s.data.data,this.loaded=!0})}}},N={class:"container"},D={key:0,class:"q-mb-lg link-black-bold-wrapper text-right"},B={class:"member-collection-wrap"},q=d("div",{class:"member-collection-item-empty"},null,-1),L={key:1,class:"text-center"},V={key:0,class:"text-weight-medium"},E={key:1},F={key:2,class:"text-center"},I={key:0,class:"text-weight-medium"};function P(s,n,c,T,t,a){const u=m("collection-item"),h=m("loading-spinner");return e(),o("div",N,[t.collections.length!==0?(e(),o("div",D,[c.user.$can_edit?(e(),o("span",{key:0,class:"member-collection-add-new",onClick:n[0]||(n[0]=l=>a.showNewCollectionDialog())}," + "+r(s.$t("personal.collections.create")),1)):i("",!0)])):i("",!0),d("div",B,[(e(!0),o(w,null,b(t.collections,(l,p)=>(e(),_(u,{key:p,class:"member-collection-item",link:s.$i18nPath(l.$url),artworks:l.items.map(g=>g.artwork),name:l.name,ctn:l.items_count,is_private:l.is_private,by_link:l.by_link},null,8,["link","artworks","name","ctn","is_private","by_link"]))),128)),q]),c.user.$can_edit?(e(),o("div",L,[t.collections.length===0&&t.loaded?(e(),o("div",V,r(s.$t("empty.your_collections")),1)):i("",!0),t.collections.length===0&&t.loaded?(e(),o("div",E,r(s.$t("empty.your_collections_create_descr")),1)):i("",!0),C(f,{onClick:n[1]||(n[1]=l=>a.showNewCollectionDialog()),label:s.$t("personal.collections.create"),color:"primary","text-color":"black",size:"sm",class:"q-mt-sm"},null,8,["label"])])):(e(),o("div",F,[t.collections.length===0&&t.loaded?(e(),o("div",I,r(s.$t("empty.collections")),1)):i("",!0)])),t.loaded?i("",!0):(e(),_(h,{key:3}))])}var O=y(x,[["render",P]]);export{O as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.