(window.webpackJsonp=window.webpackJsonp||[]).push([[752],{1478:function(t,e,o){"use strict";o.r(e);o(6),o(5),o(7),o(4),o(12),o(8),o(13);var n=o(2),r=o(78),d=o(307);function l(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,o)}return e}function c(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(n.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 m={components:{ValidationProvider:d.ValidationProvider,ValidationObserver:d.ValidationObserver},props:{dados:{type:Object,default:function(){return{}}},saveCampos:{type:Function,default:function(){return[]}}},data:function(){return{tiposCampo:["Texto","Número Inteiro","Número de dupla precisão","Número de precisão exata","Data e Hora","Caixa de seleção"]}},computed:c(c({},Object(r.c)({empresa:"empresa/empresaAtual"})),{},{dadosComputados:{get:function(){return this.dados},set:function(t){this.$emit("update:dados",t)}}}),mounted:function(){},methods:{save:function(){this.saveCampos(),this.$bvModal.hide("editCampoModal")},closeModal:function(){this.$bvModal.hide("editCampoModal")},delete:function(){},getValidationState:function(t){var e=t.dirty,o=t.validated,n=t.valid;return e||o?n:null}}},f=o(42),component=Object(f.a)(m,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("b-modal",{attrs:{id:"editCampoModal",size:"md",centered:"","hide-header-close":"","hide-footer":""},scopedSlots:t._u([{key:"modal-header",fn:function(){return[o("h4",[t._v("\n      "+t._s(null==t.dadosComputados.id?"Adicionar Campo":"Editar Campo")+"\n    ")])]},proxy:!0}])},[t._v(" "),o("validation-observer",{ref:"observer",scopedSlots:t._u([{key:"default",fn:function(e){var n=e.handleSubmit;return[o("b-form",{on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),n(t.save)}}},[o("b-row",[o("b-col",{attrs:{sm:"12"}},[o("validation-provider",{attrs:{name:"nome",rules:{required:!0}},scopedSlots:t._u([{key:"default",fn:function(e){return[o("b-form-group",{attrs:{label:"Nome"}},[o("b-form-input",{attrs:{placeholder:"Nome",state:t.getValidationState(e)},model:{value:t.dadosComputados.nomeCampo,callback:function(e){t.$set(t.dadosComputados,"nomeCampo",e)},expression:"dadosComputados.nomeCampo"}})],1)]}}],null,!0)})],1),t._v(" "),o("b-col",{attrs:{sm:"12"}},[o("b-form-group",{attrs:{label:"Tipo de campo"}},[o("b-form-select",{attrs:{options:t.tiposCampo},scopedSlots:t._u([{key:"first",fn:function(){return[o("b-form-select-option",{attrs:{value:void 0}},[t._v("\n                  Selecione...\n                ")])]},proxy:!0}],null,!0),model:{value:t.dadosComputados.tipoCampo,callback:function(e){t.$set(t.dadosComputados,"tipoCampo",e)},expression:"dadosComputados.tipoCampo"}})],1)],1),t._v(" "),o("b-col",[o("b-form-checkbox",{attrs:{name:"checkbox-1",value:"Sim","unchecked-value":"Não"},model:{value:t.dadosComputados.nullable,callback:function(e){t.$set(t.dadosComputados,"nullable",e)},expression:"dadosComputados.nullable"}},[t._v("\n            Pode ser nulo?\n          ")])],1)],1),t._v(" "),o("b-row",{staticClass:"mt-3 pt-1 border-top"},[o("b-col",{staticClass:"pl-2",attrs:{md:"8"}},[o("b-button",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"primary",type:"submit"}},[o("fa-icon",{attrs:{icon:"save"}}),t._v(" "),o("span",{staticClass:"ml-1"},[t._v("Salvar")])],1),t._v(" "),o("b-button",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"outline-secondary"},on:{click:t.closeModal}},[o("fa-icon",{attrs:{icon:"times"}}),t._v(" "),o("span",{staticClass:"ml-1"},[t._v("Cancelar")])],1)],1),t._v(" "),o("b-col",{staticClass:"d-flex justify-content-end",attrs:{md:"4"}},[void 0!==t.dadosComputados.id?o("b-button",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"outline-danger"}},[o("fa-icon",{attrs:{icon:"trash-alt"}}),t._v(" "),o("span",{staticClass:"ml-1"},[t._v("Excluir")])],1):t._e()],1)],1)],1)]}}])})],1)}),[],!1,null,null,null);e.default=component.exports}}]);
//# sourceMappingURL=0e76f70-1.2.11.js.map