(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{881:function(t,e,o){"use strict";o.r(e);o(15),o(14);var n={props:{index:Number,width:Number,height:{type:Number,default:192},bookshelfView:{type:Number,default:0},collectionMount:{type:Object,default:function(){return null}},isTag:Boolean},data:function(){return{collection:null,isSelectionMode:!1,selected:!1,isHovering:!1}},computed:{bookCoverAspectRatio:function(){return this.store.getters["libraries/getBookCoverAspectRatio"]},cardWidth:function(){return this.width||this.coverHeight/this.bookCoverAspectRatio*2},coverHeight:function(){return this.height*this.sizeMultiplier},labelFontSize:function(){return this.width<160?.75:.9},sizeMultiplier:function(){return this.store.getters["user/getSizeMultiplier"]},title:function(){return this.collection?this.collection.name:""},books:function(){return this.collection&&this.collection.books||[]},store:function(){return this.$store||this.$nuxt.$store},currentLibraryId:function(){return this.store.state.libraries.currentLibraryId},isAlternativeBookshelfView:function(){var t=this.$constants||this.$nuxt.$constants;return this.bookshelfView==t.BookshelfView.DETAIL},userCanUpdate:function(){return this.store.getters["user/getUserCanUpdate"]},rssFeed:function(){return this.collection?this.collection.rssFeed:null}},methods:{setEntity:function(t){this.collection=t},setSelectionMode:function(t){this.isSelectionMode=t},mouseover:function(){this.isHovering=!0},mouseleave:function(){this.isHovering=!1},clickCard:function(){this.collection&&(this.$router||this.$nuxt.$router).push("/collection/".concat(this.collection.id))},clickEdit:function(){this.$emit("edit",this.collection)},destroy:function(){this.$destroy(),this.$el&&this.$el.parentNode?this.$el.parentNode.removeChild(this.$el):this.$el&&this.$el.remove&&this.$el.remove()}},mounted:function(){this.collectionMount&&this.setEntity(this.collectionMount)}},l=o(4),component=Object(l.a)(n,(function(){var t=this,e=t._self._c;return e("div",{ref:"card",staticClass:"absolute top-0 left-0 rounded-xs z-30 cursor-pointer",style:{width:t.cardWidth+"px"},attrs:{id:"collection-card-".concat(t.index),role:"button"},on:{mousedown:function(t){t.preventDefault()},mouseup:function(t){t.preventDefault()},mousemove:function(t){t.preventDefault()},mouseover:t.mouseover,mouseleave:t.mouseleave,click:t.clickCard}},[e("div",{staticClass:"relative",style:{height:t.coverHeight+"px"}},[e("div",{staticClass:"absolute top-0 left-0 w-full box-shadow-book shadow-height"}),t._v(" "),e("div",{staticClass:"w-full h-full bg-primary relative rounded-sm overflow-hidden"},[e("covers-collection-cover",{ref:"cover",attrs:{"book-items":t.books,width:t.cardWidth,height:t.coverHeight,"book-cover-aspect-ratio":t.bookCoverAspectRatio}})],1),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isHovering&&t.userCanUpdate,expression:"isHovering && userCanUpdate"}],staticClass:"w-full h-full absolute top-0 left-0 z-10 bg-black/40 pointer-events-none"},[e("div",{staticClass:"absolute pointer-events-auto",style:{top:"0.5em",right:"0.5em"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.clickEdit.apply(null,arguments)}}},[e("span",{staticClass:"material-symbols text-white/75 hover:text-white/100",style:{fontSize:"1.25em"}},[t._v("edit")])])]),t._v(" "),!t.isHovering&&t.rssFeed?e("span",{staticClass:"absolute z-10 material-symbols text-success",style:{top:"0.5em",left:"0.5em",fontSize:"1.5em"}},[t._v("rss_feed")]):t._e()]),t._v(" "),t.isAlternativeBookshelfView?e("div",{staticClass:"relative z-30 left-0 right-0 mx-auto h-8e py-1e rounded-md text-center"},[e("p",{staticClass:"truncate",style:{fontSize:t.labelFontSize+"em"}},[t._v(t._s(t.title))])]):e("div",{staticClass:"categoryPlacard absolute z-30 left-0 right-0 mx-auto -bottom-6e h-6e rounded-md text-center",style:{width:Math.min(200,t.cardWidth)+"px"}},[e("div",{staticClass:"w-full h-full shinyBlack flex items-center justify-center rounded-xs border",style:{padding:"0em ".concat(.5,"em")}},[e("p",{staticClass:"truncate",style:{fontSize:t.labelFontSize+"em"}},[t._v(t._s(t.title))])])])])}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{CoversCollectionCover:o(242).default})}}]);