(window.webpackJsonp=window.webpackJsonp||[]).push([[133],{973:function(e,t,r){"use strict";r.r(t);r(5),r(4),r(149),r(162),r(19),r(178),r(31),r(38),r(69),r(52),r(10),r(75),r(79),r(57);var o=r(833),l=r(838);function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,n=!0,d=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return n=e.done,e},e:function(e){d=!0,l=e},f:function(){try{n||null==r.return||r.return()}finally{if(d)throw l}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}var d={mixins:[r(830).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)}}},created:function(){this.checkedFilters=[]},methods:{selectAll:function(){if(this.selectAllText="Selecionar Todos"===this.selectAllText?"Limpar tudo":"Selecionar Todos","Selecionar Todos"===this.selectAllText?this.allSelected=!1:this.allSelected=!0,this.allSelected){var e,t=n(this.options);try{for(t.s();!(e=t.n()).done;){var r=e.value;this.checkedFilters.push(r)}}catch(e){t.e(e)}finally{t.f()}}else this.checkedFilters=[]},hideDropdown:function(){this.dropdown=!1,this.activeTrigger=!1,o.a.to("#"+this.id,.2,{autoAlpha:0,y:-10,ease:l.b.easeOut})},showDropdown:function(){!1===this.dropdown?(this.dropdown=!0,this.activeTrigger=!0,o.a.fromTo("#"+this.id,.55,{autoAlpha:0,y:-10},{autoAlpha:1,y:0,ease:l.b.easeOut})):(this.dropdown=!1,this.activeTrigger=!1,o.a.to("#"+this.id,.2,{autoAlpha:0,y:-10,ease:l.b.easeOut}))}}},h=r(37),component=Object(h.a)(d,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{directives:[{name:"on-clickaway",rawName:"v-on-clickaway",value:e.hideDropdown,expression:"hideDropdown"}],staticClass:"checkbox-select my-2",attrs:{id:"app"}},[r("div",{staticClass:"custom-select",class:{isActive:e.activeTrigger},on:{click:e.showDropdown}},[e.checkedFilters.length>0?r("span",{staticClass:"checkbox-select__title"},[e._v(e._s(e.checkedFilters.length)+" Selecionados")]):r("span",{staticClass:"checkbox-select__title"},[e._v("Selecione...")])]),e._v(" "),r("div",{staticClass:"checkbox-select__dropdown",class:{activeSearch:e.showLoader},attrs:{id:e.id}},[r("div",{staticClass:"checkbox-select__search-wrapp"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.search,expression:"search"}],attrs:{placeholder:"Busque no filtro...",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(" "),r("b-row",[r("b-col",{staticClass:"d-flex justify-content-end mr-3",model:{value:e.selectAll,callback:function(t){e.selectAll=t},expression:"selectAll"}},[r("label",{attrs:{for:"selectAll"},on:{click:e.selectAll}},[e._v(e._s(e.selectAllText))])])],1),e._v(" "),r("div",{staticClass:"div-custom-control"},[r("ul",{staticClass:"checkbox-select__filters-wrapp",attrs:{id:"customScroll","data-simplebar-auto-hide":"false"}},[r("div",[e.filteredList.length>0?r("div",e._l(e.filteredList,(function(filter,t){return r("li",{key:t},[r("div",[r("b-form-checkbox",{attrs:{id:filter.descricao,value:filter.id},model:{value:e.checkedFilters,callback:function(t){e.checkedFilters=t},expression:"checkedFilters"}},[r("label",{attrs:{for:filter.descricao}},[e._v(e._s(filter.descricao))])])],1)])})),0):e._e(),e._v(" "),0==e.filteredList.length?r("div",[e._m(0)]):e._e()])])]),e._v(" "),r("b-row",[r("b-col",{staticClass:"d-flex justify-content-end mr-3"},[r("div",{staticClass:"font-weight-bold"},[e._v("\n          "+e._s(e.checkedFilters.length)+" Selecionados\n        ")])])],1)],1)])}),[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("li",[r("label",{attrs:{for:""}},[e._v("Não há dados.")])])}],!1,null,null,null);t.default=component.exports}}]);
//# sourceMappingURL=2092af1-1.2.10.js.map