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

/***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js ***!
  \****************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _objectWithoutProperties; });\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n\n\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n  var target = Object(_objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(source, excluded);\n  var key, i;\n\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n\n  return target;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js":
/*!*********************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***!
  \*********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _objectWithoutPropertiesLoose; });\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js?");

/***/ }),

/***/ "./node_modules/core-js/modules/es.array.splice.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.splice.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ \"./node_modules/core-js/internals/to-absolute-index.js\");\nvar toInteger = __webpack_require__(/*! ../internals/to-integer */ \"./node_modules/core-js/internals/to-integer.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ \"./node_modules/core-js/internals/array-species-create.js\");\nvar createProperty = __webpack_require__(/*! ../internals/create-property */ \"./node_modules/core-js/internals/create-property.js\");\nvar arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ \"./node_modules/core-js/internals/array-method-has-species-support.js\");\nvar arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ \"./node_modules/core-js/internals/array-method-uses-to-length.js\");\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n  splice: function splice(start, deleteCount /* , ...items */) {\n    var O = toObject(this);\n    var len = toLength(O.length);\n    var actualStart = toAbsoluteIndex(start, len);\n    var argumentsLength = arguments.length;\n    var insertCount, actualDeleteCount, A, k, from, to;\n    if (argumentsLength === 0) {\n      insertCount = actualDeleteCount = 0;\n    } else if (argumentsLength === 1) {\n      insertCount = 0;\n      actualDeleteCount = len - actualStart;\n    } else {\n      insertCount = argumentsLength - 2;\n      actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n    }\n    if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n      throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n    }\n    A = arraySpeciesCreate(O, actualDeleteCount);\n    for (k = 0; k < actualDeleteCount; k++) {\n      from = actualStart + k;\n      if (from in O) createProperty(A, k, O[from]);\n    }\n    A.length = actualDeleteCount;\n    if (insertCount < actualDeleteCount) {\n      for (k = actualStart; k < len - actualDeleteCount; k++) {\n        from = k + actualDeleteCount;\n        to = k + insertCount;\n        if (from in O) O[to] = O[from];\n        else delete O[to];\n      }\n      for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n    } else if (insertCount > actualDeleteCount) {\n      for (k = len - actualDeleteCount; k > actualStart; k--) {\n        from = k + actualDeleteCount - 1;\n        to = k + insertCount - 1;\n        if (from in O) O[to] = O[from];\n        else delete O[to];\n      }\n    }\n    for (k = 0; k < insertCount; k++) {\n      O[k + actualStart] = arguments[k + 2];\n    }\n    O.length = len - actualDeleteCount + insertCount;\n    return A;\n  }\n});\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/es.array.splice.js?");

/***/ }),

