(window.webpackJsonp=window.webpackJsonp||[]).push([[370],{1344:function(e,t,r){"use strict";r.r(t);r(6),r(5),r(7),r(4),r(12),r(8),r(13);var o=r(2),n=r(78),d=r(307);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}var c={nome:"ModalAddCidade",components:{ValidationProvider:d.ValidationProvider,ValidationObserver:d.ValidationObserver},data:function(){return{cidade:{}}},computed:function(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(t){Object(o.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):l(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,r){"modalAddCidade"===r&&(e.cidade={})}))},methods:{cancelModalCidade:function(){this.$bvModal.hide("modalAddCidade")},saveCidade:function(){},getValidationState:function(e){var t=e.dirty,r=e.validated,o=e.valid;return t||r?void 0===o?null:o:null}}},f=c,m=r(42),component=Object(m.a)(f,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("b-modal",{attrs:{id:"modalAddCidade",centered:"","hide-header-close":"","hide-footer":""},scopedSlots:e._u([{key:"modal-header",fn:function(){return[r("div",{staticClass:"d-flex"},[r("h5",{staticClass:"mt-3"},[e._v("Adicionar Cidade")])])]},proxy:!0}])},[e._v(" "),r("validation-observer",{ref:"observer",scopedSlots:e._u([{key:"default",fn:function(t){var o=t.handleSubmit;return[r("b-form",{on:{submit:function(t){return t.stopPropagation(),t.preventDefault(),o(e.saveCidade)}}},[r("b-row",[r("b-col",{attrs:{md:"12",xl:"12"}},[r("validation-provider",{attrs:{name:"trecho",rules:{required:!0}},scopedSlots:e._u([{key:"default",fn:function(t){return[r("b-form-group",{attrs:{label:"Trecho"}},[r("b-form-select",{attrs:{state:e.getValidationState(t)},scopedSlots:e._u([{key:"first",fn:function(){return[r("b-form-select-option",{attrs:{value:void 0,disabled:""}},[e._v("Selecione...")])]},proxy:!0}],null,!0),model:{value:e.cidade.idTrecho,callback:function(t){e.$set(e.cidade,"idTrecho",t)},expression:"cidade.idTrecho"}})],1)]}}],null,!0)})],1),e._v(" "),r("b-col",{attrs:{md:"12",xl:"12"}},[r("validation-provider",{attrs:{name:"cidade",rules:{required:!0}},scopedSlots:e._u([{key:"default",fn:function(t){return[r("b-form-group",{attrs:{label:"Cidade"}},[r("b-form-select",{attrs:{state:e.getValidationState(t)},scopedSlots:e._u([{key:"first",fn:function(){return[r("b-form-select-option",{attrs:{value:void 0,disabled:""}},[e._v("Selecione...")])]},proxy:!0}],null,!0),model:{value:e.cidade.idCidade,callback:function(t){e.$set(e.cidade,"idCidade",t)},expression:"cidade.idCidade"}})],1)]}}],null,!0)})],1),e._v(" "),r("b-col",{attrs:{md:"6",xl:"6"}},[r("validation-provider",{attrs:{name:"kmInicial",rules:{required:!0}},scopedSlots:e._u([{key:"default",fn:function(t){return[r("b-form-group",{attrs:{label:"Km Inicial"}},[r("b-form-input",{attrs:{state:e.getValidationState(t),placeholder:"Informe o KM Inicial"},model:{value:e.cidade.kmInicial,callback:function(t){e.$set(e.cidade,"kmInicial",t)},expression:"cidade.kmInicial"}})],1)]}}],null,!0)})],1),e._v(" "),r("b-col",{attrs:{md:"6",xl:"6"}},[r("validation-provider",{attrs:{name:"kmFinal",rules:{required:!0}},scopedSlots:e._u([{key:"default",fn:function(t){return[r("b-form-group",{attrs:{label:"Km Final"}},[r("b-form-input",{attrs:{state:e.getValidationState(t),placeholder:"Informe o KM Final"},model:{value:e.cidade.kmFinal,callback:function(t){e.$set(e.cidade,"kmFinal",t)},expression:"cidade.kmFinal"}})],1)]}}],null,!0)})],1)],1),e._v(" "),r("b-row",{staticClass:"pt-3 border-top"},[r("b-col",{staticClass:"pl-2",attrs:{md:"8"}},[r("b-button",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"success",type:"submit"}},[r("fa-icon",{attrs:{icon:"save"}}),e._v(" "),r("span",{staticClass:"ml-1"},[e._v("Salvar")])],1),e._v(" "),r("b-button",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"outline-secondary"},on:{click:function(t){return e.cancelModalCidade()}}},[r("fa-icon",{attrs:{icon:"times"}}),e._v(" "),r("span",{staticClass:"ml-1"},[e._v("Cancelar")])],1)],1)],1)],1)]}}])})],1)}),[],!1,null,null,null);t.default=component.exports}}]);
//# sourceMappingURL=1f6e7f5-1.2.11.js.map