(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{880:function(t,e,o){"use strict";o.r(e);o(15),o(14);var l={props:{index:Number,width:Number,height:{type:Number,default:192},bookshelfView:{type:Number,default:0},playlistMount:{type:Object,default:function(){return null}}},data:function(){return{playlist:null,isSelectionMode:!1,selected:!1,isHovering:!1}},computed:{bookCoverAspectRatio:function(){return this.store.getters["libraries/getBookCoverAspectRatio"]},cardWidth:function(){return this.width||this.coverHeight},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.playlist?this.playlist.name:""},items:function(){return this.playlist&&this.playlist.items||[]},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"]}},methods:{setEntity:function(t){this.playlist=t},setSelectionMode:function(t){this.isSelectionMode=t},mouseover:function(){this.isHovering=!0},mouseleave:function(){this.isHovering=!1},clickCard:function(){this.playlist&&(this.$router||this.$nuxt.$router).push("/playlist/".concat(this.playlist.id))},clickEdit:function(){this.$emit("edit",this.playlist)},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.playlistMount&&this.setEntity(this.playlistMount)}},n=o(4),component=Object(n.a)(l,(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",fontSize:t.sizeMultiplier+"rem"},attrs:{id:"playlist-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-playlist-cover",{ref:"cover",attrs:{items:t.items,width:t.cardWidth,height:t.coverHeight}})],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.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 -bottom-6e left-0 right-0 mx-auto h-6e rounded-md text-center",style:{width:Math.min(200,t.width)+"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,{CoversPlaylistCover:o(243).default})}}]);