(window.webpackJsonp=window.webpackJsonp||[]).push([[181,170,178,184,209,744],{842:function(e,t,c){"use strict";c.r(t);c(7),c(4),c(152),c(153),c(17),c(182),c(38);var l=c(848),o=c(886),r={mixins:[c(847).mixin],props:{id:{type:String,default:function(){}},options:{type:Array,default:function(){return[]}},selected:{type:Array,default:function(){return[]}}},data:function(){return{search:"",allSelected:!1,selectAllText:"Selecionar Todos",activeTrigger:!1,dropdown:!1,showLoader:!1}},computed:{filteredList:function(){var e=this;return this.options.filter((function(t){return t.descricao.toLowerCase().includes(e.search.toLowerCase())}))},checkedFilters:{get:function(){return this.selected},set:function(e){this.$emit("update:selected",e),this.$emit("change",e)}}},created:function(){},methods:{selectAll:function(){this.selectAllText="Selecionar Todos"===this.selectAllText?"Limpar tudo":"Selecionar Todos",this.allSelected=!("Selecionar Todos"===this.selectAllText),this.allSelected?this.checkedFilters=this.options.map((function(option){return option.id})):this.checkedFilters=[]},hideDropdown:function(){this.dropdown=!1,this.activeTrigger=!1,l.b.to("#"+this.id,{autoAlpha:0,y:-10,ease:o.b.easeOut,duration:.2})},showDropdown:function(){!1===this.dropdown?(this.dropdown=!0,this.activeTrigger=!0,l.b.fromTo("#"+this.id,{autoAlpha:0,y:-10},{autoAlpha:1,y:5,ease:o.b.easeOut,duration:.55})):(this.dropdown=!1,this.activeTrigger=!1,l.b.to("#"+this.id,{autoAlpha:0,y:-10,ease:o.b.easeOut,duration:.2}))}}},n=c(42),component=Object(n.a)(r,(function(){var e=this,t=e.$createElement,c=e._self._c||t;return c("div",{directives:[{name:"on-clickaway",rawName:"v-on-clickaway",value:e.hideDropdown,expression:"hideDropdown"}],staticClass:"checkbox-select",style:{"z-index":e.activeTrigger?10:null},attrs:{id:"app"}},[c("div",{staticClass:"custom-select",class:{isActive:e.activeTrigger},style:{cursor:"default"},on:{click:e.showDropdown}},[e.checkedFilters.length>0?c("span",{staticClass:"checkbox-select__title"},[e._v("\n      "+e._s(e.checkedFilters.length)+"\n      "),e.checkedFilters.length>1?c("span",[e._v("Selecionados")]):c("span",[e._v("Selecionado")])]):c("span",{staticClass:"checkbox-select__title"},[e._v("Selecione...")])]),e._v(" "),c("div",{staticClass:"checkbox-select__dropdown",class:{activeSearch:e.showLoader},attrs:{id:e.id}},[c("div",{staticClass:"checkbox-select__search-wrapp"},[c("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],attrs:{placeholder:"Localizar...",type:"text"},domProps:{value:e.search},on:{focus:function(t){e.showLoader=!0},blur:function(t){e.showLoader=!1},input:function(t){t.target.composing||(e.search=t.target.value)}}})]),e._v(" "),c("b-row",[c("b-col",{staticClass:"d-flex justify-content-end mr-3",model:{value:e.selectAll,callback:function(t){e.selectAll=t},expression:"selectAll"}},[c("label",{attrs:{for:"selectAll"},on:{click:e.selectAll}},[e._v(e._s(e.selectAllText))])])],1),e._v(" "),c("div",{staticClass:"div-custom-control"},[c("ul",{staticClass:"checkbox-select__filters-wrapp",attrs:{id:"customScroll","data-simplebar-auto-hide":"false"}},[c("div",[e.filteredList.length>0?c("div",e._l(e.filteredList,(function(filter,t){return c("li",{key:t},[c("div",[c("b-form-checkbox",{attrs:{id:filter.descricao,value:filter.id},model:{value:e.checkedFilters,callback:function(t){e.checkedFilters=t},expression:"checkedFilters"}},[c("label",{attrs:{for:filter.descricao}},[e._v(e._s(filter.descricao))])])],1)])})),0):c("div",[e._m(0)])])])]),e._v(" "),c("b-row",[c("b-col",{staticClass:"d-flex justify-content-end mr-3"},[c("div",{staticClass:"font-weight-bold"},[e._v("\n          "+e._s(e.checkedFilters.length)+"\n          "),e.checkedFilters.length>1?c("span",[e._v("Selecionados")]):c("span",[e._v("Selecionado")])])])],1)],1)])}),[function(){var e=this,t=e.$createElement,c=e._self._c||t;return c("li",[c("label",{attrs:{for:""}},[e._v("Não há dados.")])])}],!1,null,null,null);t.default=component.exports}}]);
//# sourceMappingURL=35fe42c-1.2.11.js.map