(window.webpackJsonp=window.webpackJsonp||[]).push([[153],{749:function(e,t,n){"use strict";n.r(t);n(85);var o={data:function(){return{selectedSizeIndex:3,availableSizes:[60,80,100,120,140,160,180,200,220]}},watch:{selectedSize:{immediate:!0,handler:function(){this.setSelectedIndex()}}},computed:{selectedSize:function(){return this.$store.getters["user/getUserSetting"]("bookshelfCoverSize")},bookCoverWidth:function(){return this.availableSizes[this.selectedSizeIndex]}},methods:{increaseSize:function(){this.selectedSizeIndex=Math.min(this.availableSizes.length-1,this.selectedSizeIndex+1),this.$store.dispatch("user/updateUserSettings",{bookshelfCoverSize:this.bookCoverWidth})},decreaseSize:function(){this.selectedSizeIndex=Math.max(0,this.selectedSizeIndex-1),this.$store.dispatch("user/updateUserSettings",{bookshelfCoverSize:this.bookCoverWidth})},setSelectedIndex:function(){var e=this,t=this.availableSizes.findIndex((function(s){return s===e.selectedSize}));isNaN(t)||(this.selectedSizeIndex=t)}},mounted:function(){}},r=n(4),component=Object(r.a)(o,(function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"rounded-full py-1 bg-primary px-2 border border-black-100 text-center flex items-center box-shadow-md",attrs:{"aria-hidden":"true"},on:{mousedown:function(e){e.preventDefault()},mouseup:function(e){e.preventDefault()}}},[t("span",{staticClass:"material-symbols",class:0===e.selectedSizeIndex?"text-gray-400":"hover:text-yellow-300 cursor-pointer",staticStyle:{"font-size":"0.9rem"},attrs:{"aria-label":"Decrease Cover Size",role:"button"},on:{mousedown:function(e){e.preventDefault()},click:e.decreaseSize}},[e._v("")]),e._v(" "),t("p",{staticClass:"px-2 font-mono",staticStyle:{"font-size":"1rem"}},[e._v(e._s(e.bookCoverWidth))]),e._v(" "),t("span",{staticClass:"material-symbols",class:e.selectedSizeIndex===e.availableSizes.length-1?"text-gray-400":"hover:text-yellow-300 cursor-pointer",staticStyle:{"font-size":"0.9rem"},attrs:{"aria-label":"Increase Cover Size",role:"button"},on:{mousedown:function(e){e.preventDefault()},click:e.increaseSize}},[e._v("")])])])}),[],!1,null,null,null);t.default=component.exports}}]);