(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[25],{

/***/ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?vue&type=script&lang=js&":
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?vue&type=script&lang=js& ***!
  \************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var bootstrap_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! bootstrap-vue */ \"./node_modules/bootstrap-vue/esm/index.js\");\n/* harmony import */ var vue_select__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue-select */ \"./node_modules/vue-select/dist/vue-select.js\");\n/* harmony import */ var vue_select__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vue_select__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var vue_ripple_directive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-ripple-directive */ \"./node_modules/vue-ripple-directive/src/ripple.js\");\n/* harmony import */ var _vue_composition_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @vue/composition-api */ \"./node_modules/@vue/composition-api/dist/vue-composition-api.mjs\");\n\nvar _excluded = [\"posicion\", \"last\"];\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  components: {\n    BButton: bootstrap_vue__WEBPACK_IMPORTED_MODULE_1__[\"BButton\"],\n    BModal: bootstrap_vue__WEBPACK_IMPORTED_MODULE_1__[\"BModal\"],\n    BForm: bootstrap_vue__WEBPACK_IMPORTED_MODULE_1__[\"BForm\"],\n    BFormInput: bootstrap_vue__WEBPACK_IMPORTED_MODULE_1__[\"BFormInput\"],\n    BFormGroup: bootstrap_vue__WEBPACK_IMPORTED_MODULE_1__[\"BFormGroup\"],\n    vSelect: vue_select__WEBPACK_IMPORTED_MODULE_2___default.a,\n    BSpinner: bootstrap_vue__WEBPACK_IMPORTED_MODULE_1__[\"BSpinner\"]\n  },\n  directives: {\n    \"b-modal\": bootstrap_vue__WEBPACK_IMPORTED_MODULE_1__[\"VBModal\"],\n    Ripple: vue_ripple_directive__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n  },\n  props: {\n    showModal: {\n      type: Object,\n      required: true\n    },\n    column: {\n      type: Object,\n      required: true\n    },\n    states: {\n      type: Object,\n      required: true\n    },\n    reset: {\n      type: Function,\n      required: true\n    }\n  },\n  setup: function setup(props, ctx) {\n    var form = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_4__[\"ref\"])();\n\n    var handleSubmit = function handleSubmit() {};\n\n    var _props$column = props.column,\n        posicion = _props$column.posicion,\n        last = _props$column.last,\n        campos = Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_props$column, _excluded);\n\n    var handleOk = function handleOk(bvModalEvt) {\n      // Prevent modal from closing\n      bvModalEvt.preventDefault();\n      var valid = ctx.refs.form.checkValidity(); //esta dentro de HTMLFormElement las props\n\n      for (var key in campos) {\n        // dentro de ctx.refs.form.elements[key].HTMLInputElement\n        //props.states[key].status = ctx.refs.form.elements[key].validity.valid;\n        props.states[key].mensaje = \"Este campo es obligatorio\";\n      }\n\n      if (valid) {\n        ctx.emit(\"add-column\");\n      }\n    };\n\n    return {\n      form: form,\n      handleSubmit: handleSubmit,\n      handleOk: handleOk\n    };\n  }\n});\n\n//# sourceURL=webpack:///./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"5c469c4f-vue-loader-template\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?vue&type=template&id=570d22e0&":
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5c469c4f-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?vue&type=template&id=570d22e0& ***!
  \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\n    \"b-modal\",\n    {\n      ref: \"columna-modal\",\n      attrs: {\n        id: \"modal-columna\",\n        \"cancel-variant\": \"outline-secondary\",\n        \"ok-title\": \"Agregar\",\n        \"cancel-title\": \"Cancelar\",\n        centered: \"\",\n        title: \"Agregar columna\",\n        \"no-close-on-backdrop\": \"\",\n        size: \"sm\"\n      },\n      on: { cancel: _vm.reset, ok: _vm.handleOk },\n      model: {\n        value: _vm.showModal.mostrar,\n        callback: function($$v) {\n          _vm.$set(_vm.showModal, \"mostrar\", $$v)\n        },\n        expression: \"showModal.mostrar\"\n      }\n    },\n    [\n      _c(\n        \"form\",\n        {\n          ref: \"form\",\n          on: {\n            submit: function($event) {\n              $event.stopPropagation()\n              $event.preventDefault()\n              return _vm.handleSubmit($event)\n            }\n          }\n        },\n        [\n          _c(\n            \"b-form-group\",\n            {\n              attrs: {\n                state: _vm.states.etiqueta.status,\n                label: \"Nombre\",\n                \"label-for\": \"etiqueta\",\n                \"invalid-feedback\": _vm.states.etiqueta.mensaje\n              }\n            },\n            [\n              _c(\"b-form-input\", {\n                attrs: {\n                  id: \"etiqueta\",\n                  placeholder: \"Nombre\",\n                  state: _vm.states.etiqueta.status,\n                  required: \"\"\n                },\n                model: {\n                  value: _vm.column.etiqueta,\n                  callback: function($$v) {\n                    _vm.$set(_vm.column, \"etiqueta\", $$v)\n                  },\n                  expression: \"column.etiqueta\"\n                }\n              })\n            ],\n            1\n          )\n        ],\n        1\n      )\n    ]\n  )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%225c469c4f-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");

/***/ }),