/***/ "./src/composables/useDiet.js":
/*!************************************!*\
  !*** ./src/composables/useDiet.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_number_constructor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_6__ = __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_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_6__);\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/* harmony import */ var vue_toastification_composition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! vue-toastification/composition */ \"./node_modules/vue-toastification/composition/index.js\");\n/* harmony import */ var vue_toastification_composition__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(vue_toastification_composition__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @core/components/toastification/ToastificationContent.vue */ \"./src/@core/components/toastification/ToastificationContent.vue\");\n/* harmony import */ var _services_DietService__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/services/DietService */ \"./src/services/DietService.js\");\n\n\n\n\n\n\n\n // Notification\n\n\n\n\n\nvar useDiet = function useDiet() {\n  var perPage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;\n  // Use toast\n  var toast = Object(vue_toastification_composition__WEBPACK_IMPORTED_MODULE_8__[\"useToast\"])();\n  var loading = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])(false);\n  var saving = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])(false);\n  var loadingTipo = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])(false);\n  var perPageOptions = [10, 25, 50];\n  var dieta = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"reactive\"])({\n    id: '',\n    nombreDieta: '',\n    cantidad_kcal: 0,\n    porcentaje_proteinas: 30,\n    porcentaje_kcal: 50,\n    porcentaje_grasas: 20,\n    cat_tipo_dieta_id: '',\n    foto: '',\n    file: null,\n    opcion_dieta: 0,\n    opcion_dieta_1: 0,\n    opcion_dieta_2: 0,\n    tipo: '',\n    equivalentesTipo: '',\n    menuTipo: ''\n  });\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 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  }); // const statusFilter     = ref(null)\n\n  var diets = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])([]);\n  var diets2 = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])([]);\n  var dietsE = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])([]);\n  var tipoDiets = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])([]);\n  var lastDiet = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])(null);\n  var columns = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])([{\n    etiqueta: \"Antes del desayuno\",\n    posicion: 0\n  }, {\n    etiqueta: \"Desayuno\",\n    posicion: 1\n  }, {\n    etiqueta: \"Colación\",\n    posicion: 2\n  }, {\n    etiqueta: \"Comida\",\n    posicion: 3\n  }, {\n    etiqueta: \"Colación\",\n    posicion: 4\n  }, {\n    etiqueta: \"Cena\",\n    posicion: 5\n  }]);\n  var tipoDieta = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])([]);\n  var listQuery = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"reactive\"])({\n    total: 0,\n    per_page: perPage,\n    page: 1,\n    totalPages: 1,\n    query: '',\n    statusFilter: '',\n    deviceTypeFilter: '',\n    sort: 'asc',\n    sortBy: 'id',\n    from: 0,\n    to: 0\n  });\n  Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"watch\"])(function () {\n    return listQuery.per_page;\n  }, function (currentValue, oldValue) {\n    return fetchList();\n  });\n  Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"watch\"])(function () {\n    return listQuery.page;\n  }, function (currentValue, oldValue) {\n    return fetchList();\n  });\n  Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"watch\"])(function () {\n    return listQuery.query;\n  }, function (currentValue, oldValue) {\n    return fetchList();\n  });\n  Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"watch\"])(function () {\n    return listQuery.deviceTypeFilter;\n  }, function (n, old) {\n    return fetchList();\n  });\n  Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"watch\"])(function () {\n    return listQuery.statusFilter;\n  }, function (n, old) {\n    return fetchList();\n  });\n\n  var fetchList = function fetchList() {\n    loading.value = true;\n    _services_DietService__WEBPACK_IMPORTED_MODULE_10__[\"default\"].fetchList(listQuery).then(function (response) {\n      var _response$data = response.data,\n          data = _response$data.data,\n          total = _response$data.total,\n          from = _response$data.from,\n          to = _response$data.to,\n          last_page = _response$data.last_page,\n          per_page = _response$data.per_page;\n      listQuery.total = Number(total);\n      listQuery.from = Number(from);\n      listQuery.to = Number(to);\n      listQuery.totalPages = Number(last_page);\n      listQuery.per_page = Number(per_page);\n      diets.value = data;\n      loading.value = false;\n    }).catch(function (e) {\n      loading.value = false;\n      toast({\n        component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n        props: {\n          title: \"Error al cargar Dietas\",\n          icon: 'AlertTriangleIcon',\n          variant: 'danger'\n        }\n      });\n    });\n  };\n\n  var addAcumulado = function addAcumulado(item) {\n    var columns = [{\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    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      columns: columns\n    });\n  };\n\n  var getTiposDietas = /*#__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() {\n      var response, elementoCompartido, elementosQuitados;\n      return regeneratorRuntime.wrap(function _callee$(_context) {\n        while (1) {\n          switch (_context.prev = _context.next) {\n            case 0:\n              loading.value = true;\n              _context.prev = 1;\n              _context.next = 4;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_10__[\"default\"].fetchAllTipos();\n\n            case 4:\n              response = _context.sent;\n              _context.next = 7;\n              return response.data.cuerpo;\n\n            case 7:\n              diets.value = _context.sent;\n              elementoCompartido = JSON.parse(JSON.stringify(diets.value[3]));\n              elementosQuitados = diets.value.splice(3, 2);\n              lastDiet.value = diets.value.find(function (item) {\n                return item.lista == 'Personalizada';\n              });\n              diets.value.unshift(elementoCompartido);\n              diets2.value = elementosQuitados;\n              loading.value = false;\n              return _context.abrupt(\"return\", response);\n\n            case 17:\n              _context.prev = 17;\n              _context.t0 = _context[\"catch\"](1);\n              loading.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n                props: {\n                  title: \"Error al cargar Dietas\",\n                  icon: 'AlertTriangleIcon',\n                  variant: 'danger'\n                }\n              });\n\n            case 21:\n            case \"end\":\n              return _context.stop();\n          }\n        }\n      }, _callee, null, [[1, 17]]);\n    }));\n\n    return function getTiposDietas() {\n      return _ref.apply(this, arguments);\n    };\n  }();\n\n  var getTipoDieta = /*#__PURE__*/function () {\n    var _ref2 = Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(id) {\n      var response;\n      return regeneratorRuntime.wrap(function _callee2$(_context2) {\n        while (1) {\n          switch (_context2.prev = _context2.next) {\n            case 0:\n              loadingTipo.value = true;\n              _context2.prev = 1;\n              _context2.next = 4;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_10__[\"default\"].getTipoById(id);\n\n            case 4:\n              response = _context2.sent;\n              loadingTipo.value = false;\n              tipoDieta.value = response.data.cuerpo.map(addAcumulado);\n              return _context2.abrupt(\"return\", response);\n\n            case 10:\n              _context2.prev = 10;\n              _context2.t0 = _context2[\"catch\"](1);\n              loadingTipo.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n                props: {\n                  title: \"Error al cargar Dieta\",\n                  icon: 'AlertTriangleIcon',\n                  variant: 'danger'\n                }\n              });\n\n            case 14:\n            case \"end\":\n              return _context2.stop();\n          }\n        }\n      }, _callee2, null, [[1, 10]]);\n    }));\n\n    return function getTipoDieta(_x) {\n      return _ref2.apply(this, arguments);\n    };\n  }();\n\n  var getTipoDietaEquivalente = /*#__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 _callee3(id) {\n      var response;\n      return regeneratorRuntime.wrap(function _callee3$(_context3) {\n        while (1) {\n          switch (_context3.prev = _context3.next) {\n            case 0:\n              loadingTipo.value = true;\n              _context3.prev = 1;\n              _context3.next = 4;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_10__[\"default\"].getTipoDietaEquivalente(id);\n\n            case 4:\n              response = _context3.sent;\n              loadingTipo.value = false;\n              dietsE.value = response.data.cuerpo;\n              return _context3.abrupt(\"return\", response);\n\n            case 10:\n              _context3.prev = 10;\n              _context3.t0 = _context3[\"catch\"](1);\n              loadingTipo.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n                props: {\n                  title: \"Error al cargar Dieta\",\n                  icon: 'AlertTriangleIcon',\n                  variant: 'danger'\n                }\n              });\n\n            case 14:\n            case \"end\":\n              return _context3.stop();\n          }\n        }\n      }, _callee3, null, [[1, 10]]);\n    }));\n\n    return function getTipoDietaEquivalente(_x2) {\n      return _ref3.apply(this, arguments);\n    };\n  }();\n\n  var obtenerTipoDietas = /*#__PURE__*/function () {\n    var _ref4 = Object(_Users_ruben_Development_nutrifull_front_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {\n      var response;\n      return regeneratorRuntime.wrap(function _callee4$(_context4) {\n        while (1) {\n          switch (_context4.prev = _context4.next) {\n            case 0:\n              loadingTipo.value = true;\n              _context4.prev = 1;\n              _context4.next = 4;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_10__[\"default\"].getTipoDietas();\n\n            case 4:\n              response = _context4.sent;\n              loadingTipo.value = false;\n              tipoDiets.value = response.data.cuerpo;\n              return _context4.abrupt(\"return\", response);\n\n            case 10:\n              _context4.prev = 10;\n              _context4.t0 = _context4[\"catch\"](1);\n              loadingTipo.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n                props: {\n                  title: \"Error al cargar tipos de dietas\",\n                  icon: 'AlertTriangleIcon',\n                  variant: 'danger'\n                }\n              });\n\n            case 14:\n            case \"end\":\n              return _context4.stop();\n          }\n        }\n      }, _callee4, null, [[1, 10]]);\n    }));\n\n    return function obtenerTipoDietas() {\n      return _ref4.apply(this, arguments);\n    };\n  }();\n\n  var loadingDietaPaciente = Object(_vue_composition_api__WEBPACK_IMPORTED_MODULE_7__[\"ref\"])(false);\n\n  var getDietaPaciente = /*#__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 _callee5(idPaciente) {\n      var response;\n      return regeneratorRuntime.wrap(function _callee5$(_context5) {\n        while (1) {\n          switch (_context5.prev = _context5.next) {\n            case 0:\n              loadingDietaPaciente.value = true;\n              _context5.prev = 1;\n              _context5.next = 4;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_10__[\"default\"].getDietaPaciente(idPaciente);\n\n            case 4:\n              response = _context5.sent;\n              loadingDietaPaciente.value = false;\n              Object.assign(dieta, response.data.cuerpo);\n              return _context5.abrupt(\"return\", response);\n\n            case 10:\n              _context5.prev = 10;\n              _context5.t0 = _context5[\"catch\"](1);\n              loadingTipo.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n                props: {\n                  title: \"Error al cargar dieta del paciente\",\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 getDietaPaciente(_x3) {\n      return _ref5.apply(this, arguments);\n    };\n  }();\n\n  var saveDieta = /*#__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 _callee6(idPaciente) {\n      var form, response;\n      return regeneratorRuntime.wrap(function _callee6$(_context6) {\n        while (1) {\n          switch (_context6.prev = _context6.next) {\n            case 0:\n              saving.value = true;\n              _context6.prev = 1;\n              form = new FormData();\n              form.append('nombreDieta', dieta.nombre);\n              form.append('cantidad_kcal', dieta.cantidad_kcal);\n              form.append('porcentaje_proteinas', dieta.porcentaje_proteinas);\n              form.append('porcentaje_kcal', dieta.porcentaje_kcal);\n              form.append('porcentaje_grasas', dieta.porcentaje_grasas);\n              form.append('cat_tipo_dieta_id', dieta.cat_tipo_dieta_id);\n              form.append('foto', dieta.file);\n              _context6.next = 12;\n              return _services_DietService__WEBPACK_IMPORTED_MODULE_10__[\"default\"].create(idPaciente, form);\n\n            case 12:\n              response = _context6.sent;\n              saving.value = false;\n              return _context6.abrupt(\"return\", response);\n\n            case 17:\n              _context6.prev = 17;\n              _context6.t0 = _context6[\"catch\"](1);\n              loading.value = false;\n              toast({\n                component: _core_components_toastification_ToastificationContent_vue__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n                props: {\n                  title: \"Error al guardar dieta\",\n                  icon: 'AlertTriangleIcon',\n                  variant: 'danger'\n                }\n              });\n\n            case 21:\n            case \"end\":\n              return _context6.stop();\n          }\n        }\n      }, _callee6, null, [[1, 17]]);\n    }));\n\n    return function saveDieta(_x4) {\n      return _ref6.apply(this, arguments);\n    };\n  }();\n\n  var resolveStatus = function resolveStatus(status) {\n    return status ? 'success' : 'danger';\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  return {\n    loading: loading,\n    listQuery: listQuery,\n    perPageOptions: perPageOptions,\n    fetchList: fetchList,\n    diets: diets,\n    diets2: diets2,\n    dietsE: dietsE,\n    tipoDiets: tipoDiets,\n    resolveStatus: resolveStatus,\n    getTiposDietas: getTiposDietas,\n    getTipoDieta: getTipoDieta,\n    getTipoDietaEquivalente: getTipoDietaEquivalente,\n    obtenerTipoDietas: obtenerTipoDietas,\n    tipoDieta: tipoDieta,\n    loadingTipo: loadingTipo,\n    columns: columns,\n    column: column,\n    states: states,\n    resetColumn: resetColumn,\n    dieta: dieta,\n    saveDieta: saveDieta,\n    saving: saving,\n    getDietaPaciente: getDietaPaciente,\n    loadingDietaPaciente: loadingDietaPaciente,\n    lastDiet: lastDiet\n  };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (useDiet);\n\n//# sourceURL=webpack:///./src/composables/useDiet.js?");

/***/ })

}]);