(window.webpackJsonp=window.webpackJsonp||[]).push([[355],{1154:function(t,e,c){"use strict";c.r(e);c(152),c(153);var l={props:{data:{type:Object,default:function(){}}},data:function(){return{editing:!1,fields:[{key:"descricao",label:"Descrição",sortable:!0},{key:"dataCadastro",label:"Data cadastro",sortable:!0},{key:"dataAlterecao",label:"Data alteração",sortable:!0}],subtema:{}}},computed:{item:{get:function(){return this.data||{}},set:function(data){this.$emit("update:data",data)}}},methods:{cancelTemasModal:function(){this.$bvModal.hide("editTemasModal"),this.editing=!1,this.subtema={}},editSubtema:function(t){this.item.subtemas.includes(t)?this.subtema=t:this.subtema={},this.editing=!0}}},o=c(42),component=Object(o.a)(l,(function(){var t=this,e=t.$createElement,c=t._self._c||e;return c("b-modal",{attrs:{id:"editTemasModal",size:"md",scrollable:"",centered:"","hide-header-close":"","hide-footer":""},scopedSlots:t._u([{key:"modal-header",fn:function(){return[c("div",{staticClass:"d-flex"},[c("fa-icon",{staticStyle:{"font-size":"1.3rem","margin-top":"15px"},attrs:{icon:"tools"}}),t._v(" "),c("h4",{staticClass:"ml-3 mt-3"},[t._v("Temas")])],1)]},proxy:!0}])},[t._v(" "),c("b-form",[c("b-col",[c("b-row",{staticClass:"mt-2 mb-3"},[c("b-col",[c("b-form-group",{attrs:{label:"Descrição"}},[c("b-form-input",{attrs:{placeholder:"Descrição"},model:{value:t.item.descricao,callback:function(e){t.$set(t.item,"descricao",e)},expression:"item.descricao"}})],1)],1)],1),t._v(" "),t.item.descricao?c("b-tabs",[c("b-tab",{attrs:{title:"Subtema",active:""}},[c("b-col",[!1===t.editing?c("b-row",[c("b-btn",{staticClass:"my-3 ml-3",attrs:{size:"sm",variant:"primary"},on:{click:t.editSubtema}},[c("fa-icon",{attrs:{icon:"plus"}}),t._v(" "),c("span",{staticClass:"ml-1"},[t._v("Adicionar")])],1)],1):c("b-row",[c("b-col",{attrs:{sm:"6"}},[c("b-form-group",{attrs:{label:"Descrição"}},[c("b-form-input",{model:{value:t.subtema.descricao,callback:function(e){t.$set(t.subtema,"descricao",e)},expression:"subtema.descricao"}})],1)],1),t._v(" "),c("b-col",{staticClass:"d-flex align-items-center"},[c("b-btn",{attrs:{size:"sm",variant:"primary"}},[c("fa-icon",{attrs:{icon:"save"}}),t._v(" "),c("span",{staticClass:"ml-1"},[t._v("Salvar subtema")])],1)],1),t._v(" "),c("b-col",{staticClass:"d-flex align-items-center"},[c("b-btn",{attrs:{size:"sm",variant:"primary"}},[c("fa-icon",{attrs:{icon:"times"}}),t._v(" "),c("span",{staticClass:"ml-1"},[t._v("Cancelar subtema")])],1)],1)],1),t._v(" "),c("b-table",{attrs:{"empty-text":"Este tema não tem subtemas","show-empty":"",fields:t.fields,items:t.item.subtemas,selectable:"",hover:!0},on:{"row-clicked":t.editSubtema}})],1)],1)],1):t._e(),t._v(" "),c("b-row",{staticClass:"mt-2"},[c("b-col",[c("b-btn",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"primary",type:"submit"}},[c("fa-icon",{attrs:{icon:"save"}}),t._v(" "),c("span",{staticClass:"ml-1"},[t._v("Salvar")])],1),t._v(" "),c("b-btn",{staticClass:"my-2 ml-2 rounded",attrs:{size:"sm",variant:"outline-secondary"},on:{click:t.cancelTemasModal}},[c("fa-icon",{attrs:{icon:"times"}}),t._v(" "),c("span",{staticClass:"ml-1"},[t._v("Cancelar")])],1)],1),t._v(" "),t._e()],1)],1)],1)],1)}),[],!1,null,null,null);e.default=component.exports}}]);
//# sourceMappingURL=175790a-1.2.11.js.map