/***/ "./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue":
/*!********************************************************************************************************************************!*\
  !*** ./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue ***!
  \********************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ModalColumn_vue_vue_type_template_id_570d22e0___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ModalColumn.vue?vue&type=template&id=570d22e0& */ \"./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?vue&type=template&id=570d22e0&\");\n/* harmony import */ var _ModalColumn_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ModalColumn.vue?vue&type=script&lang=js& */ \"./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n  _ModalColumn_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _ModalColumn_vue_vue_type_template_id_570d22e0___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n  _ModalColumn_vue_vue_type_template_id_570d22e0___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack:///./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?");

/***/ }),

/***/ "./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?vue&type=script&lang=js&":
/*!*********************************************************************************************************************************************************!*\
  !*** ./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?vue&type=script&lang=js& ***!
  \*********************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ModalColumn_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../../../../../node_modules/babel-loader/lib!../../../../../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./ModalColumn.vue?vue&type=script&lang=js& */ \"./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ModalColumn_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack:///./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?");

/***/ }),

/***/ "./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?vue&type=template&id=570d22e0&":
/*!***************************************************************************************************************************************************************!*\
  !*** ./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?vue&type=template&id=570d22e0& ***!
  \***************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_5c469c4f_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ModalColumn_vue_vue_type_template_id_570d22e0___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../../../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"5c469c4f-vue-loader-template\"}!../../../../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../../../../../node_modules/vue-loader/lib??vue-loader-options!./ModalColumn.vue?vue&type=template&id=570d22e0& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"5c469c4f-vue-loader-template\\\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?vue&type=template&id=570d22e0&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_5c469c4f_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ModalColumn_vue_vue_type_template_id_570d22e0___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_5c469c4f_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ModalColumn_vue_vue_type_template_id_570d22e0___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack:///./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/ModalColumn.vue?");

/***/ }),

