(window.webpackJsonp=window.webpackJsonp||[]).push([[143],{883:function(t,e,n){"use strict";n.r(e);n(33),n(8);var o={props:{value:String,disabled:Boolean,label:{type:String,default:"Icon"}},data:function(){return{clickOutsideObj:{handler:this.clickedOutside,events:["mousedown"],isActive:!0},showMenu:!1}},computed:{selected:{get:function(){return this.value||"database"},set:function(t){this.$emit("input",t)}},icons:function(){return this.$store.state.globals.libraryIcons},selectedItem:function(){var t=this;return this.icons.find((function(i){return i===t.selected}))||"audiobookshelf"}},methods:{clickShowMenu:function(){this.disabled||(this.showMenu=!this.showMenu)},clickedOutside:function(){this.showMenu=!1},select:function(t){this.disabled||(this.selected=t,this.showMenu=!1)}},mounted:function(){}},l=n(4),component=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.clickOutsideObj,expression:"clickOutsideObj"}],staticClass:"relative w-full h-9"},[e("p",{staticClass:"text-sm font-semibold"},[t._v(t._s(t.label))]),t._v(" "),e("button",{staticClass:"relative h-full w-full border border-gray-600 rounded-sm shadow-xs pl-3 pr-3 text-left focus:outline-hidden cursor-pointer bg-primary text-gray-100 hover:text-gray-200",attrs:{type:"button",disabled:t.disabled,"aria-haspopup":"listbox","aria-expanded":"true"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.clickShowMenu.apply(null,arguments)}}},[e("ui-library-icon",{attrs:{icon:t.selectedItem}})],1),t._v(" "),e("transition",{attrs:{name:"menu"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.showMenu,expression:"showMenu"}],staticClass:"absolute -left-[4.5rem] z-10 -mt-px bg-primary border border-black-200 shadow-lg max-h-56 w-48 rounded-md py-1 overflow-auto focus:outline-hidden sm:text-sm"},[e("div",{staticClass:"flex justify-center items-center flex-wrap"},[t._l(t.icons,(function(n){return[e("div",{key:n,staticClass:"p-2"},[e("span",{staticClass:"abs-icons text-xl text-white/80 hover:text-white/100 cursor-pointer",class:"icon-".concat(n),on:{click:function(e){return t.select(n)}}})])]}))],2)])])],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{UiLibraryIcon:n(358).default})}}]);