(window.webpackJsonp=window.webpackJsonp||[]).push([[452],{853:function(t,e,n){var content=n(863);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(122).default)("f9b0fbe6",content,!0,{sourceMap:!1})},861:function(t,e,n){"use strict";n.r(e);var o=n(63),r=(n(4),n(8),n(7),{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[]}}},data:function(){return{}},computed:{files:{get:function(){return this.anexo},set:function(t){this.$emit("update:anexo",t)}}},methods:{addFile:function(t){var e=this;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"})},removeFile:function(t){this.files=this.files.filter((function(e){return e!==t}))}}}),l=(n(862),n(42)),component=Object(l.a)(r,(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("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(" "),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)],1)])})),1)],1)])}),[],!1,null,"5c227d86",null);e.default=component.exports},862:function(t,e,n){"use strict";n(853)},863:function(t,e,n){var o=n(121)(!1);o.push([t.i,".container[data-v-5c227d86]{cursor:pointer;width:auto;height:auto;border:2px dotted grey;display:flex;flex-direction:row;justify-content:center;align-items:center}.container h5[data-v-5c227d86]{font-family:sans-serif}",""]),t.exports=o}}]);
//# sourceMappingURL=320db46-1.2.11.js.map