/***/ "./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/useEquivalentesPorComida.js":
/*!********************************************************************************************************************************************!*\
  !*** ./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/useEquivalentesPorComida.js ***!
  \********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2 */ \"./node_modules/@babel/runtime/helpers/esm/objectSpread2.js\");\n/* harmony import */ var regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! regenerator-runtime/runtime.js */ \"./node_modules/regenerator-runtime/runtime.js\");\n/* harmony import */ var regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var vue_toastification_composition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-toastification/composition */ \"./node_modules/vue-toastification/composition/index.js\");\n/* harmony import */ var vue_toastification_composition__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue_toastification_composition__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @core/components/toastification/ToastificationContent.vue */ \"./src/@core/components/toastification/ToastificationContent.vue\");\n/* harmony import */ var _services_DietService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/services/DietService */ \"./src/services/DietService.js\");\n/* harmony import */ var _vue_composition_api__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @vue/composition-api */ \"./node_modules/@vue/composition-api/dist/vue-composition-api.mjs\");\n\n\n\n\n// import {ref, watch, reactive} from '@vue/composition-api';\n// Notification\n\n\n\n\n\nvar useEquivalentesPorComida = function useEquivalentesPorComida() {\n  // Use toast\n  var toast = Object(vue_toastification_composition__WEBPACK_IMPORTED_MODULE_4__[\"useToast\"])();\n  var saving = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])(false);\n  var loading = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])(false);\n  var mostrarGuardar = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])(false);\n  var alimentos = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])([]);\n  var pKcal = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])();\n  var pProt = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])();\n  var pCarbo = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])();\n  var lpKcal = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])();\n  var lpProt = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])();\n  var lpCarbo = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])();\n  var visible = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])();\n  var column = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"reactive\"])({\n    etiqueta: '',\n    valor: 0,\n    last: false,\n    posicion: 0\n  });\n  var columns = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])([]);\n  var states = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"reactive\"])({\n    etiqueta: {\n      status: null,\n      mensaje: ''\n    },\n    valor: {\n      status: null,\n      mensaje: ''\n    }\n  });\n  var columnsBase = [{\n    etiqueta: \"Antes del desayuno\",\n    posicion: 0,\n    valor: 0\n  }, {\n    etiqueta: \"Desayuno\",\n    posicion: 1,\n    valor: 0\n  }, {\n    etiqueta: \"Colación\",\n    posicion: 2,\n    valor: 0\n  }, {\n    etiqueta: \"Comida\",\n    posicion: 3,\n    valor: 0\n  }, {\n    etiqueta: \"Colación\",\n    posicion: 4,\n    valor: 0\n  }, {\n    etiqueta: \"Cena\",\n    posicion: 5,\n    valor: 0\n  }];\n\n  var addAcumulado = function addAcumulado(item) {\n    return Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, item), {}, {\n      acumulado: item.totalAlimentos\n    });\n  };\n\n  var addAcumuladoS = function addAcumuladoS(item) {\n    return Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, item);\n  };\n\n  var getTipoDieta = /*#__PURE__*/function () {\n    var _ref = Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/regeneratorRuntime.mark(function _callee(idTipo, idDieta) {\n      var response, cols;\n      return regeneratorRuntime.wrap(function _callee$(_context) {\n        while (1) {\n          switch (_context.prev = _context.next) {\n            case 0:\n              loading.value = true;\n              columns.value = [];\n              alimentos.value = [];\n              pKcal.value = null;\n              pProt.value = null;\n              pCarbo.value = null;\n              _context.prev = 6;\n              _context.next = 9;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_6__[\"default\"].getTipoById(idTipo, idDieta);\n\n            case 9:\n              response = _context.sent;\n              loading.value = false;\n              alimentos.value = response.data.cuerpo;\n              lpKcal.value = response.data.cuerpo[1][0].porcentaje;\n              lpProt.value = response.data.cuerpo[1][1].porcentaje;\n              lpCarbo.value = response.data.cuerpo[1][2].porcentaje;\n              pKcal.value = parseFloat(response.data.cuerpo[1][0].porcentaje);\n              pProt.value = parseFloat(response.data.cuerpo[1][1].porcentaje);\n              pCarbo.value = parseFloat(response.data.cuerpo[1][2].porcentaje); //alimentos.value = response.data.cuerpo.map(addAcumulado)\n\n              if (alimentos.value[0].length) {\n                cols = alimentos.value[0][0].columns.map(function (_ref2) {\n                  var etiqueta = _ref2.etiqueta,\n                      posicion = _ref2.posicion;\n                  return {\n                    etiqueta: etiqueta,\n                    posicion: posicion\n                  };\n                });\n                columns.value = cols;\n              }\n\n              mostrarGuardar.value = true;\n              return _context.abrupt(\"return\", response);\n\n            case 23:\n              _context.prev = 23;\n              _context.t0 = _context[\"catch\"](6);\n              loading.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n                props: {\n                  title: \"Error al cargar Dieta\",\n                  icon: 'AlertTriangleIcon',\n                  variant: 'danger'\n                }\n              });\n\n            case 27:\n            case \"end\":\n              return _context.stop();\n          }\n        }\n      }, _callee, null, [[6, 23]]);\n    }));\n\n    return function getTipoDieta(_x, _x2) {\n      return _ref.apply(this, arguments);\n    };\n  }();\n\n  var fetchAlimentos = /*#__PURE__*/function () {\n    var _ref3 = Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(idDietaPaciente) {\n      var response, cols;\n      return regeneratorRuntime.wrap(function _callee2$(_context2) {\n        while (1) {\n          switch (_context2.prev = _context2.next) {\n            case 0:\n              loading.value = true;\n              pKcal.value = null;\n              pProt.value = null;\n              pCarbo.value = null;\n              lpKcal.value = null;\n              lpProt.value = null;\n              lpCarbo.value = null;\n              _context2.prev = 7;\n              _context2.next = 10;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_6__[\"default\"].fetchDietaPorComida(idDietaPaciente);\n\n            case 10:\n              response = _context2.sent;\n              loading.value = false;\n              alimentos.value = response.data.cuerpo;\n              visible.value = alimentos.value[2].visible; //alimentos.value = response.data.cuerpo.map(addAcumulado)\n\n              if (alimentos.value[0][0].columns.length) {\n                cols = alimentos.value[0][0].columns.map(function (_ref4) {\n                  var id = _ref4.id,\n                      etiqueta = _ref4.etiqueta,\n                      posicion = _ref4.posicion;\n                  return {\n                    id: id,\n                    etiqueta: etiqueta,\n                    posicion: posicion\n                  };\n                });\n                columns.value = cols;\n              }\n\n              return _context2.abrupt(\"return\", response);\n\n            case 18:\n              _context2.prev = 18;\n              _context2.t0 = _context2[\"catch\"](7);\n              loading.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n                props: {\n                  title: \"Error al cargar dieta por comida\",\n                  icon: 'AlertTriangleIcon',\n                  variant: 'danger'\n                }\n              });\n\n            case 22:\n            case \"end\":\n              return _context2.stop();\n          }\n        }\n      }, _callee2, null, [[7, 18]]);\n    }));\n\n    return function fetchAlimentos(_x3) {\n      return _ref3.apply(this, arguments);\n    };\n  }();\n\n  var agregarD = /*#__PURE__*/function () {\n    var _ref5 = Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(id, data) {\n      var response;\n      return regeneratorRuntime.wrap(function _callee3$(_context3) {\n        while (1) {\n          switch (_context3.prev = _context3.next) {\n            case 0:\n              loading.value = true;\n              _context3.prev = 1;\n              _context3.next = 4;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_6__[\"default\"].agregarDiaM(id, data);\n\n            case 4:\n              response = _context3.sent;\n              loading.value = false;\n              return _context3.abrupt(\"return\", response);\n\n            case 9:\n              _context3.prev = 9;\n              _context3.t0 = _context3[\"catch\"](1);\n              loading.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n                props: {\n                  title: \"Error al agregar días\",\n                  icon: 'AlertTriangleIcon',\n                  variant: 'danger'\n                }\n              });\n\n            case 13:\n            case \"end\":\n              return _context3.stop();\n          }\n        }\n      }, _callee3, null, [[1, 9]]);\n    }));\n\n    return function agregarD(_x4, _x5) {\n      return _ref5.apply(this, arguments);\n    };\n  }();\n\n  var update = /*#__PURE__*/function () {\n    var _ref6 = Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(idDietaPaciente, data) {\n      var response;\n      return regeneratorRuntime.wrap(function _callee4$(_context4) {\n        while (1) {\n          switch (_context4.prev = _context4.next) {\n            case 0:\n              saving.value = true;\n              _context4.prev = 1;\n              _context4.next = 4;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_6__[\"default\"].updateDietaPorComida(idDietaPaciente, data);\n\n            case 4:\n              response = _context4.sent;\n              saving.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n                props: {\n                  title: \"Datos actualizados Correctamente!\",\n                  icon: 'CheckCircleIcon',\n                  variant: 'success'\n                }\n              }); //fetchAlimentos(idDietaPaciente)\n\n              return _context4.abrupt(\"return\", response);\n\n            case 10:\n              _context4.prev = 10;\n              _context4.t0 = _context4[\"catch\"](1);\n              saving.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n                props: {\n                  title: \"Error al actualizar\",\n                  icon: 'AlertTriangleIcon',\n                  variant: 'danger'\n                }\n              });\n              throw _context4.t0;\n\n            case 15:\n            case \"end\":\n              return _context4.stop();\n          }\n        }\n      }, _callee4, null, [[1, 10]]);\n    }));\n\n    return function update(_x6, _x7) {\n      return _ref6.apply(this, arguments);\n    };\n  }();\n\n  var eliminar = /*#__PURE__*/function () {\n    var _ref7 = Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(id, posicion) {\n      var response;\n      return regeneratorRuntime.wrap(function _callee5$(_context5) {\n        while (1) {\n          switch (_context5.prev = _context5.next) {\n            case 0:\n              saving.value = true;\n              _context5.prev = 1;\n              _context5.next = 4;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_6__[\"default\"].eliminarC(id, posicion);\n\n            case 4:\n              response = _context5.sent;\n              saving.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n                props: {\n                  title: \"Datos actualizados Correctamente!\",\n                  icon: 'CheckCircleIcon',\n                  variant: 'success'\n                }\n              });\n              return _context5.abrupt(\"return\", response);\n\n            case 10:\n              _context5.prev = 10;\n              _context5.t0 = _context5[\"catch\"](1);\n              saving.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n                props: {\n                  title: \"Error al actualizar\",\n                  icon: 'AlertTriangleIcon',\n                  variant: 'danger'\n                }\n              });\n              throw _context5.t0;\n\n            case 15:\n            case \"end\":\n              return _context5.stop();\n          }\n        }\n      }, _callee5, null, [[1, 10]]);\n    }));\n\n    return function eliminar(_x8, _x9) {\n      return _ref7.apply(this, arguments);\n    };\n  }();\n\n  var resetColumn = function resetColumn() {\n    column.etiqueta = '';\n    column.valor = 0;\n    column.posicion = 0;\n    column.last = false;\n    states.etiqueta.status = null;\n    states.etiqueta.mensaje = '';\n    states.valor.status = null;\n    states.valor.mensaje = '';\n  };\n\n  var seleccionarD = /*#__PURE__*/function () {\n    var _ref8 = Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(idMonitoreo, opcion) {\n      var response;\n      return regeneratorRuntime.wrap(function _callee6$(_context6) {\n        while (1) {\n          switch (_context6.prev = _context6.next) {\n            case 0:\n              loading.value = true;\n              _context6.prev = 1;\n              _context6.next = 4;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_6__[\"default\"].guardaSeleccion(idMonitoreo, opcion);\n\n            case 4:\n              response = _context6.sent;\n              loading.value = false;\n              return _context6.abrupt(\"return\", response);\n\n            case 9:\n              _context6.prev = 9;\n              _context6.t0 = _context6[\"catch\"](1);\n              loading.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n                props: {\n                  title: \"Error al guardar opcion seleccionada\",\n                  icon: 'AlertTriangleIcon',\n                  variant: 'danger'\n                }\n              });\n\n            case 13:\n            case \"end\":\n              return _context6.stop();\n          }\n        }\n      }, _callee6, null, [[1, 9]]);\n    }));\n\n    return function seleccionarD(_x10, _x11) {\n      return _ref8.apply(this, arguments);\n    };\n  }();\n\n  var editarCol = /*#__PURE__*/function () {\n    var _ref9 = Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(id, posicion, form) {\n      var response;\n      return regeneratorRuntime.wrap(function _callee7$(_context7) {\n        while (1) {\n          switch (_context7.prev = _context7.next) {\n            case 0:\n              loading.value = true;\n              _context7.prev = 1;\n              _context7.next = 4;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_6__[\"default\"].editarC(id, posicion, form);\n\n            case 4:\n              response = _context7.sent;\n              loading.value = false;\n              return _context7.abrupt(\"return\", response);\n\n            case 9:\n              _context7.prev = 9;\n              _context7.t0 = _context7[\"catch\"](1);\n              loading.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n                props: {\n                  title: \"Error al editar columna\",\n                  icon: 'AlertTriangleIcon',\n                  variant: 'danger'\n                }\n              });\n\n            case 13:\n            case \"end\":\n              return _context7.stop();\n          }\n        }\n      }, _callee7, null, [[1, 9]]);\n    }));\n\n    return function editarCol(_x12, _x13, _x14) {\n      return _ref9.apply(this, arguments);\n    };\n  }();\n\n  return {\n    mostrarGuardar: mostrarGuardar,\n    editarCol: editarCol,\n    visible: visible,\n    seleccionarD: seleccionarD,\n    alimentos: alimentos,\n    fetchAlimentos: fetchAlimentos,\n    loading: loading,\n    agregarD: agregarD,\n    column: column,\n    resetColumn: resetColumn,\n    eliminar: eliminar,\n    getTipoDieta: getTipoDieta,\n    columns: columns,\n    states: states,\n    pCarbo: pCarbo,\n    pKcal: pKcal,\n    pProt: pProt,\n    lpCarbo: lpCarbo,\n    lpKcal: lpKcal,\n    lpProt: lpProt,\n    update: update,\n    saving: saving\n  };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (useEquivalentesPorComida);\n\n//# sourceURL=webpack:///./src/views/Patients/FollowUp/InformationNutritional/Intervention/Diets/Alimentos/Equivalentes/PorComida/useEquivalentesPorComida.js?");

/***/ })

}]);