(window.webpackJsonp=window.webpackJsonp||[]).push([[372],{1342:function(e,t,o){"use strict";o.r(t);o(6),o(5),o(7),o(4),o(12),o(8),o(13);var r=o(2),n=o(78),l=o(307);function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,o)}return t}var d={nome:"ModalImportarSegmento",components:{ValidationProvider:l.ValidationProvider,ValidationObserver:l.ValidationObserver},props:{findSegmentos:{type:Function,default:function(){return{}},required:!1}},data:function(){return{segmento:{}}},computed:function(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?c(Object(source),!0).forEach((function(t){Object(r.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):c(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}({},Object(n.c)({empresa:"empresa/empresaAtual",idTrecho:"cadastros/trechos/idTrecho",idRodovia:"cadastros/trechos/idRodovia"})),mounted:function(){var e=this;this.$root.$on("bv::modal::show",(function(t,o){"modalImportSegmento"===o&&(e.segmento={})}))},methods:{cancelModalImportSegmentos:function(){this.$bvModal.hide("modalImportSegmento")},saveModalImportSegmentos:function(){this.findSegmentos()},getValidationState:function(e){var t=e.dirty,o=e.validated,r=e.valid;return t||o?void 0===r?null:r:null}}},m=d,v=o(42),component=Object(v.a)(m,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("b-modal",{attrs:{id:"modalImportSegmento",centered:"","hide-header-close":"","hide-footer":""},scopedSlots:e._u([{key:"modal-header",fn:function(){return[o("div",{staticClass:"d-flex"},[o("h5",{staticClass:"mt-3"},[e._v("Importar Segmento")])])]},proxy:!0}])},[e._v(" "),o("validation-observer",{ref:"observer",scopedSlots:e._u([{key:"default",fn:function(t){var r=t.handleSubmit;return[o("b-form",{on:{submit:function(t){return t.stopPropagation(),t.preventDefault(),r(e.saveModalImportSegmentos)}}},[o("b-row",[o("b-col",{attrs:{md:"12",xl:"12"}},[o("validation-provider",{attrs:{name:"segmentosExistentes",rules:{required:!0}},scopedSlots:e._u([{key:"default",fn:function(t){return[o("b-form-group",{attrs:{label:"Segmentos existentes"}},[o("b-form-select",{attrs:{state:e.getValidationState(t)},scopedSlots:e._u([{key:"first",fn:function(){return[o("b-form-select-option",{attrs:{value:void 0,disabled:""}},[e._v("Selecione...")])]},proxy:!0}],null,!0),model:{value:e.segmento.segmentoExistente,callback:function(t){e.$set(e.segmento,"segmentoExistente",t)},expression:"segmento.segmentoExistente"}},[e._v(" "),o("b-form-select-option",{attrs:{value:"R"}},[e._v("Remover/Recriar importação")]),e._v(" "),o("b-form-select-option",{attrs:{value:"M"}},[e._v("Manter segmentos/Duplicar")])],1)],1)]}}],null,!0)})],1),e._v(" "),o("b-col",{attrs:{md:"12",xl:"12"}},[o("validation-provider",{attrs:{name:"anexo",rules:{required:!0}},scopedSlots:e._u([{key:"default",fn:function(t){return[o("b-form-group",{attrs:{label:"Anexo"}},[o("b-form-file",{attrs:{name:"anexo",placeholder:"Escolha um arquivo ou solte-o aqui...","drop-placeholder":"Solte o arquivo aqui...","browse-text":"Escolher",state:e.getValidationState(t)},model:{value:e.segmento.arquivo,callback:function(t){e.$set(e.segmento,"arquivo",t)},expression:"segmento.arquivo"}})],1)]}}],null,!0)})],1)],1),e._v(" "),o("b-row",{staticClass:"pt-3 border-top"},[o("b-col",{staticClass:"pl-2",attrs:{md:"8"}},[o("b-button",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"success",type:"submit"}},[o("fa-icon",{attrs:{icon:"save"}}),e._v(" "),o("span",{staticClass:"ml-1"},[e._v("Salvar")])],1),e._v(" "),o("b-button",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"outline-secondary"},on:{click:function(t){return e.cancelModalImportSegmentos()}}},[o("fa-icon",{attrs:{icon:"times"}}),e._v(" "),o("span",{staticClass:"ml-1"},[e._v("Cancelar")])],1)],1)],1)],1)]}}])})],1)}),[],!1,null,null,null);t.default=component.exports}}]);
//# sourceMappingURL=fb208ba-1.2.11.js.map