(window.webpackJsonp=window.webpackJsonp||[]).push([[1374],{1728:function(t,e,n){var content=n(2361);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(122).default)("6a9be86b",content,!0,{sourceMap:!1})},2360:function(t,e,n){"use strict";n(1728)},2361:function(t,e,n){var o=n(121)(!1);o.push([t.i,".container{cursor:pointer;width:auto;height:110px;border:2px dotted grey;display:flex;flex-direction:row;justify-content:center;align-items:center}.container h5{font-family:sans-serif}",""]),t.exports=o},2925:function(t,e,n){"use strict";n.r(e);n(6),n(5),n(12),n(13);var o=n(63),r=n(2),c=(n(4),n(8),n(7),n(78));function l(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function f(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(e){Object(r.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):l(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var d={filters:{kb:function(t){return Math.floor(t/1024)}},props:{anexo:{type:Array,default:function(){return[]},required:!0},saveUpload:{type:Function,default:function(){return[]}},downloadArquivo:{type:Function,default:function(){return[]}},removerAnexo:{type:Function,default:function(){return[]}},blocked:{type:Boolean,default:function(){return!1}}},data:function(){return{}},computed:f(f({},Object(c.c)({isExterno:"usuario/isExterno"})),{},{files:{get:function(){return this.anexo},set:function(t){this.$emit("update:anexo",t)}},isBlockedEditAux:{get:function(){return this.blocked},set:function(t){this.$emit("update:blocked",t)}}}),methods:{addFile:function(t){var e=this;if(!1===this.isExterno&&!0===this.isBlockedEditAux)if(0===this.files.length){var n=t.dataTransfer.files;Object(o.a)(n).forEach((function(t){e.files.push(t),console.log(e.files),e.saveUpload()}))}else this.$notify({title:"Erro",text:"Já foi adicionado um arquivo.",type:"error"});else this.$notify({title:"Erro",text:"Usuário não pode adicionar o arquivo.",type:"error"})},removeFile:function(t){this.files=this.files.filter((function(e){return e!==t}))}}},v=(n(2360),n(42)),component=Object(v.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container",on:{drop:function(e){return e.preventDefault(),t.addFile.apply(null,arguments)},dragover:function(t){t.preventDefault()}}},[n("div",{staticClass:"box"},[0===t.files.length?n("div",[n("div",{staticClass:"d-flex justify-content-between"},[n("fa-icon",{staticClass:"mt-1",attrs:{icon:"upload"}}),t._v(" "),n("h5",{staticClass:"ml-2"},[t._v("Arraste um arquivo aqui.")])],1)]):n("b-list-group",t._l(t.files,(function(e,o){return n("b-list-group-item",{key:o},[void 0===e.idAnexo?n("div",{staticClass:"d-flex justify-content-between"},[n("div",{staticClass:"mt-2"},[t._v(t._s(e.name)+" ("+t._s(t._f("kb")(e.size))+" kb)")]),t._v("\n          "+t._s(t.isBlockedEditAux)+"\n          "),n("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{size:"sm",variant:"outline-danger",title:"Excluir Anexo"},on:{click:function(n){return t.removeFile(e)}}},[n("fa-icon",{attrs:{icon:"trash-alt"}})],1)],1):n("div",{staticClass:"d-flex justify-content-between"},[n("div",{staticClass:"mt-2 mr-2"},[t._v("\n            "+t._s(e.anexo.nome)+" ("+t._s(t._f("kb")(e.anexo.tamanho))+" kb)\n          ")]),t._v(" "),n("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"mr-1",attrs:{size:"sm",variant:"outline-success",title:"Download Anexo"},on:{click:function(n){return t.downloadArquivo(e)}}},[n("fa-icon",{attrs:{icon:"download"}})],1),t._v(" "),!1===t.isExterno&&!0===t.isBlockedEditAux?n("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{size:"sm",variant:"outline-danger",title:"Excluir Anexo"},on:{click:function(n){return t.removerAnexo(e)}}},[n("fa-icon",{attrs:{icon:"trash-alt"}})],1):t._e()],1)])})),1)],1)])}),[],!1,null,null,null);e.default=component.exports}}]);
//# sourceMappingURL=38510df-1.2.11.js.map