"use strict";
(self["webpackChunkskote"] = self["webpackChunkskote"] || []).push([["default-src_app_pages_autorizacion_autorizacion_module_ts"],{

/***/ 2029:
/*!**************************************************************************!*\
  !*** ./src/app/core/services/autorizacion/configComprobantes.service.ts ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ConfigComprobantesService: () => (/* binding */ ConfigComprobantesService)
/* harmony export */ });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ 69862);
/* harmony import */ var _config_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config.service */ 56375);
/* harmony import */ var _auth_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../auth.service */ 90304);
/* harmony import */ var _core_api_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/api-base.service */ 78169);
/* harmony import */ var _recursos_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../recursos.service */ 50657);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 65879);






// MC SINWEB-96 Servicio para la configuración de comprobantes
class ConfigComprobantesService extends _core_api_base_service__WEBPACK_IMPORTED_MODULE_2__.ApiBaseService {
  constructor(http, configService, recursosService, authService) {
    super(http, configService, recursosService, authService);
    this.endpoint = this.url + this.autorizacion.CONFIG_COMPROBANTE.VERSION + this.autorizacion.CONFIG_COMPROBANTE.PATH_BASE;
  }
  // MC SINWEB-96 Funcion para activar una configuración de autorización de comprobante
  activarConfig(params, id, error) {
    let path = this.url + this.autorizacion.CONFIG_COMPROBANTE.ACTIVACION.VERSION + this.autorizacion.CONFIG_COMPROBANTE.PATH_BASE + this.autorizacion.CONFIG_COMPROBANTE.ACTIVACION.PATH_REL.replace('{id}', id);
    return this.editar(params, id, path, error);
  }
  // MC SINWEB-96 Funcion para desactivar una configuración de autorización comprobante
  desactivarConfig(params, id, error) {
    let path = this.url + this.autorizacion.CONFIG_COMPROBANTE.DESACTIVACION.VERSION + this.autorizacion.CONFIG_COMPROBANTE.PATH_BASE + this.autorizacion.CONFIG_COMPROBANTE.DESACTIVACION.PATH_REL.replace('{id}', id);
    return this.editar(params, id, path, error);
  }
  putResponsables(params, id, error) {
    let path = this.url + this.autorizacion.CONFIG_COMPROBANTE.PUT_RESPONSABLES.VERSION + this.autorizacion.CONFIG_COMPROBANTE.PATH_BASE + this.autorizacion.CONFIG_COMPROBANTE.PUT_RESPONSABLES.PATH_REL.replace('{id}', id);
    return this.editar(params, id, path, error);
  }
  postResponsables(params, id, error) {
    let path = this.url + this.autorizacion.CONFIG_COMPROBANTE.POST_RESPONSABLES.VERSION + this.autorizacion.CONFIG_COMPROBANTE.PATH_BASE + this.autorizacion.CONFIG_COMPROBANTE.POST_RESPONSABLES.PATH_REL.replace('{id}', id);
    return this.editar(params, id, path, error);
  }
  static #_ = this.ɵfac = function ConfigComprobantesService_Factory(t) {
    return new (t || ConfigComprobantesService)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common_http__WEBPACK_IMPORTED_MODULE_5__.HttpClient), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_config_service__WEBPACK_IMPORTED_MODULE_0__.ConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_recursos_service__WEBPACK_IMPORTED_MODULE_3__.RecursosService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_auth_service__WEBPACK_IMPORTED_MODULE_1__.AuthService));
  };
  static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({
    token: ConfigComprobantesService,
    factory: ConfigComprobantesService.ɵfac,
    providedIn: 'root'
  });
}

/***/ }),

/***/ 92542:
/*!**************************************************************************!*\
  !*** ./src/app/core/services/autorizacion/excepcionProveedor.service.ts ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ExcepcionProveedorService: () => (/* binding */ ExcepcionProveedorService)
/* harmony export */ });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ 69862);
/* harmony import */ var _config_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config.service */ 56375);
/* harmony import */ var _auth_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../auth.service */ 90304);
/* harmony import */ var _core_api_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/api-base.service */ 78169);
/* harmony import */ var _recursos_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../recursos.service */ 50657);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 65879);






// MC SINWEB-96 Servicio para las excepciones de proveedores
class ExcepcionProveedorService extends _core_api_base_service__WEBPACK_IMPORTED_MODULE_2__.ApiBaseService {
  constructor(http, configService, recursosService, authService) {
    super(http, configService, recursosService, authService);
    this.endpoint = this.url + this.autorizacion.EXCEPCION_PROVEEDOR.VERSION + this.autorizacion.EXCEPCION_PROVEEDOR.PATH_BASE;
  }
  static #_ = this.ɵfac = function ExcepcionProveedorService_Factory(t) {
    return new (t || ExcepcionProveedorService)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common_http__WEBPACK_IMPORTED_MODULE_5__.HttpClient), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_config_service__WEBPACK_IMPORTED_MODULE_0__.ConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_recursos_service__WEBPACK_IMPORTED_MODULE_3__.RecursosService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_auth_service__WEBPACK_IMPORTED_MODULE_1__.AuthService));
  };
  static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({
    token: ExcepcionProveedorService,
    factory: ExcepcionProveedorService.ɵfac,
    providedIn: 'root'
  });
}

/***/ }),

/***/ 2874:
/*!**********************************************************************!*\
  !*** ./src/app/core/services/autorizacion/responsableAut.service.ts ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ResponsableAutService: () => (/* binding */ ResponsableAutService)
/* harmony export */ });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ 69862);
/* harmony import */ var _config_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config.service */ 56375);
/* harmony import */ var _auth_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../auth.service */ 90304);
/* harmony import */ var _core_api_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/api-base.service */ 78169);
/* harmony import */ var _recursos_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../recursos.service */ 50657);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 65879);






// MC SINWEB-97 Servicio para los responsables de autorización
class ResponsableAutService extends _core_api_base_service__WEBPACK_IMPORTED_MODULE_2__.ApiBaseService {
  constructor(http, configService, recursosService, authService) {
    super(http, configService, recursosService, authService);
    this.endpoint = this.url + this.autorizacion.RESPONSABLE_AUT.VERSION + this.autorizacion.RESPONSABLE_AUT.PATH_BASE;
  }
  static #_ = this.ɵfac = function ResponsableAutService_Factory(t) {
    return new (t || ResponsableAutService)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common_http__WEBPACK_IMPORTED_MODULE_5__.HttpClient), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_config_service__WEBPACK_IMPORTED_MODULE_0__.ConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_recursos_service__WEBPACK_IMPORTED_MODULE_3__.RecursosService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_auth_service__WEBPACK_IMPORTED_MODULE_1__.AuthService));
  };
  static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({
    token: ResponsableAutService,
    factory: ResponsableAutService.ɵfac,
    providedIn: 'root'
  });
}

/***/ }),

/***/ 78582:
/*!*******************************************************************!*\
  !*** ./src/app/pages/autorizacion/autorizacion-routing.module.ts ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AutorizacionRoutingModule: () => (/* binding */ AutorizacionRoutingModule)
/* harmony export */ });
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ 75187);
/* harmony import */ var _config_comprobantes_config_comprobantes_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./config-comprobantes/config-comprobantes.component */ 54959);
/* harmony import */ var _autorizar_comprobantes_autorizar_comprobantes_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./autorizar-comprobantes/autorizar-comprobantes.component */ 82811);
/* harmony import */ var _responsables_comprobantes_responsables_comprobantes_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./responsables-comprobantes/responsables-comprobantes.component */ 2062);
/* harmony import */ var _core_guards_auth_guard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/guards/auth.guard */ 8036);
/* harmony import */ var src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/utils/permisos/permisos-autorizacion */ 92558);
/* harmony import */ var _inicio_autorizacion_inicio_autorizacion_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./inicio-autorizacion/inicio-autorizacion.component */ 8963);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ 65879);









const PERMISO_LIS_CONFIG_AUT = src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_4__.PERMISO_LIS_CONFIG_AUT;
const PERMISO_LIS_AUT_COMP = src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_4__.PERMISO_LIS_AUT_COMP;
const PERMISO_LIS_RESP_AUT = src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_4__.PERMISO_LIS_RESP_AUT;
const routes = [{
  path: 'inicio',
  component: _inicio_autorizacion_inicio_autorizacion_component__WEBPACK_IMPORTED_MODULE_5__.InicioAutorizacionComponent
}, {
  path: 'config-comprobantes',
  component: _config_comprobantes_config_comprobantes_component__WEBPACK_IMPORTED_MODULE_0__.ConfigComprobantesComponent,
  // MC SINWEB-105 Permite acceso a la ruta si tiene permisos
  canActivate: [_core_guards_auth_guard__WEBPACK_IMPORTED_MODULE_3__.AuthGuard],
  data: {
    permiso: PERMISO_LIS_CONFIG_AUT
  }
}, {
  path: 'autorizar-comprobantes',
  component: _autorizar_comprobantes_autorizar_comprobantes_component__WEBPACK_IMPORTED_MODULE_1__.AutorizarComprobantesComponent,
  // MC SINWEB-105 Permite acceso a la ruta si tiene permisos
  canActivate: [_core_guards_auth_guard__WEBPACK_IMPORTED_MODULE_3__.AuthGuard],
  data: {
    permiso: PERMISO_LIS_AUT_COMP
  }
}, {
  path: 'responsables-comprobantes',
  component: _responsables_comprobantes_responsables_comprobantes_component__WEBPACK_IMPORTED_MODULE_2__.ResponsablesComprobantesComponent,
  // MC SINWEB-105 Permite acceso a la ruta si tiene permisos
  canActivate: [_core_guards_auth_guard__WEBPACK_IMPORTED_MODULE_3__.AuthGuard],
  data: {
    permiso: PERMISO_LIS_RESP_AUT
  }
}];
class AutorizacionRoutingModule {
  static #_ = this.ɵfac = function AutorizacionRoutingModule_Factory(t) {
    return new (t || AutorizacionRoutingModule)();
  };
  static #_2 = this.ɵmod = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdefineNgModule"]({
    type: AutorizacionRoutingModule
  });
  static #_3 = this.ɵinj = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdefineInjector"]({
    imports: [_angular_router__WEBPACK_IMPORTED_MODULE_7__.RouterModule.forChild(routes), _angular_router__WEBPACK_IMPORTED_MODULE_7__.RouterModule]
  });
}
(function () {
  (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵsetNgModuleScope"](AutorizacionRoutingModule, {
    imports: [_angular_router__WEBPACK_IMPORTED_MODULE_7__.RouterModule],
    exports: [_angular_router__WEBPACK_IMPORTED_MODULE_7__.RouterModule]
  });
})();

/***/ }),

/***/ 94955:
/*!***********************************************************!*\
  !*** ./src/app/pages/autorizacion/autorizacion.module.ts ***!
  \***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AutorizacionModule: () => (/* binding */ AutorizacionModule)
/* harmony export */ });
/* harmony import */ var _autorizacion_routing_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./autorizacion-routing.module */ 78582);
/* harmony import */ var _config_comprobantes_config_comprobantes_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config-comprobantes/config-comprobantes.component */ 54959);
/* harmony import */ var _autorizar_comprobantes_autorizar_comprobantes_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./autorizar-comprobantes/autorizar-comprobantes.component */ 82811);
/* harmony import */ var _config_comprobantes_config_comprobantes_edit_config_comprobantes_edit_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config-comprobantes/config-comprobantes-edit/config-comprobantes-edit.component */ 18239);
/* harmony import */ var _responsables_comprobantes_responsables_comprobantes_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./responsables-comprobantes/responsables-comprobantes.component */ 2062);
/* harmony import */ var _responsables_comprobantes_responsables_comprobantes_edit_responsables_comprobantes_edit_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./responsables-comprobantes/responsables-comprobantes-edit/responsables-comprobantes-edit.component */ 27850);
/* harmony import */ var ngx_mask__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ngx-mask */ 43735);
/* harmony import */ var _autorizar_comprobantes_autorizar_comprobantes_auth_autorizar_comprobantes_auth_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./autorizar-comprobantes/autorizar-comprobantes-auth/autorizar-comprobantes-auth.component */ 73091);
/* harmony import */ var _autorizar_comprobantes_autorizar_comprobantes_view_config_autorizar_comprobantes_view_config_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./autorizar-comprobantes/autorizar-comprobantes-view-config/autorizar-comprobantes-view-config.component */ 71695);
/* harmony import */ var _inicio_autorizacion_inicio_autorizacion_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./inicio-autorizacion/inicio-autorizacion.component */ 8963);
/* harmony import */ var src_app_shared_shared_module__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/shared/shared.module */ 56208);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/core */ 65879);












class AutorizacionModule {
  static #_ = this.ɵfac = function AutorizacionModule_Factory(t) {
    return new (t || AutorizacionModule)();
  };
  static #_2 = this.ɵmod = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdefineNgModule"]({
    type: AutorizacionModule
  });
  static #_3 = this.ɵinj = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdefineInjector"]({
    providers: [(0,ngx_mask__WEBPACK_IMPORTED_MODULE_11__.provideNgxMask)()],
    imports: [src_app_shared_shared_module__WEBPACK_IMPORTED_MODULE_9__.SharedModule, _autorizacion_routing_module__WEBPACK_IMPORTED_MODULE_0__.AutorizacionRoutingModule]
  });
}
(function () {
  (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵsetNgModuleScope"](AutorizacionModule, {
    declarations: [_config_comprobantes_config_comprobantes_component__WEBPACK_IMPORTED_MODULE_1__.ConfigComprobantesComponent, _autorizar_comprobantes_autorizar_comprobantes_component__WEBPACK_IMPORTED_MODULE_2__.AutorizarComprobantesComponent, _config_comprobantes_config_comprobantes_edit_config_comprobantes_edit_component__WEBPACK_IMPORTED_MODULE_3__.ConfigComprobantesEditComponent, _responsables_comprobantes_responsables_comprobantes_component__WEBPACK_IMPORTED_MODULE_4__.ResponsablesComprobantesComponent, _responsables_comprobantes_responsables_comprobantes_edit_responsables_comprobantes_edit_component__WEBPACK_IMPORTED_MODULE_5__.ResponsablesComprobantesEditComponent, _autorizar_comprobantes_autorizar_comprobantes_auth_autorizar_comprobantes_auth_component__WEBPACK_IMPORTED_MODULE_6__.AutorizarComprobantesAuthComponent, _autorizar_comprobantes_autorizar_comprobantes_view_config_autorizar_comprobantes_view_config_component__WEBPACK_IMPORTED_MODULE_7__.AutorizarComprobantesViewConfigComponent, _inicio_autorizacion_inicio_autorizacion_component__WEBPACK_IMPORTED_MODULE_8__.InicioAutorizacionComponent],
    imports: [src_app_shared_shared_module__WEBPACK_IMPORTED_MODULE_9__.SharedModule, _autorizacion_routing_module__WEBPACK_IMPORTED_MODULE_0__.AutorizacionRoutingModule],
    exports: [_inicio_autorizacion_inicio_autorizacion_component__WEBPACK_IMPORTED_MODULE_8__.InicioAutorizacionComponent]
  });
})();

/***/ }),

/***/ 73091:
/*!********************************************************************************************************************************!*\
  !*** ./src/app/pages/autorizacion/autorizar-comprobantes/autorizar-comprobantes-auth/autorizar-comprobantes-auth.component.ts ***!
  \********************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AutorizarComprobantesAuthComponent: () => (/* binding */ AutorizarComprobantesAuthComponent)
/* harmony export */ });
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/services/core/viewHelper.service */ 4506);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ 96814);








function AutorizarComprobantesAuthComponent_div_14_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](1, " Usuario es necesario ");
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
  }
}
function AutorizarComprobantesAuthComponent_div_15_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](1, " Usuario debe tener m\u00E1s de 5 caracteres ");
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
  }
}
function AutorizarComprobantesAuthComponent_div_16_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](1, " Usuario debe tener menos de 20 caracteres ");
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
  }
}
function AutorizarComprobantesAuthComponent_div_21_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](1, " Contrase\u00F1a es necesaria ");
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
  }
}
function AutorizarComprobantesAuthComponent_div_22_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](1, " Contrase\u00F1a debe tener m\u00E1s de 5 caracteres ");
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
  }
}
function AutorizarComprobantesAuthComponent_div_23_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](1, " Contrase\u00F1a debe tener menos de 20 caracteres ");
    _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
  }
}
// MC SINWEB-98 Componente de autenticación necesario para autorizar/rechazar comprobantes
class AutorizarComprobantesAuthComponent {
  constructor(modal, fb, authService, vh) {
    this.modal = modal;
    this.fb = fb;
    this.authService = authService;
    this.vh = vh;
    this.unsubscribe = [];
  }
  ngOnInit() {
    this.setForm();
  }
  setForm() {
    this.loginForm = this.fb.group({
      usuario: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.minLength(5), _angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.maxLength(20)])],
      password: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.minLength(5), _angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.maxLength(20)])]
    });
    this.vh.inicializar();
    this.vh.formGroup = this.loginForm;
  }
  // MC SINWEB-98 Función de autenticación
  onSubmit() {
    let body = {
      usuario: this.loginForm.controls['usuario'].value,
      password: this.loginForm.controls['password'].value,
      idSucursal: this.authService.usuario.IdSucursal
    };
    if (this.loginForm.invalid) {
      return;
    } else {
      const loginSub = this.authService.login(body.usuario, body.password, body.idSucursal).subscribe(resp => {
        if (resp.Succeeded) {
          // Autenticado correctamente (un usuario válido)
          let estaResponsable = this.Responsables.some(obj => obj.UsrUsuario.Id === resp.Data.IdUsrUsuario);
          if (estaResponsable) {
            // Una vez autenticado, si el usuario es responsable, se cierra el modal y se autoriza el comprobante
            let obj = {
              IdUsuario: resp.Data.IdUsrUsuario,
              msj: 'Comprobante autorizado/rechazado correctamente'
            };
            this.modal.close(obj);
          } else {
            // Si el usuario no es responsable, se cierra el modal y se muestra un mensaje de error
            let obj = {
              IdUsuario: resp.Data.IdUsrUsuario,
              msj: 'El usuario no es responsable de autenticar el comprobante'
            };
            this.modal.close(obj);
          }
        }
      });
      this.unsubscribe.push(loginSub);
    }
  }
  ngOnDestroy() {
    this.unsubscribe.forEach(sb => sb.unsubscribe());
  }
  static #_ = this.ɵfac = function AutorizarComprobantesAuthComponent_Factory(t) {
    return new (t || AutorizarComprobantesAuthComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_4__.NgbActiveModal), _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_3__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_1__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__.ViewHelperService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineComponent"]({
    type: AutorizarComprobantesAuthComponent,
    selectors: [["app-autorizar-comprobantes-auth"]],
    inputs: {
      Responsables: "Responsables"
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵProvidersFeature"]([src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__.ViewHelperService])],
    decls: 28,
    vars: 13,
    consts: [[1, "modal-content"], [1, "modal-header"], [1, "modal-title"], [1, "overlay", "overlay-block", "cursor-default", "modal-body"], ["type", "info", 3, "dismissible"], [1, "mdi", "mdi-information-outline", "me-1"], [3, "formGroup", "ngSubmit"], [1, "mb-3"], ["for", "usuario"], ["type", "text", "id", "usuario", "formControlName", "usuario", "autocomplete", "off", "placeholder", "Insertar usuario", "data-cy", "aut-usuario", 1, "form-control"], ["class", "invalid-feedback animate__animated animate__shakeX", 4, "ngIf"], ["type", "password", "id", "password", "formControlName", "password", "autocomplete", "off", "placeholder", "Insertar contrase\u00F1a", "data-cy", "aut-password", 1, "form-control"], [1, "mt-3", "d-grid"], ["type", "submit", 1, "btn", "btn-primary", "btn-block", 3, "disabled"], [1, "modal-footer"], [1, "invalid-feedback", "animate__animated", "animate__shakeX"]],
    template: function AutorizarComprobantesAuthComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "h4", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](3, "Autenticaci\u00F3n");
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](4, "div", 3)(5, "ngb-alert", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](6, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](7, " Esta acci\u00F3n requiere autenticaci\u00F3n. Por favor ingrese sus datos para verificar que es un responsable v\u00E1lido. ");
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](8, "div")(9, "form", 6);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("ngSubmit", function AutorizarComprobantesAuthComponent_Template_form_ngSubmit_9_listener() {
          return ctx.onSubmit();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](10, "div", 7)(11, "label", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](12, "Usuario");
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](13, "input", 9);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplate"](14, AutorizarComprobantesAuthComponent_div_14_Template, 2, 0, "div", 10)(15, AutorizarComprobantesAuthComponent_div_15_Template, 2, 0, "div", 10)(16, AutorizarComprobantesAuthComponent_div_16_Template, 2, 0, "div", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](17, "div", 7)(18, "label", 8);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](19, "Contrase\u00F1a");
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](20, "input", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplate"](21, AutorizarComprobantesAuthComponent_div_21_Template, 2, 0, "div", 10)(22, AutorizarComprobantesAuthComponent_div_22_Template, 2, 0, "div", 10)(23, AutorizarComprobantesAuthComponent_div_23_Template, 2, 0, "div", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](24, "div", 12)(25, "button", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](26, " Confirmar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](27, "div", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](5);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("dismissible", false);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("formGroup", ctx.loginForm);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵclassProp"]("is-invalid", ctx.vh.isControlInvalid("usuario"));
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("required", "usuario"));
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("minlength", "usuario"));
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("maxlength", "usuario"));
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵclassProp"]("is-invalid", ctx.vh.isControlInvalid("password"));
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("required", "password"));
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("minlength", "password"));
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("ngIf", ctx.vh.controlHasError("maxlength", "password"));
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("disabled", !ctx.loginForm.valid);
      }
    },
    dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.NgIf, _angular_forms__WEBPACK_IMPORTED_MODULE_3__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_3__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.NgControlStatusGroup, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_4__.NgbAlert, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.FormControlName]
  });
}

/***/ }),

/***/ 71695:
/*!**********************************************************************************************************************************************!*\
  !*** ./src/app/pages/autorizacion/autorizar-comprobantes/autorizar-comprobantes-view-config/autorizar-comprobantes-view-config.component.ts ***!
  \**********************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AutorizarComprobantesViewConfigComponent: () => (/* binding */ AutorizarComprobantesViewConfigComponent)
/* harmony export */ });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../shared/ui/input-number/input-number.component */ 62271);





function AutorizarComprobantesViewConfigComponent_ng_container_5_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](1, "div", 7)(2, "div", 8)(3, "label", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](4, "Nombre");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](5, "input", 10);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](6, "div", 8)(7, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](8, "Descripci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](9, "textarea", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](10, "div", 12)(11, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](12, "Tipo de Comprobante");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](13, "select", 13)(14, "option", 14);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](15, " Seleccione tipo de comprobante ");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](16, "option", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](17, "Orden de Pago");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](18, "option", 16);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](19, "Pedido Compra");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](20, "div", 12)(21, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](22, "Modo de Autorizaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](23, "select", 17)(24, "option", 14);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](25, " Seleccione el Modo ");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](26, "option", 18);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](27, "General");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](28, "option", 19);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](29, "Por Proveedor");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](30, "div", 12)(31, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](32, "Monto");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](33, "app-input-number", 20);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](34, "div", 12)(35, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](36, "Moneda");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](37, "select", 21)(38, "option", 14);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](39, " Seleccione la moneda ");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](40, "option", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](41, "D\u00F3lar Estadounidense");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](42, "option", 23);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](43, "Euro");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](44, "option", 24);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](45, "Peso Argentino");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](46, "option", 25);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](47, "Real");
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("formGroup", ctx_r0.configInfo);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](13);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵattribute"]("disabled", true);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](10);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵattribute"]("disabled", true);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](9);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("value", ctx_r0.configInfo.controls.Monto.value)("decimals", 2)("disabled", true);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵattribute"]("disabled", true);
  }
}
class AutorizarComprobantesViewConfigComponent {
  constructor(modal, fb) {
    this.modal = modal;
    this.fb = fb;
    this.configInfo = this.fb.group({
      Nombre: [],
      Descripcion: [],
      Monto: [],
      TipoMoneda: [],
      TipoComprobante: [],
      ModoAut: []
    });
  }
  ngOnInit() {
    /**
     * SP deshabilitar el formulario
     */
    this.configInfo.disable();
    this.configInfo.patchValue({
      Nombre: this.registro.AutConfigComprobante.Nombre,
      Descripcion: this.registro.AutConfigComprobante.Descripcion,
      Monto: this.registro.AutConfigComprobante.Monto,
      TipoMoneda: this.registro.AutConfigComprobante.TipoMoneda.Id,
      TipoComprobante: this.registro.AutConfigComprobante.TipoComprobante.Id,
      ModoAut: this.registro.AutConfigComprobante.ModoAut
    });
  }
  static #_ = this.ɵfac = function AutorizarComprobantesViewConfigComponent_Factory(t) {
    return new (t || AutorizarComprobantesViewConfigComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_2__.NgbActiveModal), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_3__.FormBuilder));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
    type: AutorizarComprobantesViewConfigComponent,
    selectors: [["app-autorizar-comprobantes-view-config"]],
    inputs: {
      registro: "registro"
    },
    decls: 9,
    vars: 1,
    consts: [[1, "modal-content"], [1, "modal-header"], ["id", "example-modal-sizes-title-lg", 1, "modal-title"], [1, "overlay", "overlay-block", "cursor-default", "modal-body", 2, "min-height", "200px"], [4, "ngIf"], [1, "modal-footer"], ["type", "button", "data-cy", "btn-aceptar", 1, "btn", "btn-success", "btn-elevate", 3, "click"], [1, "form-group", "row", 3, "formGroup"], [1, "col-lg-12", "p-2"], [1, "form-label"], ["type", "text", "name", "Nombre", "formControlName", "Nombre", 1, "form-control", "form-control-solid"], ["name", "Descripcion", "name", "Descripcion", "formControlName", "Descripcion", 1, "form-control", "form-control-solid"], [1, "col-lg-6", "p-2"], ["formControlName", "TipoComprobante", 1, "form-select"], ["value", "null"], ["value", "5"], ["value", "18"], ["formControlName", "ModoAut", 1, "form-select"], ["value", "G"], ["value", "P"], [3, "value", "decimals", "disabled"], ["placeholder", "Buscar moneda", "name", "IdTipoMoneda", "formControlName", "TipoMoneda", 1, "form-control", "form-control-lg", "form-control-solid", "form-select"], ["value", "1"], ["value", "2"], ["value", "3"], ["value", "4"]],
    template: function AutorizarComprobantesViewConfigComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "h4", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](3, " Configuraci\u00F3n de Autorizaci\u00F3n asociada ");
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](4, "div", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](5, AutorizarComprobantesViewConfigComponent_ng_container_5_Template, 48, 7, "ng-container", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](6, "div", 5)(7, "button", 6);
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function AutorizarComprobantesViewConfigComponent_Template_button_click_7_listener() {
          return ctx.modal.dismiss();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](8, " Aceptar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()();
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](5);
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx.registro);
      }
    },
    dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_4__.NgIf, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_3__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_3__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.FormControlName, _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_0__.InputNumberComponent]
  });
}

/***/ }),

/***/ 82811:
/*!***********************************************************************************************!*\
  !*** ./src/app/pages/autorizacion/autorizar-comprobantes/autorizar-comprobantes.component.ts ***!
  \***********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AutorizarComprobantesComponent: () => (/* binding */ AutorizarComprobantesComponent)
/* harmony export */ });
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! rxjs */ 65619);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! rxjs/operators */ 99397);
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sweetalert2 */ 13519);
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ngx-ui-tour-ng-bootstrap */ 58469);
/* harmony import */ var src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/utils/constantes/constantes */ 74506);
/* harmony import */ var src_app_pages_autorizacion_autorizar_comprobantes_autorizar_comprobantes_auth_autorizar_comprobantes_auth_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/pages/autorizacion/autorizar-comprobantes/autorizar-comprobantes-auth/autorizar-comprobantes-auth.component */ 73091);
/* harmony import */ var src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/utils/metodos/metodos */ 38002);
/* harmony import */ var src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/services/alertCustom.service */ 53206);
/* harmony import */ var src_app_pages_autorizacion_autorizar_comprobantes_autorizar_comprobantes_view_config_autorizar_comprobantes_view_config_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/pages/autorizacion/autorizar-comprobantes/autorizar-comprobantes-view-config/autorizar-comprobantes-view-config.component */ 71695);
/* harmony import */ var src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/core/utils/permisos/permisos-autorizacion */ 92558);
/* harmony import */ var src_app_layouts_layouts_model__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/layouts/layouts.model */ 45660);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var src_app_core_services_autorizacion_autorizacionComprobante_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/core/services/autorizacion/autorizacionComprobante.service */ 76190);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/core/services/stateful.service */ 689);
/* harmony import */ var src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/core/services/exportacion.service */ 18969);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var src_app_core_services_autorizacion_configComprobantes_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! src/app/core/services/autorizacion/configComprobantes.service */ 2029);
/* harmony import */ var primeng_accordion__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! primeng/accordion */ 65389);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var primeng_sidebar__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! primeng/sidebar */ 99246);
/* harmony import */ var _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../shared/widget/tour/tour.component */ 63481);
/* harmony import */ var _shared_ui_select_loading_select_loading_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../shared/ui/select-loading/select-loading.component */ 24718);
/* harmony import */ var _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../shared/ui/table2/table2.component */ 63033);




























function AutorizarComprobantesComponent_ng_template_3_Template(rf, ctx) {}
function AutorizarComprobantesComponent_div_4_ng_template_3_Template(rf, ctx) {}
function AutorizarComprobantesComponent_div_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "div", 36)(1, "div", 37)(2, "div", 38);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtemplate"](3, AutorizarComprobantesComponent_div_4_ng_template_3_Template, 0, 0, "ng-template", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"]();
    const _r4 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵreference"](50);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("formGroup", ctx_r1.filterForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngTemplateOutlet", _r4);
  }
}
function AutorizarComprobantesComponent_a_43_Template(rf, ctx) {
  if (rf & 1) {
    const _r7 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "a", 39);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function AutorizarComprobantesComponent_a_43_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r7);
      const ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r6.borrarNumero());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](1, "i", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
  }
}
const _c0 = () => [0];
function AutorizarComprobantesComponent_ng_template_49_Template(rf, ctx) {
  if (rf & 1) {
    const _r9 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "div", 21)(1, "p-accordion", 41)(2, "p-accordionTab", 42)(3, "div")(4, "p", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](5, "Configuraci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](6, "select-loading", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("valueSelect", function AutorizarComprobantesComponent_ng_template_49_Template_select_loading_valueSelect_6_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r9);
      const ctx_r8 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r8.filterForm.controls.IdAutConfigComprobante.setValue($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipe"](7, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](8, "hr", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](9, "div")(10, "p", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](11, "Responsable");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](12, "select-loading", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("valueSelect", function AutorizarComprobantesComponent_ng_template_49_Template_select_loading_valueSelect_12_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r9);
      const ctx_r10 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r10.filterForm.controls.IdUsrUsuarioResponsable.setValue($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipe"](13, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](14, "hr", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](15, "div")(16, "p", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](17, "Tipo de Comprobante");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](18, "select", 46)(19, "option", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](20, "Todos");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](21, "option", 48);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](22, "Orden de Pago");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](23, "option", 49);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](24, "Pedido Compra");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](25, "hr", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](26, "div")(27, "p", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](28, "Estado de Autorizaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](29, "select", 50)(30, "option", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](31, "Todos");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](32, "option", 52);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](33, "Pendiente autorizar");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](34, "option", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](35, "Autorizado");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](36, "option", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](37, "Rechazado");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](38, "p-accordionTab", 55)(39, "div", 56)(40, "p", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](41, "Fecha");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](42, "label", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](43, "Desde");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](44, "input", 58);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](45, "label", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](46, "Hasta");
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](47, "input", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()()()();
  }
  if (rf & 2) {
    const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("formGroup", ctx_r3.filterForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("multiple", true)("activeIndex", _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpureFunction0"](15, _c0));
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("defaultString", "Todos")("items", ctx_r3.configsComp)("valueSelected", ctx_r3.filterForm.controls.IdAutConfigComprobante.value)("loading", _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipeBind1"](7, 11, ctx_r3.configCompService.isLoading$));
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("defaultString", "Todos")("items", ctx_r3.responsables)("valueSelected", ctx_r3.filterForm.controls.IdUsrUsuarioResponsable.value)("loading", _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipeBind1"](13, 13, ctx_r3.isLoadingResp$));
  }
}
// MC SINWEB-98 Pantalla para la autorización de comprobantes
class AutorizarComprobantesComponent {
  constructor(fb, autCompService, modalService, sf, alert, exportacion, authService, configCompService, tourService) {
    this.fb = fb;
    this.autCompService = autCompService;
    this.modalService = modalService;
    this.sf = sf;
    this.alert = alert;
    this.exportacion = exportacion;
    this.authService = authService;
    this.configCompService = configCompService;
    this.tourService = tourService;
    this.MSJ_EXITO_AUTORIZACION = 'Se autorizó correctamente el comprobante seleccionado.';
    this.MSJ_EXITO_RECHAZO = 'Se rechazó correctamente el comprobante seleccionado.';
    this.filtro = true;
    this.filtroMobile = false; // MC SINWEB-118
    this.descripcionComp = '';
    this.isLoadingResp$ = new rxjs__WEBPACK_IMPORTED_MODULE_17__.BehaviorSubject(false);
    this._unsubscribe = [];
    // Atributos para el componente tabla
    this.Autorizaciones = [];
    this.cant_search = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_1__.CANT_SEARCH;
    this.pageOptions = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_1__.PAGE_OPTIONS;
    this.order = 1;
    this.sentido = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_1__.INIT_SENTIDO;
    this.totalItems = 0;
    this.autorizacionesHeader = [{
      Nombre: 'Número',
      Key: 'Numero',
      WCol: '9%'
    }, {
      Nombre: 'Fecha',
      Key: 'FechaComprobante',
      WCol: '6%'
    }, {
      Nombre: 'Proveedor',
      Key: 'Proveedor',
      WCol: '30%'
    }, {
      Nombre: 'Importe',
      Type: 'number',
      Pipe: 'number:1.2-2:es-AR',
      Key: 'Total',
      WCol: '10%'
    }, {
      Nombre: 'Moneda',
      Key: 'Moneda',
      WCol: '10%'
    }, {
      Nombre: 'Tipo',
      Key: 'NombreTipoComprobante',
      Type: 'badge',
      ColorKey: 'TipoComprobanteColor',
      WCol: '8%'
    },
    // MC SINWEB-354 Se formatean diferente los responsables y se agrega la observacion
    {
      Nombre: 'Responsables',
      Key: 'AutConfigComprobante.AutResponsables',
      WCol: '15%',
      Type: 'list',
      Class: 'd-flex gap-1',
      ArrayList: [{
        Type: 'badge',
        Class: 'col-sm-2'
      }, {
        Key: 'UsrUsuario.Nombre',
        Class: 'col-sm-10'
      }]
    }, {
      Nombre: 'Estado',
      Key: 'Estado',
      Type: 'badge',
      ColorKey: 'EstadoColor',
      WCol: '10%'
    }, {
      Nombre: 'Observación',
      Key: 'Descripcion'
    }];
    this.dropdownActions = [{
      Title: 'Autorizar',
      Accion: 'autorizar',
      fieldsActivate: ['Estado'],
      activate: (values, action) => {
        if (values[0] == 'Pendiente autorizar' && action == 'autorizar' && this.permisoModifAutComp) {
          return 'dropdown-item';
        } else {
          return 'dropdown-item disabled';
        }
      }
    }, {
      Title: 'Rechazar',
      Accion: 'rechazar',
      fieldsActivate: ['Estado'],
      activate: (values, action) => {
        if (values[0] == 'Pendiente autorizar' && action == 'rechazar' && this.permisoModifAutComp) {
          return 'dropdown-item';
        } else {
          return 'dropdown-item disabled';
        }
      }
    }, {
      Type: 'divider',
      disabled: true
    }, {
      Title: 'Visualizar config.',
      Accion: 'visualizar'
    }];
    // Búsqueda por número de comprobante
    this.searchForm = this.fb.group({
      NumeroComprobante: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_18__.Validators.maxLength(20)]
    });
    /**
     * SP SINWEB-239 variables para inputs no reactivos
     */
    this.buscarNroComp = '';
    // Filtros
    this.filterForm = this.fb.group({
      FechaComprobanteDesde: [''],
      FechaComprobanteHasta: [''],
      IdTipoComprobante: [-1],
      IdAutEstado: [1],
      IdAutConfigComprobante: [''],
      IdUsrUsuarioResponsable: ['']
    });
    this.filterTipoComprobante = -1;
    this.filterAutEstado = 1;
    this.filterConfigComp = '';
    this.filterResponsable = '';
    this.filterFechaComprobanteDesde = '';
    this.filterFechaComprobanteHasta = '';
    // Modal autorizar/rechazar
    this.modalAutorizar = sweetalert2__WEBPACK_IMPORTED_MODULE_0___default().mixin({
      customClass: {
        cancelButton: 'btn btn-secondary',
        confirmButton: 'btn btn-success ms-2'
      },
      buttonsStyling: false,
      reverseButtons: true
    });
    this.modalRechazar = sweetalert2__WEBPACK_IMPORTED_MODULE_0___default().mixin({
      customClass: {
        cancelButton: 'btn btn-secondary',
        confirmButton: 'btn btn-danger ms-2'
      },
      buttonsStyling: false,
      reverseButtons: true
    });
    // MC SINWEB-105 Permisos
    this.permisoModifAutComp = false;
    // MC SINWEB-121 Configuraciones para mostrar en los filtros
    this.configsComp = [];
    this.responsables = [];
  }
  ngOnInit() {
    this.page = 1;
    this.previousPage = 1;
    this.inicializarSteps();
    this.cargarPermisos();
    this.inicializarEstado();
    this.cargarConfigsComprobantes();
    this.cargarResponsables();
    this.configuracionFilter();
    this.loadPage();
    this.controlarTour();
    this.darkMode = document.querySelector('html').getAttribute('data-bs-theme') === src_app_layouts_layouts_model__WEBPACK_IMPORTED_MODULE_7__.THEME_DARK;
  }
  ngOnDestroy() {
    this._unsubscribe.forEach(sb => sb.unsubscribe());
  }
  /**
   * MC SINWEB-105 Carga de permisos
   */
  cargarPermisos() {
    this.permisoModifAutComp = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_6__.PERMISO_MODIF_AUT_COMP);
    // MC Carga de permisos para dropdown de tabla
    this.dropdownActions[0]['Show'] = this.permisoModifAutComp; // Autorizar
    this.dropdownActions[1]['Show'] = this.permisoModifAutComp; // Rechazar
    this.dropdownActions[2]['Show'] = this.permisoModifAutComp; // divider
    this.dropdownActions[3]['Show'] = true; // Visualizar config.
  }
  /**
   * MC SINWEB-118 Inicializa el estado de los componentes que permite almacenar su estado
   */
  inicializarEstado() {
    this.sf.states = this.sf.pagenamesAUT.AUT_COMP_STATES;
    //busqueda
    this.searchForm.controls.NumeroComprobante.setValue(this.sf.getState(this.sf.states.AUT_COMP_S_NUMERO_COMP));
    this.buscarNroComp = this.sf.getState(this.sf.states.AUT_COMP_S_NUMERO_COMP);
    //filtros
    this.filterForm.controls.FechaComprobanteDesde.setValue(this.sf.getState(this.sf.states.AUT_COMP_F_FECHA_DESDE));
    this.filterForm.controls.FechaComprobanteHasta.setValue(this.sf.getState(this.sf.states.AUT_COMP_F_FECHA_HASTA));
    this.filterTipoComprobante = this.sf.getState(this.sf.states.AUT_COMP_F_TIPO_COMP);
    this.filterAutEstado = this.sf.getState(this.sf.states.AUT_COMP_F_ESTADO_AUT);
    this.filterConfigComp = this.sf.getState(this.sf.states.AUT_COMP_F_CONFIG_COMP); // MC SINWEB-121
    this.filterResponsable = this.sf.getState(this.sf.states.AUT_COMP_F_RESPONSABLE); // MC SINWEB-121
    this.filterForm.controls.IdTipoComprobante.setValue(this.filterTipoComprobante);
    this.filterForm.controls.IdAutEstado.setValue(this.filterAutEstado);
    //listado
    this.page = Number(this.sf.getState(this.sf.states.AUT_COMP_L_PAGE));
    this.cant_search = Number(this.sf.getState(this.sf.states.AUT_COMP_L_PAGESIZE));
    this.order = Number(this.sf.getState(this.sf.states.AUT_COMP_L_ORDER));
    this.sentido = this.sf.getState(this.sf.states.AUT_COMP_L_SENTIDO);
  }
  /**
   * Método que trae los comprobantes del servicio
   * @param {object} datos Datos de búsqueda
   */
  onSearch(datos) {
    const susc = this.autCompService.fetch(datos).subscribe(data => {
      this.Autorizaciones = data.Data;
      if (data.Data != undefined) {
        this.totalItems = data.TotalRecords;
        this.Autorizaciones.forEach((aut, index, array) => {
          array[index]['TipoComprobanteColor'] = aut.TipoComprobante.Id === 5 ? '#85586F' : ' #BA94D1';
          switch (aut.AutEstado.Id) {
            case 1:
              // Pendiente autorizar
              array[index]['EstadoColor'] = '#ff8000';
              break;
            case 2:
              // Autorizado
              array[index]['EstadoColor'] = '#50a5f1';
              break;
            case 3:
              // Rechazado
              array[index]['EstadoColor'] = this.darkMode ? 'rgb(244, 106, 106)' : '#ff0000';
              break;
          }
        });
      } else {
        this.totalItems = 0;
      }
    });
    susc.unsubscribe;
  }
  /**
   * Método que carga los filtros de búsqueda para realizar la petición
   * @param {any} page Página actual
   * @param {any} order Orden
   * @param {any} sentido Sentido (ascendente o descendente)
   * @returns {object} Datos de búsqueda
   */
  cargarFiltros(page, order, sentido) {
    let datos = {};
    // Paginación
    datos.PageNumber = page;
    datos.PageSize = this.cant_search;
    datos.Orden = order;
    datos.SentidoOrden = sentido;
    datos.IdAutEstado = 1;
    if (this.buscarNroComp != undefined && this.buscarNroComp != '') {
      datos.NumeroComprobante = this.buscarNroComp;
    }
    // Filtros
    if (this.filterTipoComprobante >= 0) {
      datos.IdTipoComprobante = this.filterTipoComprobante;
    }
    // MC SINWEB-324 Se aplica el filtro sin importar el valor
    datos.IdAutEstado = this.filterAutEstado;
    if (this.filterConfigComp != '') {
      datos.IdAutConfigComprobante = this.filterConfigComp;
    }
    // if (this.filterResponsable >= 0) {
    if (this.filterResponsable != '') {
      datos.IdUsrUsuarioResponsable = this.filterResponsable;
    }
    // Fechas
    this.filterForm.controls['FechaComprobanteDesde']?.value !== '' ? datos.FechaComprobanteDesde = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__.formatFecha)(this.filterForm.controls['FechaComprobanteDesde']?.value) : delete datos.FechaComprobanteDesde;
    this.filterForm.controls['FechaComprobanteHasta']?.value !== '' ? datos.FechaComprobanteHasta = (0,src_app_core_utils_metodos_metodos__WEBPACK_IMPORTED_MODULE_3__.formatFecha)(this.filterForm.controls['FechaComprobanteHasta']?.value) : delete datos.FechaComprobanteHasta;
    //Almacenar el cambio de estado de los componentes
    if (datos.PageNumber != -1) {
      this.changeStates(datos);
    }
    return datos;
  }
  /**
   * MC SINWEB-118 Método que realiza el cambio de los estados según los valores elegidos
   * @param {any} datos Datos de búsqueda
   */
  changeStates(datos) {
    //busqueda
    this.sf.changeState(this.sf.states.AUT_COMP_S_NUMERO_COMP, !datos.NumeroComprobante ? this.sf.states.AUT_COMP_S_NUMERO_COMP.default : datos.NumeroComprobante);
    //filtros
    this.sf.changeState(this.sf.states.AUT_COMP_F_TIPO_COMP, !datos.IdTipoComprobante ? this.sf.states.AUT_COMP_F_TIPO_COMP.default : datos.IdTipoComprobante);
    // MC SINWEB-324 Se aplica el filtro sin importar el valor
    this.sf.changeState(this.sf.states.AUT_COMP_F_ESTADO_AUT, datos.IdAutEstado);
    this.sf.changeState(this.sf.states.AUT_COMP_F_FECHA_DESDE, !datos.FechaComprobanteDesde ? this.sf.states.AUT_COMP_F_FECHA_DESDE.default : this.filterForm.controls['FechaComprobanteDesde']?.value);
    this.sf.changeState(this.sf.states.AUT_COMP_F_FECHA_HASTA, !datos.FechaComprobanteHasta ? this.sf.states.AUT_COMP_F_FECHA_HASTA.default : this.filterForm.controls['FechaComprobanteHasta']?.value);
    this.sf.changeState(this.sf.states.AUT_COMP_F_CONFIG_COMP, !datos.IdAutConfigComprobante ? this.sf.states.AUT_COMP_F_CONFIG_COMP.default : datos.IdAutConfigComprobante);
    this.sf.changeState(this.sf.states.AUT_COMP_F_RESPONSABLE, !datos.IdUsrUsuarioResponsable ? this.sf.states.AUT_COMP_F_RESPONSABLE.default : datos.IdUsrUsuarioResponsable);
    //listado
    this.sf.changeState(this.sf.states.AUT_COMP_L_PAGE, datos.PageNumber);
    this.sf.changeState(this.sf.states.AUT_COMP_L_PAGESIZE, datos.PageSize);
    this.sf.changeState(this.sf.states.AUT_COMP_L_ORDER, datos.Orden);
    this.sf.changeState(this.sf.states.AUT_COMP_L_SENTIDO, datos.SentidoOrden);
  }
  /**
   * Método para cargar los datos de la página
   */
  loadPage() {
    this.onSearch(this.cargarFiltros(this.page, this.order, this.sentido));
  }
  /**
   * Método para escuchar a los cambios en el formulario de filtros
   */
  configuracionFilter() {
    this._unsubscribe.push(this.filterForm.controls.IdTipoComprobante.valueChanges.subscribe(IdTipoComprobante => {
      if (this.filtro || this.filtroMobile) {
        this.filterTipoComprobante = IdTipoComprobante;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.IdAutEstado.valueChanges.subscribe(IdAutEstado => {
      if (this.filtro || this.filtroMobile) {
        this.filterAutEstado = IdAutEstado;
        this.page = 1;
        this.loadPage();
      }
    }));
    // MC SINWEB-121
    this._unsubscribe.push(this.filterForm.controls.IdAutConfigComprobante.valueChanges.subscribe(IdAutConfigComprobante => {
      if (this.filtro || this.filtroMobile) {
        this.filterConfigComp = IdAutConfigComprobante;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.IdUsrUsuarioResponsable.valueChanges.subscribe(IdUsrUsuarioResponsable => {
      if (this.filtro || this.filtroMobile) {
        this.filterResponsable = IdUsrUsuarioResponsable;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.FechaComprobanteDesde.valueChanges.subscribe(fechaComprobanteDesde => {
      // if (this.filtro || this.filtroMobile){
      this.filterFechaComprobanteDesde = fechaComprobanteDesde;
      this.page = 1;
      this.loadPage();
      //}
    }));
    this._unsubscribe.push(this.filterForm.controls.FechaComprobanteHasta.valueChanges.subscribe(fechaComprobanteHasta => {
      //if (this.filtro || this.filtroMobile){
      this.filterFechaComprobanteHasta = fechaComprobanteHasta;
      this.page = 1;
      this.loadPage();
      //}
    }));
  }
  /**
   * MC SINWEB-98 Método para cambio de página
   * MC SINWEB-324 Se cambia el nombre y acciones del método
   * @param {any} event Evento con la pagina
   */
  lazyLoadChange($event) {
    this.page = $event.page;
    this.order = $event.order;
    this.cant_search = $event.cant;
    this.sentido = $event.sentido;
    this.loadPage();
  }
  /**
   * MC SINWEB-98 Método para activar acción
   * @param {any} event Evento con la acción a realizar
   */
  acciones(event) {
    switch (event.accion) {
      case 'autorizar':
        this.abrirAuth('autorizar', event.registro);
        break;
      case 'rechazar':
        this.abrirAuth('rechazar', event.registro);
        break;
      case 'visualizar':
        this.visualizarConfig(event.registro);
        break;
      default:
        console.log(`La accion ${event.accion} no esta disponible`);
    }
  }
  /**
   * Método para visualizar la configuración de un comprobante
   * @param {any} registro Comprobante con la configuración a visualizar
   */
  visualizarConfig(registro) {
    const modalRef = this.modalService.open(src_app_pages_autorizacion_autorizar_comprobantes_autorizar_comprobantes_view_config_autorizar_comprobantes_view_config_component__WEBPACK_IMPORTED_MODULE_5__.AutorizarComprobantesViewConfigComponent, {
      size: 'lg',
      scrollable: true
    });
    modalRef.componentInstance.registro = registro;
  }
  /**
   * Método que abre el modal para ingresar usuario y contraseña
   * @param {string} accion Autorizar o rechazar
   * @param {any} registro Comprobante a autorizar/rechazar
   */
  abrirAuth(accion, registro) {
    const modalRef = this.modalService.open(src_app_pages_autorizacion_autorizar_comprobantes_autorizar_comprobantes_auth_autorizar_comprobantes_auth_component__WEBPACK_IMPORTED_MODULE_2__.AutorizarComprobantesAuthComponent, {
      size: 'md',
      scrollable: true
    });
    modalRef.componentInstance.Responsables = registro.AutConfigComprobante.AutResponsables;
    modalRef.result.then(obj => {
      if (obj.msj === 'Comprobante autorizado/rechazado correctamente') {
        // Si el usuario que se ingresó coincide con el responsable del comprobante, se autoriza/rechaza
        if (accion == 'autorizar') {
          this.autorizar(registro, obj.IdUsuario);
        } else {
          this.rechazar(registro, obj.IdUsuario);
        }
      } else {
        // Si no coincide, se muestra un error y no se hace nada
        let total = new Intl.NumberFormat('es', {
          style: 'decimal',
          minimumFractionDigits: 2
        }).format(registro.Total);
        // MC SINWEB-118
        let html = `
          <p class="mb-3">El usuario ingresado no es un responsable válido para autorizar el comprobante.</p>
          <p class="fs-5 text-start">
            Número: <span class="fw-bold">${registro.Numero}</span><br>
            Tipo: <span class="fw-bold">${registro.NombreTipoComprobante}</span><br>
            Proveedor: <span class="fw-bold">${registro.Proveedor}</span><br>
            Importe: <span class="fw-bold">${total} (${registro.Moneda})</span><br>
          </p>
        `;
        this.alert.showHtmlAlert('Error', 'error', html, 'Aceptar', false, undefined);
      }
    }, () => {});
  }
  /**
   * MC SINWEB-98 Método que abre el modal para autorizar un comprobante
   * @param {any} registro Comprobante a autorizar/rechazar
   * @param {number} idUsuario Id del usuario que autoriza/rechaza
   */
  autorizar(registro, idUsuario) {
    let total = new Intl.NumberFormat('es', {
      style: 'decimal',
      minimumFractionDigits: 2
    }).format(registro.Total);
    this.modalAutorizar.fire({
      title: 'Autorizar comprobante',
      icon: 'question',
      html: `
          <p class="mb-3">¿Está seguro que desea autorizar el siguiente comprobante?</p>
          <p class="fs-5 text-start">
            Número: <span class="fw-bold">${registro.Numero}</span><br>
            Tipo: <span class="fw-bold">${registro.NombreTipoComprobante}</span><br>
            Proveedor: <span class="fw-bold">${registro.Proveedor}</span><br>
            Importe: <span class="fw-bold">${total} (${registro.Moneda})</span><br>
          </p>
        `,
      confirmButtonText: 'Autorizar',
      cancelButtonText: 'Cancelar',
      showCancelButton: true,
      input: 'textarea',
      inputLabel: 'Observación',
      inputPlaceholder: 'Inserte una observación (opcional)...',
      inputAttributes: {
        class: 'form-control'
      },
      inputValidator: desc => {
        if (desc.length > 500) {
          return 'La observación no puede superar los 500 caracteres';
        }
      }
    }).then(result => {
      if (result.isConfirmed) {
        this.descripcionComp = result.value;
        this.autorizarRechazarComprobante(registro, 'autorizar', idUsuario);
      }
    });
  }
  /**
   * MC SINWEB-98 Método que abre el modal para rechazar un comprobante
   * @param {any} registro Comprobante a autorizar/rechazar
   * @param {number} idUsuario Id del usuario que autoriza/rechaza
   */
  rechazar(registro, idUsuario) {
    let total = new Intl.NumberFormat('es', {
      style: 'decimal',
      minimumFractionDigits: 2
    }).format(registro.Total);
    this.modalRechazar.fire({
      title: 'Rechazar comprobante',
      icon: 'question',
      html: `
          <p class="mb-3">¿Está seguro que desea rechazar el siguiente comprobante?</p>
          <p class="fs-5 text-start">
            Número: <span class="fw-bold">${registro.Numero}</span><br>
            Tipo: <span class="fw-bold">${registro.NombreTipoComprobante}</span><br>
            Proveedor: <span class="fw-bold">${registro.Proveedor}</span><br>
            Importe: <span class="fw-bold">${total} (${registro.Moneda})</span><br>
          </p>
        `,
      confirmButtonText: 'Rechazar',
      cancelButtonText: 'Cancelar',
      showCancelButton: true,
      input: 'textarea',
      inputLabel: 'Observación',
      inputPlaceholder: 'Inserte una observación (opcional)...',
      inputAttributes: {
        class: 'form-control'
      },
      inputValidator: desc => {
        if (desc.length > 500) {
          return 'La observación no puede superar los 500 caracteres';
        }
      }
    }).then(result => {
      if (result.isConfirmed) {
        this.descripcionComp = result.value;
        this.autorizarRechazarComprobante(registro, 'rechazar', idUsuario);
      }
    });
  }
  /**
   * MC SINWEB-98 Método que autoriza/rechaza un comprobante
   * @param {any} registro Comprobante a autorizar/rechazar
   * @param {string} accion Autorizar o rechazar
   * @param {number} idUsuario Id del usuario que autoriza/rechaza
   */
  autorizarRechazarComprobante(registro, accion, idUsuario) {
    let body = {
      Id: registro.Id,
      IdAutConfigComprobante: registro.AutConfigComprobante.Id,
      IdUsrUsuarioResponsable: idUsuario,
      IdAutEstado: accion == 'autorizar' ? 2 : 3,
      IdComprobante: registro.IdComprobante,
      IdTipoComprobante: registro.TipoComprobante.Id,
      Descripcion: this.descripcionComp
    };
    // console.log(body);
    const sbAut = this.autCompService.editar(body, registro.Id).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_19__.tap)(elem => {
      if (!elem.error) {
        if (accion == 'autorizar') {
          this.alert.showBasicAlert(this.MSJ_EXITO_AUTORIZACION, '', 'success');
        } else {
          this.alert.showBasicAlert(this.MSJ_EXITO_RECHAZO, '', 'success');
        }
        this.loadPage();
      }
    })).subscribe();
    sbAut.unsubscribe;
  }
  /**
   * MC SINWEB-118 Método para limpiar los filtros
   */
  cleanStates() {
    this.sf.cleanAllStates();
    this.resetComp();
  }
  resetComp() {
    this._unsubscribe.forEach(sub => {
      sub.unsubscribe();
    });
    this.page = 1;
    this.previousPage = 1;
    /**
     * SP SINWEB-239 filtros no reactivos
     */
    this.buscarNroComp = '';
    //cargar combos de filtros
    this.cargarPermisos();
    this.inicializarEstado();
    this.cargarConfigsComprobantes();
    this.cargarResponsables();
    this.configuracionFilter();
    this.loadPage();
  }
  exportTo(extension) {
    let datos = this.cargarFiltros(-1, this.order, this.sentido);
    delete datos.PageSize;
    //datos.PageSize= this.totalItems; // Usarlo cuando se implemente paginado
    // datos.PageSize = this.Autorizaciones.length;
    const columns = ['Número', 'Fecha', 'Proveedor', 'Importe', 'Moneda', 'Tipo', 'Responsable', 'Estado'];
    const keys = ['Numero', 'FechaComprobante', 'Proveedor', 'Total', 'Moneda', 'NombreTipoComprobante', 'ResponsableString', 'Estado'];
    this.alert.showLoadingAlert('Exportando Autorizaciones', 'Generando archivo ' + extension + ', este proceso puede tardar unos minutos');
    this.autCompService.fetch(datos).subscribe(data => {
      let comps = data.Data;
      comps.forEach((comp, index, array) => {
        if (comp.Usuario) {
          array[index]['ResponsableString'] = comp.Usuario;
        } else {
          let nombresResp = comp.AutConfigComprobante.AutResponsables.map(r => r.UsrUsuario.Nombre);
          array[index]['ResponsableString'] = nombresResp.join(', ');
        }
      });
      this.alert.closeLoadingAlert();
      this.alert.showBasicAlert('Autorizaciones Exportadas', 'Archivo ' + extension + ' generado', 'success');
      // MC SINWEB-378 Exportación a Pdf
      if (extension == 'Excel') {
        this.exportacion.exportToExcel(comps, columns, keys, 'Listado de Autorizaciones');
      } else {
        this.exportacion.exportToPdf(comps, columns, keys, 'Listado de Autorizaciones');
      }
    });
  }
  /**
   * MC SINWEB-121 Método que carga las configuraciones para el filtro
   */
  cargarConfigsComprobantes() {
    this.configsComp = [];
    let datos = {
      PageNumber: -1,
      Orden: 2,
      Activa: 'S'
    };
    const susc = this.configCompService.fetch(datos, undefined, {
      permisos: false
    }).subscribe(resp => {
      this.configsComp = resp.Data;
      this.filterForm.controls.IdAutConfigComprobante.setValue(this.sf.getState(this.sf.states.AUT_COMP_F_CONFIG_COMP), {
        emitEvent: false
      });
    });
    this._unsubscribe.push(susc);
  }
  /**
   * MC SINWEB-121 Método que carga los responsables para el filtro
   */
  cargarResponsables() {
    this.isLoadingResp$.next(true);
    this.responsables = [];
    let datos = {
      PageNumber: -1,
      Orden: 2
    };
    const susc = this.autCompService.getResponsables(datos).subscribe(resp => {
      this.responsables = resp.Data;
      if (this.responsables[0] === null) this.responsables.shift(); // Parche temporal, eliminar cuando se corrija el listado que recibo y no tenga un null
      this.filterForm.controls.IdUsrUsuarioResponsable.setValue(this.sf.getState(this.sf.states.AUT_COMP_F_RESPONSABLE), {
        emitEvent: false
      });
      this.isLoadingResp$.next(false);
    });
    this._unsubscribe.push(susc);
  }
  /**
   * SP Método para filtro de búsqueda
   * @returns {any} Número de comprobante
   */
  getNumero() {
    return this.searchForm.get('NumeroComprobante').value;
  }
  /**
   * Método para resetear el número de comprobante
   */
  borrarNumero() {
    this.searchForm.get('NumeroComprobante').reset('');
    this.page = 1;
    /**
     * SP SINWEB-239 filtros no reactivos
     */
    this.buscarNroComp = '';
    this.loadPage();
  }
  buscarPorNumero() {
    this.page = 1;
    /**
     * SP SINWEB-239 filtros no reactivos
     */
    this.buscarNroComp = this.getNumero();
    this.loadPage();
  }
  /**
   * SP SINWEB-239 filtros no reactivos
   */
  numeroCompBusqueda() {
    return this.buscarNroComp && this.buscarNroComp != '';
  }
  /**
   * MC SINWEB-159 Método que iniciar tour de la vista
   */
  iniciarTour() {
    this.tourService.start();
  }
  /**
   * MC SINWEB-159 Método para inicializar el objecto de pasos del tour
   */
  inicializarSteps() {
    fetch('./assets/tours/autorizacion/autorizar-comprobantes.json').then(response => response.json()).then(tourAutComp => {
      // console.log(tourAutComp)
      this.tourSteps = tourAutComp;
      this.tourService.initialize(this.tourSteps);
    });
  }
  /**
   * MC SINWEB-159 Observable para realizar acciones durante los pasos
   */
  controlarTour() {
    this._unsubscribe.push(this.tourService.stepHide$.subscribe(step => {
      if (step.step.anchorId == 'autorizarComp.anchor.id') {
        this.filtro = true;
      }
    }));
  }
  static #_ = this.ɵfac = function AutorizarComprobantesComponent_Factory(t) {
    return new (t || AutorizarComprobantesComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_18__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](src_app_core_services_autorizacion_autorizacionComprobante_service__WEBPACK_IMPORTED_MODULE_8__.AutorizacionComprobanteService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_20__.NgbModal), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_9__.StatefulService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_4__.AlertCustomService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_10__.ExportacionService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_11__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](src_app_core_services_autorizacion_configComprobantes_service__WEBPACK_IMPORTED_MODULE_12__.ConfigComprobantesService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_21__.TourService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdefineComponent"]({
    type: AutorizarComprobantesComponent,
    selectors: [["app-autorizar-comprobantes"]],
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵProvidersFeature"]([src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_4__.AlertCustomService, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_21__.TourService])],
    decls: 52,
    vars: 25,
    consts: [[1, "row"], ["position", "left", 1, "d-block", "d-lg-none", 3, "visible", "visibleChange"], [1, "m-2"], [3, "ngTemplateOutlet"], ["class", "d-none d-lg-block col-xxl-2 col-lg-3", 4, "ngIf"], [3, "ngClass"], [1, "card"], [1, "card-body", "border-bottom"], [1, "d-flex", "flex-column", "flex-sm-row", "gap-2", "align-items-center"], [1, "mb-0", "card-title", "flex-grow-1", "d-flex", "flex-row"], ["tourAnchor", "autorizarComp.anchor.id", 1, "mb-1", "align-self-center"], [1, "text-primary", 2, "cursor", "pointer", 3, "click"], [1, "bx", "bx-info-circle", "font-size-24", "align-self-center"], [1, "flex-shrink-0", "d-flex", "gap-1"], ["tourAnchor", "refresh.anchor.id", 1, "btn", "btn-light", 3, "click"], ["tourAnchor", "filtroReset.anchor.id", 3, "ngClass", "click"], ["ngbDropdown", "", 1, "dropdown", "d-inline-block"], ["type", "menu", "id", "dropdownMenuButton1", "data-bs-toggle", "dropdown", "aria-expanded", "false", "ngbDropdownToggle", "", "tourAnchor", "export.anchor.id", 1, "btn", "btn-success"], [1, "mdi", "mdi-dots-vertical"], ["aria-labelledby", "dropdownMenuButton1", "ngbDropdownMenu", "", 1, "dropdown-menu"], ["href", "javascript:void(0);", 1, "dropdown-item", 3, "click"], [3, "formGroup"], [1, "row", "g-3", "justify-content-center", "justify-content-lg-start"], [1, "col-auto", "d-none", "d-lg-block"], ["data-cy", "boton-filtro", 1, "btn", "btn-icon", "btn-soft-secondary", "w-100", 3, "click"], [1, "col-auto", "d-block", "d-lg-none"], [1, "btn", "btn-icon", "btn-soft-secondary", "w-100", 3, "click"], [1, "col-xxl-4", "col-lg-4"], ["tourAnchor", "search.anchor.id", 1, "input-group"], ["type", "text", "formControlName", "NumeroComprobante", "placeholder", "Buscar por N\u00FAmero de comprobante", "data-cy", "search-numero", "maxlength", "20", 1, "form-control", 3, "keyup.enter"], ["class", "btn btn-secondary", 3, "click", 4, "ngIf"], [1, "btn", "btn-primary", 3, "click"], [1, "bx", "bx-search-alt-2"], [1, "card-body"], ["title", "Autorizaci\u00F3n de Comprobantes", 3, "columns", "datos", "page", "sentido", "cant_search", "totalItems", "dropdownButtons", "acciones", "apiTable", "isLoading", "lazyLoad", "emitAction"], ["FILTRO", ""], [1, "d-none", "d-lg-block", "col-xxl-2", "col-lg-3"], ["tourAnchor", "filtroAutComp.anchor.id", 1, "card", 3, "formGroup"], [1, "card-body", "p-2"], [1, "btn", "btn-secondary", 3, "click"], [1, "bx", "bx-x"], [3, "multiple", "activeIndex"], ["header", "B\u00E1sicos"], [1, "text-muted"], [3, "defaultValue", "defaultString", "items", "valueSelected", "loading", "valueSelect"], [1, "my-2"], ["formControlName", "IdTipoComprobante", "data-cy", "tipocomp-aut", 1, "form-select"], ["value", "-1", "selected", ""], ["value", "5"], ["value", "18"], ["formControlName", "IdAutEstado", "data-cy", "estado-aut", 1, "form-select"], ["value", ""], ["value", "1"], ["value", "2"], ["value", "3"], ["header", "Avanzados"], [1, "border", "border-1", "rounded", "border-opacity-10", "p-2", "mb-2"], [1, "text-muted", "font-size-12"], ["type", "date", "id", "example-date-input", "formControlName", "FechaComprobanteDesde", "onkeypress", "return false", "onkeydown", "return false", "data-cy", "fechadesde-aut", 1, "form-control", "digits"], ["type", "date", "id", "example-date-input2", "formControlName", "FechaComprobanteHasta", "onkeypress", "return false", "onkeydown", "return false", "data-cy", "fechahasta-aut", 1, "form-control", "digits"]],
    template: function AutorizarComprobantesComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "div", 0)(1, "p-sidebar", 1);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("visibleChange", function AutorizarComprobantesComponent_Template_p_sidebar_visibleChange_1_listener($event) {
          return ctx.filtroMobile = $event;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtemplate"](3, AutorizarComprobantesComponent_ng_template_3_Template, 0, 0, "ng-template", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtemplate"](4, AutorizarComprobantesComponent_div_4_Template, 4, 2, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](5, "div", 5)(6, "div", 6)(7, "div", 7)(8, "div", 8)(9, "span", 9)(10, "h5", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](11, " Autorizaci\u00F3n de Comprobantes ");
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](12, " \u00A0 ");
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](13, "a", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function AutorizarComprobantesComponent_Template_a_click_13_listener() {
          return ctx.iniciarTour();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](14, "i", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](15, "div", 13)(16, "a", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function AutorizarComprobantesComponent_Template_a_click_16_listener() {
          return ctx.loadPage();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](17, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipe"](18, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](19, "a", 15);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function AutorizarComprobantesComponent_Template_a_click_19_listener() {
          return ctx.cleanStates();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](20, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](21, "div", 16)(22, "button", 17);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](23, "i", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](24, "ul", 19)(25, "li")(26, "a", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function AutorizarComprobantesComponent_Template_a_click_26_listener() {
          return ctx.exportTo("Excel");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](27, "Exportar Excel");
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](28, "li")(29, "a", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function AutorizarComprobantesComponent_Template_a_click_29_listener() {
          return ctx.exportTo("Pdf");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](30, "Exportar Pdf");
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()()()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](31, "div", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementContainerStart"](32, 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](33, "div", 22)(34, "div", 23)(35, "a", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function AutorizarComprobantesComponent_Template_a_click_35_listener() {
          return ctx.filtro = !ctx.filtro;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](36, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](37, "div", 25)(38, "a", 26);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function AutorizarComprobantesComponent_Template_a_click_38_listener() {
          return ctx.filtroMobile = !ctx.filtroMobile;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](39, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](40, "div", 27)(41, "div", 28)(42, "input", 29);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("keyup.enter", function AutorizarComprobantesComponent_Template_input_keyup_enter_42_listener() {
          return ctx.buscarPorNumero();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtemplate"](43, AutorizarComprobantesComponent_a_43_Template, 2, 0, "a", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](44, "a", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function AutorizarComprobantesComponent_Template_a_click_44_listener() {
          return ctx.buscarPorNumero();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](45, "i", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementContainerEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](46, "div", 33)(47, "app-table2", 34);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("lazyLoad", function AutorizarComprobantesComponent_Template_app_table2_lazyLoad_47_listener($event) {
          return ctx.lazyLoadChange($event);
        })("emitAction", function AutorizarComprobantesComponent_Template_app_table2_emitAction_47_listener($event) {
          return ctx.acciones($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipe"](48, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtemplate"](49, AutorizarComprobantesComponent_ng_template_49_Template, 48, 16, "ng-template", null, 35, _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtemplateRefExtractor"]);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelement"](51, "app-tour");
      }
      if (rf & 2) {
        const _r4 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵreference"](50);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("visible", ctx.filtroMobile);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngTemplateOutlet", _r4);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngIf", ctx.filtro);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngClass", ctx.filtro ? "col-xxl-10 col-lg-9" : "col-12");
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](12);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipeBind1"](18, 21, ctx.autCompService.isLoading$) ? "bx bx-sync bx-spin font-size-16 align-middle" : "bx bx-sync font-size-16 align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngClass", ctx.sf.getCantCustomStates() > 0 ? "btn btn-danger" : "btn bg-danger bg-soft");
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngClass", "mdi mdi-filter-remove-outline mdi-16px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](12);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("formGroup", ctx.searchForm);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngClass", !ctx.filtro ? "mdi mdi-filter-outline mdi-18px align-middle" : "mdi mdi-filter-off-outline mdi-18px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngClass", !ctx.filtroMobile ? "mdi mdi-filter-outline mdi-18px align-middle" : "mdi mdi-filter-off-outline mdi-18px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngIf", ctx.numeroCompBusqueda());
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("columns", ctx.autorizacionesHeader)("datos", ctx.Autorizaciones)("page", ctx.page)("sentido", ctx.sentido)("cant_search", ctx.cant_search)("totalItems", ctx.totalItems)("dropdownButtons", ctx.dropdownActions)("acciones", ctx.permisoModifAutComp)("apiTable", true)("isLoading", _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipeBind1"](48, 23, ctx.autCompService.isLoading$));
      }
    },
    dependencies: [primeng_accordion__WEBPACK_IMPORTED_MODULE_22__.Accordion, primeng_accordion__WEBPACK_IMPORTED_MODULE_22__.AccordionTab, _angular_common__WEBPACK_IMPORTED_MODULE_23__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_23__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_23__.NgTemplateOutlet, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_18__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_18__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.MaxLengthValidator, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_20__.NgbDropdown, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_20__.NgbDropdownToggle, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_20__.NgbDropdownMenu, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.FormControlName, primeng_sidebar__WEBPACK_IMPORTED_MODULE_24__.Sidebar, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_21__.TourAnchorNgBootstrapDirective, _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_13__.TourComponent, _shared_ui_select_loading_select_loading_component__WEBPACK_IMPORTED_MODULE_14__.SelectLoadingComponent, _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_15__.Table2Component, _angular_common__WEBPACK_IMPORTED_MODULE_23__.AsyncPipe]
  });
}

/***/ }),

/***/ 18239:
/*!***********************************************************************************************************************!*\
  !*** ./src/app/pages/autorizacion/config-comprobantes/config-comprobantes-edit/config-comprobantes-edit.component.ts ***!
  \***********************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ConfigComprobantesEditComponent: () => (/* binding */ ConfigComprobantesEditComponent)
/* harmony export */ });
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/services/core/viewHelper.service */ 4506);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var src_app_core_services_autorizacion_configComprobantes_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/services/autorizacion/configComprobantes.service */ 2029);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ngx-toastr */ 2425);
/* harmony import */ var src_app_core_services_core_proveedor_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/services/core/proveedor.service */ 19803);
/* harmony import */ var src_app_core_services_autorizacion_excepcionProveedor_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/services/autorizacion/excepcionProveedor.service */ 92542);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _core_directives_campo_obligatorio_directive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../core/directives/campo-obligatorio.directive */ 61528);
/* harmony import */ var _ng_select_ng_select__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @ng-select/ng-select */ 54807);
/* harmony import */ var _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/ui/input-number/input-number.component */ 62271);














function ConfigComprobantesEditComponent_ng_container_3_ng_container_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, "Editar");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
}
function ConfigComprobantesEditComponent_ng_container_3_ng_container_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, "Nueva");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
}
function ConfigComprobantesEditComponent_ng_container_3_ng_container_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtextInterpolate1"]("'", ctx_r7.configComp.Nombre, "'");
  }
}
function ConfigComprobantesEditComponent_ng_container_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](1, ConfigComprobantesEditComponent_ng_container_3_ng_container_1_Template, 2, 0, "ng-container", 3)(2, ConfigComprobantesEditComponent_ng_container_3_ng_container_2_Template, 2, 0, "ng-container", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](3, " Configuraci\u00F3n de Autorizaci\u00F3n de Comprobante ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](4, ConfigComprobantesEditComponent_ng_container_3_ng_container_4_Template, 2, 1, "ng-container", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r0.configComp.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", !ctx_r0.configComp.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r0.configComp.Id);
  }
}
function ConfigComprobantesEditComponent_ng_container_5_div_7_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 28);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Nombre correcto ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function ConfigComprobantesEditComponent_ng_container_5_div_8_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 29);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Nombre de configuraci\u00F3n requerido ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function ConfigComprobantesEditComponent_ng_container_5_div_9_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 30);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Nombre no debe tener m\u00E1s de 100 caracteres ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function ConfigComprobantesEditComponent_ng_container_5_div_14_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Descripci\u00F3n correcta ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function ConfigComprobantesEditComponent_ng_container_5_div_15_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 32);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Descripci\u00F3n no debe tener m\u00E1s de 200 caracteres ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function ConfigComprobantesEditComponent_ng_container_5_div_16_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 20)(1, "label", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](2, "Tipo de Comprobante");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](3, "select", 33)(4, "option", 24);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](5, " Seleccione tipo de comprobante ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](6, "option", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](7, "Orden de Pago");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](8, "option", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](9, "Pedido Compra");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()();
  }
}
function ConfigComprobantesEditComponent_ng_container_5_div_17_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 20)(1, "label", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](2, "Modo de Autorizaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](3, "select", 36)(4, "option", 37);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](5, "Seleccione el Modo");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](6, "option", 38);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](7, "General");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](8, "option", 39);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](9, "Por Proveedor");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()();
  }
}
function ConfigComprobantesEditComponent_ng_container_5_ng_container_26_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](1, "option", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const moneda_r17 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpropertyInterpolate"]("value", moneda_r17.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtextInterpolate"](moneda_r17.Nombre);
  }
}
const _c0 = () => ({
  standalone: true
});
function ConfigComprobantesEditComponent_ng_container_5_div_28_ng_template_6_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](0, "input", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1);
  }
  if (rf & 2) {
    const item_r20 = ctx.item;
    const item$_r21 = ctx.item$;
    const index_r22 = ctx.index;
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpropertyInterpolate1"]("id", "item-", index_r22, "");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngModel", item$_r21.selected)("ngModelOptions", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpureFunction0"](5, _c0));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtextInterpolate2"](" (", item_r20.Codigo, ") ", item_r20.Nombre, " ");
  }
}
const _c1 = a0 => ({
  "bg-light": a0
});
function ConfigComprobantesEditComponent_ng_container_5_div_28_Template(rf, ctx) {
  if (rf & 1) {
    const _r24 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 41)(1, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](2, " Seleccionar proveedor/es ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](3, "i", 42, 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("click", function ConfigComprobantesEditComponent_ng_container_5_div_28_Template_i_click_3_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r24);
      const _r18 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵreference"](4);
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](_r18.open());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](5, "ng-select", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("ngModelChange", function ConfigComprobantesEditComponent_ng_container_5_div_28_Template_ng_select_ngModelChange_5_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r24);
      const ctx_r25 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r25.modelChanged($event));
    })("ngModelChange", function ConfigComprobantesEditComponent_ng_container_5_div_28_Template_ng_select_ngModelChange_5_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r24);
      const ctx_r26 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r26.proveedorSelected = $event);
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](6, ConfigComprobantesEditComponent_ng_container_5_div_28_ng_template_6_Template, 2, 6, "ng-template", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r16 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpureFunction1"](6, _c1, ctx_r16.formGroup.controls.ModoAut.value != "P" && ctx_r16.formGroup.controls.ModoAut.value != "Por Proveedor"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("readonly", ctx_r16.formGroup.controls.ModoAut.value != "P" && ctx_r16.formGroup.controls.ModoAut.value != "Por Proveedor")("items", ctx_r16.proveedores)("multiple", true)("closeOnSelect", false)("ngModel", ctx_r16.proveedorSelected);
  }
}
function ConfigComprobantesEditComponent_ng_container_5_Template(rf, ctx) {
  if (rf & 1) {
    const _r28 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](1, "form", 8)(2, "div", 9)(3, "div", 10)(4, "label", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](5, "Nombre");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](6, "input", 12);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](7, ConfigComprobantesEditComponent_ng_container_5_div_7_Template, 2, 0, "div", 13)(8, ConfigComprobantesEditComponent_ng_container_5_div_8_Template, 2, 0, "div", 14)(9, ConfigComprobantesEditComponent_ng_container_5_div_9_Template, 2, 0, "div", 15);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](10, "div", 10)(11, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](12, "Descripci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](13, "textarea", 16);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](14, ConfigComprobantesEditComponent_ng_container_5_div_14_Template, 2, 0, "div", 17)(15, ConfigComprobantesEditComponent_ng_container_5_div_15_Template, 2, 0, "div", 18);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](16, ConfigComprobantesEditComponent_ng_container_5_div_16_Template, 10, 0, "div", 19)(17, ConfigComprobantesEditComponent_ng_container_5_div_17_Template, 10, 0, "div", 19);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](18, "div", 20)(19, "app-input-number", 21);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("emitValue", function ConfigComprobantesEditComponent_ng_container_5_Template_app_input_number_emitValue_19_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r28);
      const ctx_r27 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r27.cambioMonto($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](20, "div", 20)(21, "label", 22);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](22, "Moneda");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](23, "select", 23)(24, "option", 24);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](25, "Seleccione la moneda");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](26, ConfigComprobantesEditComponent_ng_container_5_ng_container_26_Template, 3, 2, "ng-container", 25);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](27, "div", 26);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](28, ConfigComprobantesEditComponent_ng_container_5_div_28_Template, 7, 8, "div", 27);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    const _r4 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵreference"](11);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("formGroup", ctx_r1.formGroup);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵclassProp"]("is-invalid", ctx_r1.vh.isControlInvalid("Nombre"))("is-valid", ctx_r1.vh.isControlValid("Nombre"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r1.vh.isControlValid("Nombre"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r1.vh.controlHasError("required", "Nombre"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r1.vh.controlHasError("maxlength", "Nombre"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵclassProp"]("is-invalid", ctx_r1.vh.isControlInvalid("Descripcion"))("is-valid", ctx_r1.vh.isControlValid("Descripcion"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r1.vh.isControlValid("Descripcion"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r1.vh.controlHasError("maxlength", "Descripcion"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", !ctx_r1.configComp.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", !ctx_r1.configComp.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("title", "Monto *")("value", ctx_r1.formGroup.controls.Monto.value)("decimals", 2)("allowNegatives", false)("isValid", ctx_r1.vh.isControlValid("Monto"))("isInvalid", ctx_r1.vh.isControlInvalid("Monto"))("templateErrors", _r4);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngForOf", ctx_r1.monedas);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r1.proveedores);
  }
}
function ConfigComprobantesEditComponent_ng_container_9_i_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](0, "i", 49);
  }
}
function ConfigComprobantesEditComponent_ng_container_9_Template(rf, ctx) {
  if (rf & 1) {
    const _r31 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](1, "button", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("click", function ConfigComprobantesEditComponent_ng_container_9_Template_button_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r31);
      const ctx_r30 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r30.save());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](2, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](3, " Guardar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](4, ConfigComprobantesEditComponent_ng_container_9_i_4_Template, 1, 0, "i", 48);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](5, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("disabled", ctx_r2.formGroup.invalid || _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](2, 2, ctx_r2.configCompsService.isLoading$) || (ctx_r2.formGroup.controls.ModoAut.value == "P" || ctx_r2.formGroup.controls.ModoAut.value == "Por Proveedor") && ctx_r2.proveedorSelected.length == 0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](5, 4, ctx_r2.configCompsService.isLoading$));
  }
}
function ConfigComprobantesEditComponent_ng_template_10_div_0_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Monto correcto ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function ConfigComprobantesEditComponent_ng_template_10_div_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Monto requerido ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function ConfigComprobantesEditComponent_ng_template_10_div_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 55);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, " Monto debe ser mayor a 0 ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
  }
}
function ConfigComprobantesEditComponent_ng_template_10_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](0, ConfigComprobantesEditComponent_ng_template_10_div_0_Template, 2, 0, "div", 50)(1, ConfigComprobantesEditComponent_ng_template_10_div_1_Template, 2, 0, "div", 51)(2, ConfigComprobantesEditComponent_ng_template_10_div_2_Template, 2, 0, "div", 52);
  }
  if (rf & 2) {
    const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r3.vh.isControlValid("Monto"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r3.vh.controlHasError("required", "Monto"));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r3.vh.controlHasError("min", "Monto"));
  }
}
// MC SINWEB-96 Componente encargado de la edición/creación de una configuración de autorización de comprobantes
class ConfigComprobantesEditComponent {
  constructor(configCompsService, fb, modal, toast, vh, proveedorService, excepcionProveedorService) {
    this.configCompsService = configCompsService;
    this.fb = fb;
    this.modal = modal;
    this.toast = toast;
    this.vh = vh;
    this.proveedorService = proveedorService;
    this.excepcionProveedorService = excepcionProveedorService;
    this.subscriptions = [];
    this.proveedores = []; // Arreglo con los proveedores completos
    this.proveedorSelected = []; // Arreglo con los proveedores seleccionados, tanto nuevos como existentes
    this.proveedorExistente = []; // Arreglo con los proveedores que ya existen en la configuración
  }
  ngOnInit() {
    if (!this.configComp) {
      this.configComp = {
        Id: undefined,
        Nombre: '',
        Descripcion: '',
        Monto: undefined,
        TipoMoneda: {},
        TipoComprobante: {},
        ModoAut: undefined,
        Activa: 'S'
      };
    } else {
      if (this.configComp.AutExcepcionesProveedores) {
        this.proveedorSelected = [];
        this.configComp.AutExcepcionesProveedores.forEach(prov => {
          this.proveedorSelected.push(prov.Proveedor.Id);
        });
        this.proveedorExistente = this.proveedorSelected;
      }
    }
    // console.log(this.configComp);
    this.loadForm();
    this.cargarProveedor();
  }
  // MC SINWEB-96 Formulario para inicializar el formulario de la configuración
  loadForm() {
    this.formGroup = this.fb.group({
      Nombre: [this.configComp.Nombre, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.maxLength(100)])],
      Descripcion: [this.configComp.Descripcion, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.maxLength(200)])],
      Monto: [this.configComp.Monto, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.min(0)])],
      // Monto: [this.formatImporte(this.configComp.Monto), Validators.compose([Validators.required, Validators.min(1)])],
      IdTipoMoneda: [this.configComp.TipoMoneda.Id, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
      IdTipoComprobante: [this.configComp.TipoComprobante.Id, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
      ModoAut: [this.configComp.ModoAut, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])],
      Activa: [this.configComp.Activa]
    });
    this.vh.inicializar();
    this.vh.formGroup = this.formGroup;
    const sb = this.formGroup.controls.ModoAut.valueChanges.subscribe(modo => {
      if (modo == 'G') {
        this.proveedorSelected = [];
      }
    });
    this.subscriptions.push(sb);
  }
  // MC SINWEB-96 Función para guardar cambios de una edición o creación de la configuración
  save() {
    this.formGroup.markAllAsTouched();
    if (!this.formGroup.valid) {
      return;
    }
    this.prepareConfigComp();
    if (this.configComp.Id) {
      this.edit();
    } else {
      this.create();
    }
  }
  // MC SINWEB-96 Función que edita una configuración existente
  edit() {
    let conf = this.prepareConfigComp();
    const sbUpdate = this.configCompsService.editar(conf, this.configComp.Id).subscribe(res => {
      if (res.Errors == null) {
        this.modal.close();
      }
    });
    this.subscriptions.push(sbUpdate);
  }
  // MC SINWEB-96 Función que crea una nueva configuración
  create() {
    let conf = this.prepareConfigComp();
    const sbCreate = this.configCompsService.nuevo(conf).subscribe(res => {
      if (res.Errors == null) {
        this.modal.close();
      }
    });
    this.subscriptions.push(sbCreate);
  }
  // MC SINWEB-96 Función que prepara el formulario para ser enviado al momento de la edición/creación
  prepareConfigComp() {
    let configCompPreparada = {
      Nombre: this.formGroup.controls.Nombre.value,
      Descripcion: this.formGroup.controls.Descripcion.value,
      Monto: this.formGroup.controls.Monto.value,
      IdTipoMoneda: Number(this.formGroup.controls.IdTipoMoneda.value),
      IdTipoComprobante: Number(this.formGroup.controls.IdTipoComprobante.value),
      ModoAut: this.formGroup.controls.ModoAut.value,
      Activa: this.formGroup.controls.Activa.value
    };
    if (this.configComp.Id) {
      // Si estoy editando una configuración creada, trato especialmente la propiedad ModoAut porque en la pantalla principal modifiqué el dato y no lo recibo como "G" o "P", sino como "General" o "Por Proveedor"
      configCompPreparada.ModoAut = this.formGroup.controls.ModoAut.value === 'General' ? 'G' : 'P';
    }
    if (this.configComp.Id) {
      // Si estoy editando una configuración creada, trato especialmente la propiedad Activa porque en la pantalla principal modifiqué el dato y no lo recibo como "S" o "N", sino como "Activa" o "Inactiva"
      configCompPreparada.Activa = this.formGroup.controls.Activa.value === 'Activa' ? 'S' : 'N';
    }
    if (configCompPreparada.ModoAut == 'P') {
      let AutExcepcionesProveedores = [];
      this.proveedorSelected.forEach(id => {
        AutExcepcionesProveedores.push({
          IdProveedor: id
        });
      });
      // Si estoy editando una configuración creada, también le agrego la Id de la configuración junto con la Id del proveedor
      if (this.configComp.Id) {
        AutExcepcionesProveedores.forEach(excepcion => {
          excepcion['IdAutConfigComprobante'] = this.configComp.Id;
          // Además, si el proveedor ya estaba en la configuración, le agrego la Id de la excepción (para verificaciones del backend)
          if (this.proveedorExistente.includes(excepcion.IdProveedor)) {
            excepcion['Id'] = this.configComp.AutExcepcionesProveedores.find(ex => ex.Proveedor.Id == excepcion.IdProveedor).Id;
          }
        });
      }
      configCompPreparada['AutExcepcionesProveedores'] = AutExcepcionesProveedores;
    }
    return configCompPreparada;
  }
  // MC SINWEB-96 Función que carga los proveedores mostrados en el select
  cargarProveedor() {
    let datos = {};
    datos.PageNumber = -1;
    datos.Orden = 3;
    datos.EstadoProveedor = 'A';
    const susc = this.proveedorService.fetch(datos).subscribe(data => {
      this.proveedores = data.Data;
    });
    susc.unsubscribe;
  }
  // MC SINWEB-96 Función que se ejecuta al seleccionar un proveedor en el select
  modelChanged(event) {
    this.proveedorSelected = event;
  }
  cambioMonto(event) {
    if (event >= 0) {
      this.formGroup.controls.Monto.setValue(event);
      this.formGroup.controls.Monto.markAsTouched();
    }
  }
  ngOnDestroy() {
    this.subscriptions.forEach(sb => sb.unsubscribe());
  }
  static #_ = this.ɵfac = function ConfigComprobantesEditComponent_Factory(t) {
    return new (t || ConfigComprobantesEditComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](src_app_core_services_autorizacion_configComprobantes_service__WEBPACK_IMPORTED_MODULE_1__.ConfigComprobantesService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__.NgbActiveModal), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](ngx_toastr__WEBPACK_IMPORTED_MODULE_9__.ToastrService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__.ViewHelperService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](src_app_core_services_core_proveedor_service__WEBPACK_IMPORTED_MODULE_2__.ProveedorService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](src_app_core_services_autorizacion_excepcionProveedor_service__WEBPACK_IMPORTED_MODULE_3__.ExcepcionProveedorService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdefineComponent"]({
    type: ConfigComprobantesEditComponent,
    selectors: [["app-config-comprobantes-edit"]],
    inputs: {
      configComp: "configComp",
      monedas: "monedas"
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵProvidersFeature"]([src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__.ViewHelperService])],
    decls: 12,
    vars: 3,
    consts: [[1, "modal-content"], [1, "modal-header"], ["id", "example-modal-sizes-title-lg", 1, "modal-title", "h4"], [4, "ngIf"], [1, "overlay", "overlay-block", "cursor-default", "modal-body", 2, "min-height", "200px"], [1, "modal-footer"], ["type", "button", 1, "btn", "btn-light", "btn-elevate", "mr-2", 3, "click"], ["MONTO_ERROR", ""], ["action", "#", 1, "form", "form-label-right", 3, "formGroup"], [1, "form-group", "row"], [1, "col-lg-12", "p-2"], ["campoObligatorio", "", 1, "form-label"], ["type", "text", "name", "Nombre", "autocomplete", "off", "formControlName", "Nombre", "data-cy", "nombre-config", 1, "form-control", "form-control-solid"], ["class", "valid-feedback", "data-cy", "nombre-config-valid", 4, "ngIf"], ["class", "invalid-feedback animate__animated animate__shakeX", "data-cy", "nombre-config-error-required", 4, "ngIf"], ["class", "invalid-feedback animate__animated animate__shakeX", "data-cy", "nombre-config-error-maxlength", 4, "ngIf"], ["name", "Descripcion", "name", "Descripcion", "formControlName", "Descripcion", "data-cy", "descripcion-config", 1, "form-control", "form-control-solid"], ["class", "valid-feedback", "data-cy", "descripcion-config-valid", 4, "ngIf"], ["class", "invalid-feedback animate__animated animate__shakeX", "data-cy", "descripcion-config-error-maxlength", 4, "ngIf"], ["class", "col-lg-6 p-2", 4, "ngIf"], [1, "col-lg-6", "p-2"], [3, "title", "value", "decimals", "allowNegatives", "isValid", "isInvalid", "templateErrors", "emitValue"], ["campoObligatorio", ""], ["placeholder", "Buscar moneda", "name", "IdTipoMoneda", "formControlName", "IdTipoMoneda", "data-cy", "moneda-config", 1, "form-control", "form-control-lg", "form-control-solid", "form-select"], ["value", "null", "disabled", ""], [4, "ngFor", "ngForOf"], [1, "form-group", "row", "mt-3", "p-2"], ["class", "col-lg-12 py-3 rounded", "data-cy", "div-prov", 3, "ngClass", 4, "ngIf"], ["data-cy", "nombre-config-valid", 1, "valid-feedback"], ["data-cy", "nombre-config-error-required", 1, "invalid-feedback", "animate__animated", "animate__shakeX"], ["data-cy", "nombre-config-error-maxlength", 1, "invalid-feedback", "animate__animated", "animate__shakeX"], ["data-cy", "descripcion-config-valid", 1, "valid-feedback"], ["data-cy", "descripcion-config-error-maxlength", 1, "invalid-feedback", "animate__animated", "animate__shakeX"], ["formControlName", "IdTipoComprobante", "data-cy", "tipocomp-config", 1, "form-select"], ["value", "5"], ["value", "18"], ["formControlName", "ModoAut", "data-cy", "modoaut-config", 1, "form-select"], ["value", "null", "disabled", "", "selected", ""], ["value", "G"], ["value", "P"], [3, "value"], ["data-cy", "div-prov", 1, "col-lg-12", "py-3", "rounded", 3, "ngClass"], ["ngbTooltip", "Opci\u00F3n disponible solo para el modo de autorizaci\u00F3n 'Por Proveedor'. Indica la lista de proveedores asociados a la configuraci\u00F3n actual.", "placement", "top", 1, "mdi", "mdi-information-outline", "me-1", 3, "click"], ["t", "ngbTooltip"], ["bindLabel", "Nombre", "bindValue", "Id", "data-cy", "select-prov", 3, "readonly", "items", "multiple", "closeOnSelect", "ngModel", "ngModelChange"], ["ng-option-tmp", ""], ["type", "checkbox", 3, "id", "ngModel", "ngModelOptions"], ["type", "submit", "data-cy", "guardar-config", 1, "btn", "btn-success", "btn-elevate", 3, "disabled", "click"], ["Class", "bx bx-sync bx-spin font-size-16 align-middle", 4, "ngIf"], ["Class", "bx bx-sync bx-spin font-size-16 align-middle"], ["class", "valid-feedback", "data-cy", "monto-config-valid", 4, "ngIf"], ["class", "invalid-feedback animate__animated animate__shakeX", "data-cy", "monto-config-error-required", 4, "ngIf"], ["class", "invalid-feedback animate__animated animate__shakeX", "data-cy", "monto-config-error-min", 4, "ngIf"], ["data-cy", "monto-config-valid", 1, "valid-feedback"], ["data-cy", "monto-config-error-required", 1, "invalid-feedback", "animate__animated", "animate__shakeX"], ["data-cy", "monto-config-error-min", 1, "invalid-feedback", "animate__animated", "animate__shakeX"]],
    template: function ConfigComprobantesEditComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](3, ConfigComprobantesEditComponent_ng_container_3_Template, 5, 3, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](4, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](5, ConfigComprobantesEditComponent_ng_container_5_Template, 29, 25, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](6, "div", 5)(7, "button", 6);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("click", function ConfigComprobantesEditComponent_Template_button_click_7_listener() {
          return ctx.modal.dismiss();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](8, " Cancelar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](9, ConfigComprobantesEditComponent_ng_container_9_Template, 6, 6, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](10, ConfigComprobantesEditComponent_ng_template_10_Template, 3, 3, "ng-template", null, 7, _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplateRefExtractor"]);
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.configComp);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.configComp);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.configComp);
      }
    },
    dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_10__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_10__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_10__.NgIf, _core_directives_campo_obligatorio_directive__WEBPACK_IMPORTED_MODULE_4__.CampoObligatorioDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_7__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_7__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.CheckboxControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgModel, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__.NgbTooltip, _ng_select_ng_select__WEBPACK_IMPORTED_MODULE_11__.NgSelectComponent, _ng_select_ng_select__WEBPACK_IMPORTED_MODULE_11__.NgOptionTemplateDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormControlName, _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_5__.InputNumberComponent, _angular_common__WEBPACK_IMPORTED_MODULE_10__.AsyncPipe],
    styles: ["input[_ngcontent-%COMP%]::-webkit-outer-spin-button, input[_ngcontent-%COMP%]::-webkit-inner-spin-button {\n  -webkit-appearance: none;\n  margin: 0;\n}\n\ninput[type=number][_ngcontent-%COMP%] {\n  -moz-appearance: textfield;\n}\n\n  .accordion .accordion-item {\n  color: #495057 !important;\n}"]
  });
}

/***/ }),

/***/ 54959:
/*!*****************************************************************************************!*\
  !*** ./src/app/pages/autorizacion/config-comprobantes/config-comprobantes.component.ts ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ConfigComprobantesComponent: () => (/* binding */ ConfigComprobantesComponent)
/* harmony export */ });
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ngx-ui-tour-ng-bootstrap */ 58469);
/* harmony import */ var src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/utils/constantes/constantes */ 74506);
/* harmony import */ var _config_comprobantes_edit_config_comprobantes_edit_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config-comprobantes-edit/config-comprobantes-edit.component */ 18239);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! rxjs/operators */ 99397);
/* harmony import */ var src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/services/alertCustom.service */ 53206);
/* harmony import */ var src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/utils/permisos/permisos-autorizacion */ 92558);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _angular_common_locales_es__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @angular/common/locales/es */ 46828);
/* harmony import */ var src_app_layouts_layouts_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/layouts/layouts.model */ 45660);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var src_app_core_services_autorizacion_configComprobantes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/core/services/autorizacion/configComprobantes.service */ 2029);
/* harmony import */ var src_app_core_services_core_tipoMoneda_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/core/services/core/tipoMoneda.service */ 29845);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/core/services/stateful.service */ 689);
/* harmony import */ var src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/core/services/exportacion.service */ 18969);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var primeng_accordion__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! primeng/accordion */ 65389);
/* harmony import */ var primeng_sidebar__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! primeng/sidebar */ 99246);
/* harmony import */ var _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../shared/widget/tour/tour.component */ 63481);
/* harmony import */ var _shared_ui_select_loading_select_loading_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../shared/ui/select-loading/select-loading.component */ 24718);
/* harmony import */ var _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../shared/ui/table2/table2.component */ 63033);







// MC SINWEB-96 Importaciones necesarias para formatear números en español



















function ConfigComprobantesComponent_ng_template_3_Template(rf, ctx) {}
function ConfigComprobantesComponent_div_4_ng_template_3_Template(rf, ctx) {}
function ConfigComprobantesComponent_div_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](0, "div", 37)(1, "div", 38)(2, "div", 39);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtemplate"](3, ConfigComprobantesComponent_div_4_ng_template_3_Template, 0, 0, "ng-template", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵnextContext"]();
    const _r5 = _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵreference"](51);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("formGroup", ctx_r1.filterForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("ngTemplateOutlet", _r5);
  }
}
function ConfigComprobantesComponent_a_16_Template(rf, ctx) {
  if (rf & 1) {
    const _r8 = _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](0, "a", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("click", function ConfigComprobantesComponent_a_16_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵrestoreView"](_r8);
      const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵresetView"](ctx_r7.nuevo());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](1, "span", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](2, "Nueva Configuraci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](3, "i", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
  }
}
function ConfigComprobantesComponent_a_44_Template(rf, ctx) {
  if (rf & 1) {
    const _r10 = _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](0, "a", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("click", function ConfigComprobantesComponent_a_44_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵrestoreView"](_r10);
      const ctx_r9 = _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵresetView"](ctx_r9.borrarNombre());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](1, "i", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
  }
}
const _c0 = () => [0];
function ConfigComprobantesComponent_ng_template_50_Template(rf, ctx) {
  if (rf & 1) {
    const _r12 = _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](0, "div", 22)(1, "p-accordion", 45)(2, "p-accordionTab", 46)(3, "div")(4, "p", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](5, "Moneda");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](6, "select-loading", 48);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("valueSelect", function ConfigComprobantesComponent_ng_template_50_Template_select_loading_valueSelect_6_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵrestoreView"](_r12);
      const ctx_r11 = _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵresetView"](ctx_r11.filterForm.controls.IdTipoMoneda.setValue($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵpipe"](7, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](8, "hr", 49);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](9, "div")(10, "p", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](11, "Tipo de Comprobante");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](12, "select", 50)(13, "option", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](14, "Todos");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](15, "option", 52);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](16, "Orden de Pago");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](17, "option", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](18, "Pedido Compra");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](19, "hr", 49);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](20, "div")(21, "p", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](22, "Modo de Autorizaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](23, "select", 54)(24, "option", 55);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](25, "Todos");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](26, "option", 56);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](27, "General");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](28, "option", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](29, "Por Proveedor");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](30, "hr", 49);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](31, "div")(32, "p", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](33, "Estado");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](34, "select", 58)(35, "option", 55);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](36, "Todos");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](37, "option", 59);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](38, "Activa");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](39, "option", 60);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](40, "Inactiva");
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()()()()()();
  }
  if (rf & 2) {
    const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("formGroup", ctx_r4.filterForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("multiple", true)("activeIndex", _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵpureFunction0"](10, _c0));
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("defaultValue", -1)("defaultString", "Todos")("items", ctx_r4.monedas)("valueSelected", ctx_r4.filterForm.controls.IdTipoMoneda.value)("loading", _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵpipeBind1"](7, 8, ctx_r4.tipoMonedaService.isLoading$));
  }
}
const MSJ_EXITO_INSERCION = 'Se insertó correctamente una configuración.';
const MSJ_EXITO_EDICION = 'Se modificó correctamente la configuración.';
const MSJ_EXITO_ELIMINACION = 'Se eliminó correctamente la configuración seleccionada.';
const MSJ_EXITO_ACTIVACION = 'Se activó correctamente la configuración seleccionada';
const MSJ_EXITO_DESACTIVACION = 'Se desactivó correctamente la configuración seleccionada';
// MC SINWEB-96 Pantalla para configurar la autorización de comprobantes
class ConfigComprobantesComponent {
  constructor(fb, configCompsService, tipoMonedaService, modalService, sf, alert, exportacion, authService, tourService) {
    this.fb = fb;
    this.configCompsService = configCompsService;
    this.tipoMonedaService = tipoMonedaService;
    this.modalService = modalService;
    this.sf = sf;
    this.alert = alert;
    this.exportacion = exportacion;
    this.authService = authService;
    this.tourService = tourService;
    this.filtro = true;
    this.filtroMobile = false; // MC SINWEB-118
    this.unsubscribe = [];
    // Atributos para el componente tabla
    this.ConfigsComp = [];
    this.cant_search = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.CANT_SEARCH;
    this.pageOptions = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.PAGE_OPTIONS;
    this.order = 2;
    this.sentido = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_0__.INIT_SENTIDO;
    this.totalItems = 0;
    this.configsCompHeader = [{
      Nombre: 'Nombre',
      Order: 2,
      Key: 'Nombre',
      WCol: '35%'
    }, {
      Nombre: 'Descripción',
      Key: 'Descripcion',
      WCol: '15%'
    }, {
      Nombre: 'Monto',
      Order: 3,
      Key: 'Monto',
      Type: 'number',
      Pipe: 'number:1.2-2',
      WCol: '8%'
    }, {
      Nombre: 'Moneda',
      Order: 4,
      Key: 'TipoMoneda.Nombre',
      WCol: '12%'
    }, {
      Nombre: 'Tipo',
      Order: 5,
      Key: 'TipoComprobante.Nombre',
      Type: 'badge',
      ColorKey: 'TipoComprobanteColor',
      WCol: '8%'
    }, {
      Nombre: 'Modo',
      Order: 6,
      Key: 'ModoAut',
      Type: 'badge',
      ColorKey: 'ModoAutColor',
      WCol: '8%'
    }, {
      Nombre: 'Estado',
      Order: 7,
      Type: 'badge',
      ColorKey: 'ActivaColor',
      Key: 'Activa',
      WCol: '7%'
    }];
    this.dropdownActions = [{
      Title: 'Editar',
      Accion: 'edit',
      fieldsActivate: [''],
      activate: (values, action) => {
        if (this.permisoModifConfigAut) {
          return 'dropdown-item';
        } else {
          return 'dropdown-item disabled';
        }
      }
    }, {
      Type: 'divider',
      disabled: true
    }, {
      Title: 'Activar',
      Accion: 'activar',
      fieldsActivate: ['Activa'],
      activate: (values, action) => {
        if (values[0] == 'Inactiva' && action == 'activar' && this.permisoModifConfigAut) {
          return 'dropdown-item';
        } else {
          return 'dropdown-item disabled';
        }
      }
    }, {
      Title: 'Desactivar',
      Accion: 'desactivar',
      fieldsActivate: ['Activa'],
      activate: (values, action) => {
        if (values[0] == 'Activa' && action == 'desactivar' && this.permisoModifConfigAut) {
          return 'dropdown-item';
        } else {
          return 'dropdown-item disabled';
        }
      }
    }, {
      Type: 'divider',
      disabled: true
    }, {
      Title: 'Eliminar',
      Accion: 'delete',
      fieldsActivate: [''],
      activate: (values, action) => {
        if (this.permisoElimConfigAut) {
          return 'dropdown-item';
        } else {
          return 'dropdown-item disabled';
        }
      }
    }];
    // Búsqueda por nombre
    this.searchForm = this.fb.group({
      Nombre: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_14__.Validators.maxLength(100)]
    });
    // Filtros
    this.filterForm = this.fb.group({
      IdTipoMoneda: [-1],
      IdTipoComprobante: [-1],
      ModoAut: [''],
      Activa: ['S']
    });
    this.filterTipoMoneda = -1;
    this.filterTipoComprobante = -1;
    this.filterModoAut = '';
    this.filterActiva = 'S';
    // MC SINWEB-105 Permisos
    this.permisoInsConfigAut = false;
    this.permisoModifConfigAut = false;
    this.permisoElimConfigAut = false;
  }
  ngOnInit() {
    (0,_angular_common__WEBPACK_IMPORTED_MODULE_15__.registerLocaleData)(_angular_common_locales_es__WEBPACK_IMPORTED_MODULE_16__["default"]); // MC SINWEB-96
    this.page = 1;
    this.previousPage = 1;
    this.inicializarSteps();
    this.cargarPermisos();
    this.cargarTipoMonedas();
    this.configuracionFilter();
    this.inicializarEstado();
    this.loadPage();
    this.controlarTour();
    this.darkMode = document.querySelector('html').getAttribute('data-bs-theme') === src_app_layouts_layouts_model__WEBPACK_IMPORTED_MODULE_4__.THEME_DARK;
  }
  // MC SINWEB-105 Permisos
  cargarPermisos() {
    this.permisoInsConfigAut = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_3__.PERMISO_INS_CONFIG_AUT);
    this.permisoModifConfigAut = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_3__.PERMISO_MODIF_CONFIG_AUT);
    this.permisoElimConfigAut = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_3__.PERMISO_ELIM_CONFIG_AUT);
    // MC Carga de permisos para dropdown de tabla
    this.dropdownActions[0]['Show'] = this.permisoModifConfigAut; // Editar
    this.dropdownActions[1]['Show'] = this.permisoModifConfigAut; // divider
    this.dropdownActions[2]['Show'] = this.permisoModifConfigAut; // Activar
    this.dropdownActions[3]['Show'] = this.permisoModifConfigAut; // Desactivar
    this.dropdownActions[4]['Show'] = this.permisoModifConfigAut && this.permisoElimConfigAut; // divider
    this.dropdownActions[5]['Show'] = this.permisoElimConfigAut; // Eliminar
  }
  // MC SINWEB-118 Inicializa el estado de los componentes que permite almacenar su estado
  inicializarEstado() {
    this.sf.states = this.sf.pagenamesAUT.CONFIG_COMP_STATES;
    //busqueda
    this.searchForm.controls.Nombre.setValue(this.sf.getState(this.sf.states.CONFIG_COMP_S_NOMBRE));
    this.buscarNombre = this.sf.getState(this.sf.states.CONFIG_COMP_S_NOMBRE);
    //filtros
    this.filterTipoMoneda = this.sf.getState(this.sf.states.CONFIG_COMP_F_TIPO_MONEDA);
    this.filterTipoComprobante = this.sf.getState(this.sf.states.CONFIG_COMP_F_TIPO_COMP);
    this.filterModoAut = this.sf.getState(this.sf.states.CONFIG_COMP_F_MODO_AUT);
    this.filterActiva = this.sf.getState(this.sf.states.CONFIG_COMP_F_ACTIVA);
    this.filterForm.controls.Activa.setValue(this.filterActiva);
    this.filterForm.controls.ModoAut.setValue(this.filterModoAut);
    this.filterForm.controls.IdTipoComprobante.setValue(this.filterTipoComprobante);
    //listado
    this.page = Number(this.sf.getState(this.sf.states.CONFIG_COMP_L_PAGE));
    this.cant_search = Number(this.sf.getState(this.sf.states.CONFIG_COMP_L_PAGESIZE));
    this.order = Number(this.sf.getState(this.sf.states.CONFIG_COMP_L_ORDER));
    this.sentido = this.sf.getState(this.sf.states.CONFIG_COMP_L_SENTIDO);
  }
  onSearch(datos) {
    const susc = this.configCompsService.fetch(datos).subscribe(data => {
      this.ConfigsComp = data.Data;
      if (data.Data != undefined) {
        this.totalItems = data.TotalRecords;
        // En la propiedad del Modo reemplazo la letra por lo que representa, en el Estado lo mismo,
        // y agrego una propiedad para el color del estado
        this.ConfigsComp.forEach((config, index, array) => {
          array[index].ModoAut = config.ModoAut === 'G' ? 'General' : 'Por Proveedor';
          array[index].Activa = config.Activa === 'S' ? 'Activa' : 'Inactiva';
          if (config.Activa === 'Inactiva') {
            array[index]['ActivaColor'] = this.darkMode ? 'rgb(244, 106, 106)' : '#FF0000';
          } else {
            array[index]['ActivaColor'] = '#34c38f';
          }
          array[index]['TipoComprobanteColor'] = config.TipoComprobante.Id === 5 ? '#85586F' : ' #BA94D1'; // 1 y 2
          array[index]['ModoAutColor'] = config.ModoAut === 'General' ? '#27374D' : '#74788d';
        });
      } else {
        this.totalItems = 0;
      }
    });
    susc.unsubscribe;
  }
  cargarFiltros(page, order, sentido) {
    let datos = {};
    // Paginación
    datos.PageNumber = page;
    datos.PageSize = this.cant_search;
    datos.Orden = order;
    // MC SINWEB-46 - Los valores internos que se manejan para el estado (order 7) con S y N, por lo cual intentar
    // ordenar muestra el orden contrario al deseado. Entonces, solo para este caso, se invierte
    // el comportamiento del sentido
    if (order == 7) {
      datos.SentidoOrden = sentido === 'Asc' ? 'Desc' : 'Asc';
    } else {
      datos.SentidoOrden = sentido;
    }
    datos.IncluirExcepcionesProveedor = 'S';
    datos.Activa = 'S';
    if (this.buscarNombre != undefined && this.buscarNombre != '') {
      datos.Nombre = this.buscarNombre;
    }
    // Filtros
    if (this.filterTipoMoneda >= 0) {
      datos.IdTipoMoneda = this.filterTipoMoneda;
    }
    if (this.filterTipoComprobante >= 0) {
      datos.IdTipoComprobante = this.filterTipoComprobante;
    }
    if (this.filterModoAut !== undefined) {
      datos.ModoAut = this.filterModoAut;
    }
    // MC SINWEB-324 Se aplica el filtro sin importar el valor
    datos.Activa = this.filterActiva;
    //Almacenar el cambio de estado de los componentes
    if (datos.PageNumber != -1) {
      this.changeStates(datos);
    }
    return datos;
  }
  // MC SINWEB-118 Metodo que realiza el cambio de los estados segun los valores elegidos
  changeStates(datos) {
    //busqueda
    this.sf.changeState(this.sf.states.CONFIG_COMP_S_NOMBRE, !datos.Nombre ? this.sf.states.CONFIG_COMP_S_NOMBRE.default : datos.Nombre);
    //filtros
    this.sf.changeState(this.sf.states.CONFIG_COMP_F_TIPO_MONEDA, !datos.IdTipoMoneda ? this.sf.states.CONFIG_COMP_F_TIPO_MONEDA.default : datos.IdTipoMoneda);
    this.sf.changeState(this.sf.states.CONFIG_COMP_F_TIPO_COMP, !datos.IdTipoComprobante ? this.sf.states.CONFIG_COMP_F_TIPO_COMP.default : datos.IdTipoComprobante);
    this.sf.changeState(this.sf.states.CONFIG_COMP_F_MODO_AUT, !datos.ModoAut ? this.sf.states.CONFIG_COMP_F_MODO_AUT.default : datos.ModoAut);
    // MC SINWEB-324 Se aplica el filtro sin importar el valor
    this.sf.changeState(this.sf.states.CONFIG_COMP_F_ACTIVA, datos.Activa);
    //listado
    this.sf.changeState(this.sf.states.CONFIG_COMP_L_PAGE, datos.PageNumber);
    this.sf.changeState(this.sf.states.CONFIG_COMP_L_PAGESIZE, datos.PageSize);
    this.sf.changeState(this.sf.states.CONFIG_COMP_L_ORDER, datos.Orden);
    this.sf.changeState(this.sf.states.CONFIG_COMP_L_SENTIDO, datos.SentidoOrden);
  }
  loadPage() {
    this.onSearch(this.cargarFiltros(this.page, this.order, this.sentido));
  }
  // MC SINWEB-96 Función que escucha a los cambios en los filtros y los aplica
  configuracionFilter() {
    this.unsubscribe.push(this.filterForm.controls.IdTipoMoneda.valueChanges.subscribe(IdTipoMoneda => {
      if (this.filtro || this.filtroMobile) {
        this.filterTipoMoneda = IdTipoMoneda;
        this.page = 1;
        this.loadPage();
      }
    }));
    this.unsubscribe.push(this.filterForm.controls.IdTipoComprobante.valueChanges.subscribe(IdTipoComprobante => {
      if (this.filtro || this.filtroMobile) {
        this.filterTipoComprobante = IdTipoComprobante;
        this.page = 1;
        this.loadPage();
      }
    }));
    this.unsubscribe.push(this.filterForm.controls.ModoAut.valueChanges.subscribe(ModoAut => {
      if (this.filtro || this.filtroMobile) {
        this.filterModoAut = ModoAut;
        this.page = 1;
        this.loadPage();
      }
    }));
    this.unsubscribe.push(this.filterForm.controls.Activa.valueChanges.subscribe(activa => {
      if (this.filtro || this.filtroMobile) {
        this.filterActiva = activa;
        this.page = 1;
        this.loadPage();
      }
    }));
  }
  // MC SINWEB-96 Función que carga los tipos de monedas
  cargarTipoMonedas() {
    this.monedas = [];
    let datos = {
      PageNumber: -1
    };
    const susc = this.tipoMonedaService.fetch(datos).subscribe(resp => {
      this.monedas = resp.Data;
      this.filterForm.controls.IdTipoMoneda.setValue(this.sf.getState(this.sf.states.CONFIG_COMP_F_TIPO_MONEDA), {
        emitEvent: false
      });
    });
    susc.unsubscribe;
  }
  // MC SINWEB-96 Función para cambio de página
  // MC SINWEB-324 Se cambia el nombre y acciones del método
  lazyLoadChange($event) {
    this.page = $event.page;
    this.order = $event.order;
    this.cant_search = $event.cant;
    this.sentido = $event.sentido;
    this.loadPage();
  }
  // MC SINWEB-96 Función que abre el modal para la edición de una configuración
  editar(configComp, esEditar) {
    const modalRef = this.modalService.open(_config_comprobantes_edit_config_comprobantes_edit_component__WEBPACK_IMPORTED_MODULE_1__.ConfigComprobantesEditComponent, {
      size: 'lg',
      backdrop: 'static',
      keyboard: false,
      scrollable: true
    });
    modalRef.componentInstance.configComp = configComp;
    modalRef.componentInstance.monedas = this.monedas;
    modalRef.result.then(() => {
      this.loadPage();
      if (esEditar) {
        // MC SINWEB-118
        this.alert.showBasicAlert(MSJ_EXITO_EDICION, '', 'success');
      } else {
        // MC SINWEB-118
        this.alert.showBasicAlert(MSJ_EXITO_INSERCION, '', 'success');
      }
    }, () => {});
  }
  // MC SINWEB-96 Función que abre el modal para la creación de una configuración
  nuevo() {
    this.editar(undefined, false);
  }
  // MC SINWEB-96 Función que abre la confirmación para eliminar una configuración
  eliminar(idConfig, nombreConfig) {
    // MC SINWEB-118
    this.alert.showReturnAlert('Eliminación de Configuración de Autorización de Comprobantes.', "¿Está seguro de eliminar la configuración: '" + nombreConfig + "' ?", 'warning', 'Eliminar', 'Cancelar', true, 'danger').then(result => {
      if (result.value) {
        this.eliminarConfigComp(idConfig);
      }
    });
  }
  // MC SINWEB-96 Función que elimina una configuración
  eliminarConfigComp(idConfig) {
    const sbDelete = this.configCompsService.eliminar(idConfig).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_17__.tap)(elem => {
      if (!elem.error) {
        this.alert.showBasicAlert(MSJ_EXITO_ELIMINACION, '', 'success');
        this.loadPage();
      }
    })).subscribe();
    sbDelete.unsubscribe;
  }
  // MC SINWEB-96 Función que abre la confirmación para activar una configuración
  activar(idConfig, nombreConfig) {
    // MC SINWEB-118
    this.alert.showReturnAlert('Activación de Configuración de Autorización de Comprobantes.', "¿Está seguro de activar la configuración: '" + nombreConfig + "' ?", 'question', 'Activar', 'Cancelar', true, 'success').then(result => {
      if (result.value) {
        this.activarConfigComp(idConfig);
      }
    });
  }
  // MC SINWEB-96 Función que activa una configuración
  activarConfigComp(idConfig) {
    const sbAct = this.configCompsService.activarConfig({}, idConfig).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_17__.tap)(elem => {
      if (!elem.error) {
        // MC SINWEB-118
        this.alert.showBasicAlert(MSJ_EXITO_ACTIVACION, '', 'success');
        this.loadPage();
      }
    })).subscribe();
    sbAct.unsubscribe;
  }
  // MC SINWEB-96 Función que abre la confirmación para desactivar una configuración
  desactivar(idConfig, nombreConfig) {
    // MC SINWEB-118
    this.alert.showReturnAlert('Desactivación de Configuración de Autorización de Comprobantes.', "¿Está seguro de desactivar la configuración: '" + nombreConfig + "' ?", 'question', 'Desactivar', 'Cancelar', true, 'danger').then(result => {
      if (result.value) {
        this.desactivarConfigComp(idConfig);
      }
    });
  }
  // MC SINWEB-96 Función que desactiva una configuración
  desactivarConfigComp(idConfig) {
    const sbDesact = this.configCompsService.desactivarConfig({}, idConfig).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_17__.tap)(elem => {
      if (!elem.error) {
        // MC SINWEB-118
        this.alert.showBasicAlert(MSJ_EXITO_DESACTIVACION, '', 'success');
        this.loadPage();
      }
    })).subscribe();
    sbDesact.unsubscribe;
  }
  // MC SINWEB-96 Función para activar acción
  acciones(event) {
    switch (event.accion) {
      case 'edit':
        this.editar(event.registro, true);
        break;
      case 'delete':
        this.eliminar(event.registro.Id, event.registro.Nombre);
        break;
      case 'activar':
        this.activar(event.registro.Id, event.registro.Nombre);
        break;
      case 'desactivar':
        this.desactivar(event.registro.Id, event.registro.Nombre);
        break;
      default:
        console.log(`La accion ${event.accion} no esta disponible`);
    }
  }
  // MC SINWEB-118
  cleanStates() {
    this.sf.cleanAllStates();
    this.resetComp();
  }
  /**
   * SP SINWEB-204 metodo llamado pro clean estate que reinicia los estados y filtros
   */
  resetComp() {
    this.unsubscribe.forEach(sub => {
      sub.unsubscribe();
    });
    this.page = 1;
    this.previousPage = 1;
    /**
     * SP SINWEB-236 filtros no reactivos
     */
    this.buscarNombre = '';
    //cargar combos de filtros
    this.cargarPermisos();
    this.cargarTipoMonedas();
    this.inicializarEstado();
    this.configuracionFilter();
    this.loadPage();
  }
  // MC SINWEB-118
  exportTo(extension) {
    let datos = this.cargarFiltros(-1, this.order, this.sentido);
    //datos.PageSize= this.totalItems;
    delete datos.PageSize;
    const columns = ['Nombre', 'Descripción', 'Monto', 'Moneda', 'Tipo', 'Modo', 'Estado'];
    const keys = ['Nombre', 'Descripcion', 'Monto', 'TipoMoneda.Nombre', 'TipoComprobante.Nombre', 'ModoAut', 'Activa'];
    this.alert.showLoadingAlert('Exportando Configuraciones', 'Generando archivo ' + extension + ', este proceso puede tardar unos minutos');
    this.configCompsService.fetch(datos).subscribe(data => {
      let configs = data.Data;
      configs.forEach((config, index, array) => {
        array[index].ModoAut = config.ModoAut === 'G' ? 'General' : 'Por Proveedor';
        array[index].Activa = config.Activa === 'S' ? 'Activa' : 'Inactiva';
      });
      this.alert.closeLoadingAlert();
      this.alert.showBasicAlert('Configuraciones Exportadas', 'Archivo ' + extension + ' generado', 'success');
      // MC SINWEB-378 Exportación a Pdf
      if (extension === 'Excel') {
        this.exportacion.exportToExcel(configs, columns, keys, 'Listado de Configuraciones de Autorización de Comprobantes');
      } else {
        this.exportacion.exportToPdf(configs, columns, keys, 'Listado de Configuraciones de Autorización de Comprobantes');
      }
    });
  }
  ngOnDestroy() {
    this.unsubscribe.forEach(sb => sb.unsubscribe());
  }
  //SP metodos para filtro por nombre
  getNombre() {
    return this.searchForm.get('Nombre').value;
  }
  borrarNombre() {
    this.searchForm.get('Nombre').reset('');
    this.page = 1;
    /**
     * SP SINWEB-239 filtros no reactivos
     */
    this.buscarNombre = '';
    this.loadPage();
  }
  buscarPorNombre() {
    this.page = 1;
    /**
     * SP SINWEB-239 filtros no reactivos
     */
    this.buscarNombre = this.getNombre();
    this.loadPage();
  }
  nombreBusqueda() {
    return this.buscarNombre && this.buscarNombre != '';
  }
  /**
   * MC SINWEB-159 Método que iniciar tour de la vista
   */
  iniciarTour() {
    this.tourService.start();
  }
  /**
   * MC SINWEB-159 Método para inicializar el objecto de pasos del tour
   */
  inicializarSteps() {
    fetch('./assets/tours/autorizacion/config-comprobantes.json').then(response => response.json()).then(tourConfigComp => {
      // console.log(tourConfigComp)
      this.tourSteps = tourConfigComp;
      this.tourService.initialize(this.tourSteps);
    });
  }
  /**
   * MC SINWEB-159 Observable para realizar acciones durante los pasos
   */
  controlarTour() {
    this.unsubscribe.push(this.tourService.stepHide$.subscribe(step => {
      if (step.step.anchorId == 'configComp.anchor.id') {
        this.filtro = true;
      }
    }));
  }
  static #_ = this.ɵfac = function ConfigComprobantesComponent_Factory(t) {
    return new (t || ConfigComprobantesComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_14__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵdirectiveInject"](src_app_core_services_autorizacion_configComprobantes_service__WEBPACK_IMPORTED_MODULE_5__.ConfigComprobantesService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵdirectiveInject"](src_app_core_services_core_tipoMoneda_service__WEBPACK_IMPORTED_MODULE_6__.TipoMonedaService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__.NgbModal), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵdirectiveInject"](src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_7__.StatefulService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵdirectiveInject"](src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_2__.AlertCustomService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵdirectiveInject"](src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_8__.ExportacionService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵdirectiveInject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_9__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵdirectiveInject"](ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_19__.TourService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵdefineComponent"]({
    type: ConfigComprobantesComponent,
    selectors: [["app-config-comprobantes"]],
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵProvidersFeature"]([src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_2__.AlertCustomService, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_19__.TourService])],
    decls: 53,
    vars: 27,
    consts: [[1, "row"], ["position", "left", 1, "d-block", "d-lg-none", 3, "visible", "visibleChange"], [1, "m-2"], [3, "ngTemplateOutlet"], ["class", "d-none d-lg-block col-xxl-2 col-lg-3", 4, "ngIf"], [3, "ngClass"], [1, "card"], [1, "card-body", "border-bottom"], [1, "d-flex", "flex-column", "flex-sm-row", "gap-2", "align-items-center"], [1, "mb-0", "card-title", "flex-grow-1", "d-flex", "flex-row"], ["tourAnchor", "configComp.anchor.id", 1, "mb-1", "align-self-center"], [1, "text-primary", 2, "cursor", "pointer", 3, "click"], [1, "bx", "bx-info-circle", "font-size-24", "align-self-center"], [1, "flex-shrink-0", "d-flex", "gap-1"], ["class", "btn btn-primary", "tourAnchor", "newConfig.anchor.id", "data-cy", "nueva-config", 3, "click", 4, "ngIf"], ["tourAnchor", "refresh.anchor.id", 1, "btn", "btn-light", 3, "click"], ["tourAnchor", "filtroReset.anchor.id", 3, "ngClass", "click"], ["ngbDropdown", "", 1, "dropdown", "d-inline-block"], ["type", "menu", "id", "dropdownMenuButton1", "data-bs-toggle", "dropdown", "aria-expanded", "false", "ngbDropdownToggle", "", "tourAnchor", "export.anchor.id", 1, "btn", "btn-success"], [1, "mdi", "mdi-dots-vertical"], ["aria-labelledby", "dropdownMenuButton1", "ngbDropdownMenu", "", 1, "dropdown-menu"], ["href", "javascript:void(0);", 1, "dropdown-item", 3, "click"], [3, "formGroup"], [1, "row", "g-3", "justify-content-center", "justify-content-lg-start"], [1, "col-auto", "d-none", "d-lg-block"], ["data-cy", "boton-filtro", 1, "btn", "btn-icon", "btn-soft-secondary", "w-100", 3, "click"], [1, "col-auto", "d-block", "d-lg-none"], [1, "btn", "btn-icon", "btn-soft-secondary", "w-100", 3, "click"], [1, "col-xxl-4", "col-lg-6"], ["tourAnchor", "search.anchor.id", 1, "input-group"], ["type", "text", "formControlName", "Nombre", "placeholder", "Buscar por Nombre", "data-cy", "search-nombre", "maxlength", "100", 1, "form-control", 3, "keyup.enter"], ["class", "btn btn-secondary", 3, "click", 4, "ngIf"], [1, "btn", "btn-primary", 3, "click"], [1, "bx", "bx-search-alt-2"], [1, "card-body"], ["title", "Configuraci\u00F3n de Autorizaci\u00F3n de Comprobantes", 3, "columns", "datos", "page", "order", "sentido", "cant_search", "totalItems", "dropdownButtons", "acciones", "apiTable", "isLoading", "lazyLoad", "emitAction"], ["FILTRO", ""], [1, "d-none", "d-lg-block", "col-xxl-2", "col-lg-3"], ["tourAnchor", "filtroConfig.anchor.id", 1, "card", 3, "formGroup"], [1, "card-body", "p-2"], ["tourAnchor", "newConfig.anchor.id", "data-cy", "nueva-config", 1, "btn", "btn-primary", 3, "click"], [1, "d-none", "d-md-block"], [1, "d-block", "d-md-none", "mdi", "mdi-plus", "mdi-16"], [1, "btn", "btn-secondary", 3, "click"], [1, "bx", "bx-x"], [3, "multiple", "activeIndex"], ["header", "B\u00E1sicos"], [1, "text-muted"], [3, "defaultValue", "defaultString", "items", "valueSelected", "loading", "valueSelect"], [1, "my-2"], ["formControlName", "IdTipoComprobante", "data-cy", "tipocomp-config", 1, "form-select"], ["value", "-1", "selected", ""], ["value", "5"], ["value", "18"], ["formControlName", "ModoAut", "data-cy", "modoaut-config", 1, "form-select"], ["value", ""], ["value", "G"], ["value", "P"], ["formControlName", "Activa", "data-cy", "activa-config", 1, "form-select"], ["value", "S"], ["value", "N"]],
    template: function ConfigComprobantesComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](0, "div", 0)(1, "p-sidebar", 1);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("visibleChange", function ConfigComprobantesComponent_Template_p_sidebar_visibleChange_1_listener($event) {
          return ctx.filtroMobile = $event;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtemplate"](3, ConfigComprobantesComponent_ng_template_3_Template, 0, 0, "ng-template", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtemplate"](4, ConfigComprobantesComponent_div_4_Template, 4, 2, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](5, "div", 5)(6, "div", 6)(7, "div", 7)(8, "div", 8)(9, "span", 9)(10, "h5", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](11, " Configuraci\u00F3n de Autorizaci\u00F3n de Comprobantes ");
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](12, " \u00A0 ");
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](13, "a", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("click", function ConfigComprobantesComponent_Template_a_click_13_listener() {
          return ctx.iniciarTour();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](14, "i", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](15, "div", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtemplate"](16, ConfigComprobantesComponent_a_16_Template, 4, 0, "a", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](17, "a", 15);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("click", function ConfigComprobantesComponent_Template_a_click_17_listener() {
          return ctx.loadPage();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](18, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵpipe"](19, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](20, "a", 16);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("click", function ConfigComprobantesComponent_Template_a_click_20_listener() {
          return ctx.cleanStates();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](21, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](22, "div", 17)(23, "button", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](24, "i", 19);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](25, "ul", 20)(26, "li")(27, "a", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("click", function ConfigComprobantesComponent_Template_a_click_27_listener() {
          return ctx.exportTo("Excel");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](28, "Exportar Excel");
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](29, "li")(30, "a", 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("click", function ConfigComprobantesComponent_Template_a_click_30_listener() {
          return ctx.exportTo("Pdf");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtext"](31, "Exportar Pdf");
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()()()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](32, "div", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementContainerStart"](33, 22);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](34, "div", 23)(35, "div", 24)(36, "a", 25);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("click", function ConfigComprobantesComponent_Template_a_click_36_listener() {
          return ctx.filtro = !ctx.filtro;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](37, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](38, "div", 26)(39, "a", 27);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("click", function ConfigComprobantesComponent_Template_a_click_39_listener() {
          return ctx.filtroMobile = !ctx.filtroMobile;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](40, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](41, "div", 28)(42, "div", 29)(43, "input", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("keyup.enter", function ConfigComprobantesComponent_Template_input_keyup_enter_43_listener() {
          return ctx.buscarPorNombre();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtemplate"](44, ConfigComprobantesComponent_a_44_Template, 2, 0, "a", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](45, "a", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("click", function ConfigComprobantesComponent_Template_a_click_45_listener() {
          return ctx.buscarPorNombre();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](46, "i", 33);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementContainerEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementStart"](47, "div", 34)(48, "app-table2", 35);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵlistener"]("lazyLoad", function ConfigComprobantesComponent_Template_app_table2_lazyLoad_48_listener($event) {
          return ctx.lazyLoadChange($event);
        })("emitAction", function ConfigComprobantesComponent_Template_app_table2_emitAction_48_listener($event) {
          return ctx.acciones($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵpipe"](49, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelementEnd"]()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtemplate"](50, ConfigComprobantesComponent_ng_template_50_Template, 41, 11, "ng-template", null, 36, _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵtemplateRefExtractor"]);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵelement"](52, "app-tour");
      }
      if (rf & 2) {
        const _r5 = _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵreference"](51);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("visible", ctx.filtroMobile);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("ngTemplateOutlet", _r5);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("ngIf", ctx.filtro);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("ngClass", ctx.filtro ? "col-xxl-10 col-lg-9" : "col-12");
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"](11);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("ngIf", ctx.permisoInsConfigAut);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵpipeBind1"](19, 23, ctx.configCompsService.isLoading$) ? "bx bx-sync bx-spin font-size-16 align-middle" : "bx bx-sync font-size-16 align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("ngClass", ctx.sf.getCantCustomStates() > 0 ? "btn btn-danger" : "btn bg-danger bg-soft");
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("ngClass", "mdi mdi-filter-remove-outline mdi-16px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"](12);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("formGroup", ctx.searchForm);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("ngClass", !ctx.filtro ? "mdi mdi-filter-outline mdi-18px align-middle" : "mdi mdi-filter-off-outline mdi-18px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("ngClass", !ctx.filtroMobile ? "mdi mdi-filter-outline mdi-18px align-middle" : "mdi mdi-filter-off-outline mdi-18px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("ngIf", ctx.buscarNombre && ctx.buscarNombre.length > 0);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵproperty"]("columns", ctx.configsCompHeader)("datos", ctx.ConfigsComp)("page", ctx.page)("order", ctx.order)("sentido", ctx.sentido)("cant_search", ctx.cant_search)("totalItems", ctx.totalItems)("dropdownButtons", ctx.dropdownActions)("acciones", ctx.permisoModifConfigAut || ctx.permisoElimConfigAut)("apiTable", true)("isLoading", _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵpipeBind1"](49, 25, ctx.configCompsService.isLoading$));
      }
    },
    dependencies: [primeng_accordion__WEBPACK_IMPORTED_MODULE_20__.Accordion, primeng_accordion__WEBPACK_IMPORTED_MODULE_20__.AccordionTab, _angular_common__WEBPACK_IMPORTED_MODULE_15__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_15__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_15__.NgTemplateOutlet, _angular_forms__WEBPACK_IMPORTED_MODULE_14__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_14__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_14__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_14__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_14__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_14__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_14__.MaxLengthValidator, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__.NgbDropdown, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__.NgbDropdownToggle, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__.NgbDropdownMenu, _angular_forms__WEBPACK_IMPORTED_MODULE_14__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_14__.FormControlName, primeng_sidebar__WEBPACK_IMPORTED_MODULE_21__.Sidebar, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_19__.TourAnchorNgBootstrapDirective, _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_10__.TourComponent, _shared_ui_select_loading_select_loading_component__WEBPACK_IMPORTED_MODULE_11__.SelectLoadingComponent, _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_12__.Table2Component, _angular_common__WEBPACK_IMPORTED_MODULE_15__.AsyncPipe],
    styles: [".text-success-custom[_ngcontent-%COMP%] {\n  color: #d6f3e9;\n}\n\n.text-danger-custom[_ngcontent-%COMP%] {\n  color: #fde1e1;\n}"]
  });
}

/***/ }),

/***/ 8963:
/*!*****************************************************************************************!*\
  !*** ./src/app/pages/autorizacion/inicio-autorizacion/inicio-autorizacion.component.ts ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InicioAutorizacionComponent: () => (/* binding */ InicioAutorizacionComponent)
/* harmony export */ });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _angular_common_locales_es__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/common/locales/es */ 46828);
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sweetalert2 */ 13519);
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/utils/permisos/permisos-autorizacion */ 92558);
/* harmony import */ var _autorizar_comprobantes_autorizar_comprobantes_auth_autorizar_comprobantes_auth_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../autorizar-comprobantes/autorizar-comprobantes-auth/autorizar-comprobantes-auth.component */ 73091);
/* harmony import */ var src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/services/alertCustom.service */ 53206);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rxjs/operators */ 99397);
/* harmony import */ var src_app_layouts_layouts_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/layouts/layouts.model */ 45660);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var src_app_core_services_autorizacion_configComprobantes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/core/services/autorizacion/configComprobantes.service */ 2029);
/* harmony import */ var src_app_core_services_autorizacion_autorizacionComprobante_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/core/services/autorizacion/autorizacionComprobante.service */ 76190);
/* harmony import */ var src_app_core_services_autorizacion_responsableAut_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/core/services/autorizacion/responsableAut.service */ 2874);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/router */ 75187);
/* harmony import */ var ng_apexcharts__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ng-apexcharts */ 86903);
/* harmony import */ var simplebar_angular__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! simplebar-angular */ 63744);



















function InicioAutorizacionComponent_div_16_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 18)(1, "div")(2, "p", 19);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](3, " Configuraciones activas ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](4, "h5", 20);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate"](ctx_r0.ind_ConfigsActivas);
  }
}
function InicioAutorizacionComponent_div_17_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 18)(1, "div")(2, "p", 19);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](3, " Comprobantes pendientes ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](4, "h5", 20);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate"](ctx_r1.ind_ComprobantesPendientes);
  }
}
function InicioAutorizacionComponent_div_18_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 18)(1, "div")(2, "p", 19);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](3, " Responsables activos ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](4, "h5", 20);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate"](ctx_r2.ind_ResponsablesActivos);
  }
}
const _c0 = () => ["/autorizacion/autorizar-comprobantes"];
function InicioAutorizacionComponent_div_19_a_7_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "a", 28);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " Autorizar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("routerLink", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpureFunction0"](1, _c0));
  }
}
const _c1 = () => ["/autorizacion/config-comprobantes"];
function InicioAutorizacionComponent_div_19_a_8_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "a", 28);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](1, " Configuraci\u00F3n ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("routerLink", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpureFunction0"](1, _c1));
  }
}
function InicioAutorizacionComponent_div_19_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 21)(1, "div", 22)(2, "div", 23)(3, "button", 24);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](4, "i", 25);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](5, " Accesos directos ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](6, "div", 26);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](7, InicioAutorizacionComponent_div_19_a_7_Template, 2, 2, "a", 27)(8, InicioAutorizacionComponent_div_19_a_8_Template, 2, 2, "a", 27);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()();
  }
  if (rf & 2) {
    const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx_r3.permisosInicio.ListComprobantes);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx_r3.permisosInicio.ListConfigs);
  }
}
function InicioAutorizacionComponent_div_21_div_11_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](1, "apx-chart", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r8 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("series", ctx_r8.chartOptionsConfigs.series)("chart", ctx_r8.chartOptionsConfigs.chart)("labels", ctx_r8.chartOptionsConfigs.labels)("colors", ctx_r8.chartOptionsConfigs.colors)("responsive", ctx_r8.chartOptionsConfigs.responsive)("legend", ctx_r8.chartOptionsConfigs.legend);
  }
}
const _c2 = a0 => ({
  "shadow-lg": a0
});
function InicioAutorizacionComponent_div_21_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 29)(1, "div", 30)(2, "div", 3)(3, "h4", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](4, " Configuraciones de Autorizaci\u00F3n de Comprobantes ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](5, "div", 32)(6, "div", 33)(7, "div", 34)(8, "div", 3)(9, "h5", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](10, "Estados");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](11, InicioAutorizacionComponent_div_21_div_11_Template, 2, 6, "div", 36);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](12, "div", 37)(13, "div", 0)(14, "div", 38)(15, "div", 39)(16, "div", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](17, "i", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](18, "div")(19, "p", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](20, "Activas");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](21, "h3", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](22);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](23, "div", 38)(24, "div", 39)(25, "div", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](26, "i", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](27, "div")(28, "p", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](29, "Inactivas");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](30, "h3", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](31);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()()()()()()()()();
  }
  if (rf & 2) {
    const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpureFunction1"](5, _c2, ctx_r4.useLargeShadow));
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpureFunction1"](7, _c2, ctx_r4.useLargeShadow));
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx_r4.chartOptionsConfigs !== undefined);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](11);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate"](ctx_r4.ind_ConfigsActivas);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](9);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate"](ctx_r4.ind_ConfigsInactivas);
  }
}
function InicioAutorizacionComponent_div_22_div_54_ng_template_10_tr_3_li_11_Template(rf, ctx) {
  if (rf & 1) {
    const _r20 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "li", 88)(1, "a", 89);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function InicioAutorizacionComponent_div_22_div_54_ng_template_10_tr_3_li_11_Template_a_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵrestoreView"](_r20);
      const comp_r15 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]().$implicit;
      const ctx_r18 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"](4);
      return _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵresetView"](ctx_r18.abrirAuth("autorizar", comp_r15));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](2, "i", 90);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r16 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("tabindex", ctx_r16.alertaAbierta ? -1 : null);
  }
}
function InicioAutorizacionComponent_div_22_div_54_ng_template_10_tr_3_li_12_Template(rf, ctx) {
  if (rf & 1) {
    const _r23 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "li", 91)(1, "a", 92);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("click", function InicioAutorizacionComponent_div_22_div_54_ng_template_10_tr_3_li_12_Template_a_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵrestoreView"](_r23);
      const comp_r15 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]().$implicit;
      const ctx_r21 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"](4);
      return _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵresetView"](ctx_r21.abrirAuth("rechazar", comp_r15));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](2, "i", 93);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r17 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("tabindex", ctx_r17.alertaAbierta ? -1 : null);
  }
}
function InicioAutorizacionComponent_div_22_div_54_ng_template_10_tr_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "tr")(1, "td", 80)(2, "h5", 81)(3, "a", 82);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpipe"](5, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](6, "p", 83);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](8, "td", 84)(9, "div")(10, "ul", 85);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](11, InicioAutorizacionComponent_div_22_div_54_ng_template_10_tr_3_li_11_Template, 3, 1, "li", 86)(12, InicioAutorizacionComponent_div_22_div_54_ng_template_10_tr_3_li_12_Template, 3, 1, "li", 87);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()();
  }
  if (rf & 2) {
    const comp_r15 = ctx.$implicit;
    const ctx_r14 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate3"](" ", comp_r15.Proveedor, " - ", comp_r15.AutConfigComprobante.TipoMoneda.Simbolo, "", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpipeBind3"](5, 9, comp_r15.Monto, "1.2-2", "es"), "");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate4"](" (", comp_r15.FechaComprobante, ") N\u00FAm: ", comp_r15.Numero, " - ", comp_r15.NombreTipoComprobante, " - Resp: ", comp_r15.ResponsableString, " ");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx_r14.permisosInicio.ModifComprobante);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx_r14.permisosInicio.ModifComprobante);
  }
}
function InicioAutorizacionComponent_div_22_div_54_ng_template_10_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "ngx-simplebar", 76)(1, "table", 77)(2, "tbody");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](3, InicioAutorizacionComponent_div_22_div_54_ng_template_10_tr_3_Template, 13, 13, "tr", 78);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](4, "div", 79)(5, "span", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r11 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngForOf", ctx_r11.compsPendientes);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate2"]("Mostrando ", ctx_r11.compsPendientes.length, " (M\u00E1x: 10) de ", ctx_r11.ind_ComprobantesPendientes, " comprobantes pendientes");
  }
}
function InicioAutorizacionComponent_div_22_div_54_ng_template_14_tr_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "tr")(1, "td", 80)(2, "h5", 81)(3, "a", 82);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpipe"](5, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](6, "p", 83);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](8, "td", 94)(9, "div")(10, "ul", 85)(11, "li", 95)(12, "span", 96);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](13, "i", 97);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()()()();
  }
  if (rf & 2) {
    const comp_r25 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate3"](" ", comp_r25.Proveedor, " - ", comp_r25.AutConfigComprobante.TipoMoneda.Simbolo, "", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpipeBind3"](5, 7, comp_r25.Monto, "1.2-2", "es"), "");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate4"](" (", comp_r25.FechaComprobante, ") N\u00FAm: ", comp_r25.Numero, " - ", comp_r25.NombreTipoComprobante, " - Resp: ", comp_r25.ResponsableString, " ");
  }
}
function InicioAutorizacionComponent_div_22_div_54_ng_template_14_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "ngx-simplebar", 76)(1, "table", 77)(2, "tbody");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](3, InicioAutorizacionComponent_div_22_div_54_ng_template_14_tr_3_Template, 14, 11, "tr", 78);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](4, "div", 79)(5, "span", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r12 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngForOf", ctx_r12.compsAutorizados);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate2"]("Mostrando ", ctx_r12.compsAutorizados.length, " (M\u00E1x: 10) de ", ctx_r12.ind_ComprobantesAutorizados, " comprobantes autorizados");
  }
}
function InicioAutorizacionComponent_div_22_div_54_ng_template_18_tr_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "tr")(1, "td", 80)(2, "h5", 81)(3, "a", 82);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpipe"](5, "number");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](6, "p", 83);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](8, "td", 94)(9, "div")(10, "ul", 85)(11, "li", 98)(12, "span", 96);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](13, "i", 99);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()()()();
  }
  if (rf & 2) {
    const comp_r27 = ctx.$implicit;
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate3"](" ", comp_r27.Proveedor, " - ", comp_r27.AutConfigComprobante.TipoMoneda.Simbolo, "", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpipeBind3"](5, 7, comp_r27.Monto, "1.2-2", "es"), "");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate4"](" (", comp_r27.FechaComprobante, ") N\u00FAm: ", comp_r27.Numero, " - ", comp_r27.NombreTipoComprobante, " - Resp: ", comp_r27.ResponsableString, " ");
  }
}
function InicioAutorizacionComponent_div_22_div_54_ng_template_18_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "ngx-simplebar", 76)(1, "table", 77)(2, "tbody");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](3, InicioAutorizacionComponent_div_22_div_54_ng_template_18_tr_3_Template, 14, 11, "tr", 78);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](4, "div", 79)(5, "span", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r13 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngForOf", ctx_r13.compsRechazados);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate2"]("Mostrando ", ctx_r13.compsRechazados.length, " (M\u00E1x: 10) de ", ctx_r13.ind_ComprobantesRechazados, " comprobantes rechazados");
  }
}
function InicioAutorizacionComponent_div_22_div_54_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 69)(1, "div", 34)(2, "div", 3)(3, "h5", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](4, "Recientes");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](5, "ul", 70, 71)(7, "li", 72)(8, "a", 73);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](9, "Pendientes");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](10, InicioAutorizacionComponent_div_22_div_54_ng_template_10_Template, 7, 3, "ng-template", 74);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](11, "li", 72)(12, "a", 73);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](13, "Autorizados");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](14, InicioAutorizacionComponent_div_22_div_54_ng_template_14_Template, 7, 3, "ng-template", 74);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](15, "li", 72)(16, "a", 73);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](17, "Rechazados");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](18, InicioAutorizacionComponent_div_22_div_54_ng_template_18_Template, 7, 3, "ng-template", 74);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](19, "div", 75);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const _r10 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵreference"](6);
    const ctx_r9 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpureFunction1"](6, _c2, ctx_r9.useLargeShadow));
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("activeId", 1);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngbNavItem", 1);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngbNavItem", 2);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngbNavItem", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngbNavOutlet", _r10);
  }
}
function InicioAutorizacionComponent_div_22_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 48)(1, "div", 30)(2, "div", 3)(3, "h4", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](4, "Comprobantes");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](5, "div", 32)(6, "div", 49)(7, "div", 50)(8, "div", 3)(9, "h5", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](10, "Estados");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](11, "div", 52)(12, "div", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](13, "i", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](14, "h3");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](15);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](16, "p");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](17, "Comprobantes totales");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](18, "div", 55)(19, "div", 3)(20, "div", 56)(21, "div", 57)(22, "p", 58);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](23, "Pendientes");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](24, "h3", 20);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](25);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](26, "div", 59)(27, "div", 60)(28, "div", 61);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](29, "i", 62);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](30, "div", 55)(31, "div", 3)(32, "div", 56)(33, "div", 57)(34, "p", 58);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](35, "Autorizados");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](36, "h3", 20);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](37);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](38, "div", 59)(39, "div", 60)(40, "div", 63);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](41, "i", 64);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](42, "div", 65)(43, "div", 3)(44, "div", 56)(45, "div", 57)(46, "p", 58);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](47, "Rechazados");
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](48, "h3", 20);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](49);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](50, "div", 59)(51, "div", 60)(52, "div", 66);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](53, "i", 67);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](54, InicioAutorizacionComponent_div_22_div_54_Template, 20, 8, "div", 68);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r5 = _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpureFunction1"](7, _c2, ctx_r5.useLargeShadow));
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](6);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpureFunction1"](9, _c2, ctx_r5.useLargeShadow));
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](8);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate"](ctx_r5.ind_ComprobantesTotales);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](10);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate"](ctx_r5.ind_ComprobantesPendientes);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate"](ctx_r5.ind_ComprobantesAutorizados);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](12);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtextInterpolate"](ctx_r5.ind_ComprobantesRechazados);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx_r5.permisosInicio.ListComprobantes);
  }
}
const MSJ_EXITO_AUTORIZACION = 'Se autorizó correctamente el comprobante seleccionado.';
const MSJ_EXITO_RECHAZO = 'Se rechazó correctamente el comprobante seleccionado.';
class InicioAutorizacionComponent {
  onEnterKey(event) {
    if (this.alertaAbierta) {
      event.preventDefault();
      sweetalert2__WEBPACK_IMPORTED_MODULE_0___default().close();
    }
  }
  constructor(configCompsService, autCompService, responsableService, authService, modalService, alert) {
    this.configCompsService = configCompsService;
    this.autCompService = autCompService;
    this.responsableService = responsableService;
    this.authService = authService;
    this.modalService = modalService;
    this.alert = alert;
    this.standalone = true;
    this.subscriptions = [];
    this.ind_ConfigsActivas = 0;
    this.ind_ConfigsInactivas = 0;
    this.ind_ComprobantesTotales = 0;
    this.ind_ComprobantesPendientes = 0;
    this.ind_ComprobantesAutorizados = 0;
    this.ind_ComprobantesRechazados = 0;
    this.compsTotales = [];
    this.compsPendientes = [];
    this.compsAutorizados = [];
    this.compsRechazados = [];
    this.descripcionComp = '';
    // Modal autorizar/rechazar
    this.modalAutorizar = sweetalert2__WEBPACK_IMPORTED_MODULE_0___default().mixin({
      customClass: {
        cancelButton: 'btn btn-secondary',
        confirmButton: 'btn btn-success ms-2'
      },
      buttonsStyling: false,
      reverseButtons: true
    });
    this.modalRechazar = sweetalert2__WEBPACK_IMPORTED_MODULE_0___default().mixin({
      customClass: {
        cancelButton: 'btn btn-secondary',
        confirmButton: 'btn btn-danger ms-2'
      },
      buttonsStyling: false,
      reverseButtons: true
    });
    // MC SINWEB-116 Cosas necesarias para prevenir error "Foco en mensaje de error"
    this.alertaAbierta = false;
    this.ind_ResponsablesActivos = 0;
    // Permisos
    this.permisosInicio = {
      ListConfigs: false,
      ListResponsables: false,
      ListComprobantes: false
    };
    this.useLargeShadow = false;
  }
  ngOnInit() {
    (0,_angular_common__WEBPACK_IMPORTED_MODULE_10__.registerLocaleData)(_angular_common_locales_es__WEBPACK_IMPORTED_MODULE_11__["default"]);
    this.cargarPermisos();
    if (this.permisosInicio.ListConfigs) {
      this.cargarIndicadoresConfigs();
    }
    if (this.permisosInicio.ListComprobantes) {
      this.cargarIndicadoresComprobantes();
    }
    if (this.permisosInicio.ListResponsables) {
      this.cargarIndicadoresResponsables();
    }
    this.darkMode = document.querySelector('html').getAttribute('data-bs-theme') === src_app_layouts_layouts_model__WEBPACK_IMPORTED_MODULE_4__.THEME_DARK;
    this.useLargeShadow = this.darkMode && window.location.href.includes('/estadistica/inicio');
  }
  cargarPermisos() {
    this.permisosInicio = {
      ListConfigs: this.authService.hasPermiso(src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_1__.PERMISO_LIS_CONFIG_AUT),
      ListResponsables: this.authService.hasPermiso(src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_1__.PERMISO_LIS_RESP_AUT),
      ListComprobantes: this.authService.hasPermiso(src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_1__.PERMISO_LIS_AUT_COMP),
      ModifComprobante: this.authService.hasPermiso(src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_1__.PERMISO_MODIF_AUT_COMP)
    };
  }
  cargarIndicadoresConfigs() {
    let datos = {};
    datos.PageNumber = -1;
    // datos.Activa = 'S';
    const susc1 = this.configCompsService.fetch(datos).subscribe(resp => {
      // this.ind_ConfigsActivas = resp.Data.length;
      if (resp.Data !== undefined) {
        this.ind_ConfigsActivas = resp.Data.filter(conf => conf.Activa === 'S').length;
        this.ind_ConfigsInactivas = resp.Data.filter(conf => conf.Activa === 'N').length;
        this.chartOptionsConfigs = {
          chart: {
            height: 320,
            type: 'donut'
          },
          series: [this.ind_ConfigsActivas, this.ind_ConfigsInactivas],
          labels: ['Activas', 'Inactivas'],
          colors: ['#1abc9c', '#f1556c'],
          // colors: ['#34C38F', '#FF0000'],
          legend: {
            show: true,
            position: 'right',
            horizontalAlign: 'center',
            verticalAlign: 'middle',
            floating: false,
            fontSize: '14px',
            offsetX: 0,
            offsetY: 100
          },
          responsive: [{
            breakpoint: 600,
            options: {
              chart: {
                height: 260
              },
              legend: {
                // show: false
                position: 'bottom',
                offsetY: 0
              }
            }
          }]
        };
      }
    });
    this.subscriptions.push(susc1);
  }
  cargarIndicadoresComprobantes() {
    let datos = {};
    datos.PageNumber = -1;
    const susc2 = this.autCompService.fetch(datos).subscribe(resp => {
      this.ind_ComprobantesTotales = resp.Data.length;
      this.compsTotales = resp.Data;
      this.compsTotales.forEach((comp, index, array) => {
        if (comp.Usuario) {
          array[index]['ResponsableString'] = comp.Usuario;
        } else {
          let nombresResp = comp.AutConfigComprobante.AutResponsables.map(r => r.UsrUsuario.Nombre);
          array[index]['ResponsableString'] = nombresResp.join(', ');
        }
      });
      this.compsPendientes = this.compsTotales.filter(comp => comp.AutEstado.Id === 1);
      this.compsAutorizados = this.compsTotales.filter(comp => comp.AutEstado.Id === 2);
      this.compsRechazados = this.compsTotales.filter(comp => comp.AutEstado.Id === 3);
      this.ind_ComprobantesPendientes = this.compsPendientes.length;
      this.ind_ComprobantesAutorizados = this.compsAutorizados.length;
      this.ind_ComprobantesRechazados = this.compsRechazados.length;
      this.compsPendientes = this.compsPendientes.slice(0, 10);
      this.compsAutorizados = this.compsAutorizados.slice(0, 10);
      this.compsRechazados = this.compsRechazados.slice(0, 10);
    });
    this.subscriptions.push(susc2);
  }
  cargarIndicadoresResponsables() {
    let datos = {};
    datos.PageNumber = -1;
    datos.ActivaConfig = 'S';
    const susc3 = this.responsableService.fetch(datos).subscribe(resp => {
      let arrResps = [];
      resp.Data.forEach(elem => {
        elem.AutResponsables.forEach(r => {
          arrResps.push(r.UsrUsuario.Nombre);
        });
      });
      arrResps = [...new Set(arrResps)];
      this.ind_ResponsablesActivos = arrResps.length;
    });
    this.subscriptions.push(susc3);
  }
  abrirAuth(accion, registro) {
    const modalRef = this.modalService.open(_autorizar_comprobantes_autorizar_comprobantes_auth_autorizar_comprobantes_auth_component__WEBPACK_IMPORTED_MODULE_2__.AutorizarComprobantesAuthComponent, {
      size: 'md',
      scrollable: true
    });
    modalRef.componentInstance.Responsables = registro.AutConfigComprobante.AutResponsables;
    modalRef.result.then(obj => {
      this.alertaAbierta = true; // MC SINWEB-116
      if (obj.msj === 'Comprobante autorizado/rechazado correctamente') {
        // Si el usuario que se ingresó coincide con el responsable del comprobante, se autoriza/rechaza
        if (accion == 'autorizar') {
          this.autorizar(registro, obj.IdUsuario);
          // console.log('AUTORIZAR MODAL');
        } else {
          this.rechazar(registro, obj.IdUsuario);
          // console.log('RECHAZAR MODAL');
        }
      } else {
        // Si no coincide, se muestra un error y no se hace nada
        let total = new Intl.NumberFormat('es', {
          style: 'decimal',
          minimumFractionDigits: 2
        }).format(registro.Total);
        let html = `
          <p class="mb-3">El usuario ingresado no es un responsable válido para autorizar el comprobante.</p>
          <p class="fs-5 text-start">
            Número: <span class="fw-bold">${registro.Numero}</span><br>
            Tipo: <span class="fw-bold">${registro.NombreTipoComprobante}</span><br>
            Proveedor: <span class="fw-bold">${registro.Proveedor}</span><br>
            Importe: <span class="fw-bold">${total} (${registro.Moneda})</span><br>
          </p>
        `;
        this.alert.showHtmlAlert('Error', 'error', html, 'Aceptar', false, undefined).then(() => {
          this.alertaAbierta = false; // MC SINWEB-116
        });
      }
    }, () => {});
  }
  // MC Función que abre el modal para autorizar un comprobante
  autorizar(registro, idUsuario) {
    let total = new Intl.NumberFormat('es', {
      style: 'decimal',
      minimumFractionDigits: 2
    }).format(registro.Total);
    this.modalAutorizar.fire({
      title: 'Autorizar comprobante',
      icon: 'question',
      html: `
          <p class="mb-3">¿Está seguro que desea autorizar el siguiente comprobante?</p>
          <p class="fs-5 text-start">
            Número: <span class="fw-bold">${registro.Numero}</span><br>
            Tipo: <span class="fw-bold">${registro.NombreTipoComprobante}</span><br>
            Proveedor: <span class="fw-bold">${registro.Proveedor}</span><br>
            Importe: <span class="fw-bold">${total} (${registro.Moneda})</span><br>
          </p>
        `,
      confirmButtonText: 'Autorizar',
      cancelButtonText: 'Cancelar',
      showCancelButton: true,
      input: 'textarea',
      inputLabel: 'Observación',
      inputPlaceholder: 'Inserte una observación (opcional)...',
      inputAttributes: {
        class: 'form-control'
      },
      inputValidator: desc => {
        if (desc.length > 500) {
          return 'La observación no puede superar los 500 caracteres';
        }
      }
    }).then(result => {
      if (result.isConfirmed) {
        this.descripcionComp = result.value;
        this.autorizarRechazarComprobante(registro, 'autorizar', idUsuario);
        // console.log('AUTORIZAR');
      }
    });
  }
  // MC Función que abre el modal para rechazar un comprobante
  rechazar(registro, idUsuario) {
    let total = new Intl.NumberFormat('es', {
      style: 'decimal',
      minimumFractionDigits: 2
    }).format(registro.Total);
    this.modalRechazar.fire({
      title: 'Rechazar comprobante',
      icon: 'question',
      html: `
          <p class="mb-3">¿Está seguro que desea rechazar el siguiente comprobante?</p>
          <p class="fs-5 text-start">
            Número: <span class="fw-bold">${registro.Numero}</span><br>
            Tipo: <span class="fw-bold">${registro.NombreTipoComprobante}</span><br>
            Proveedor: <span class="fw-bold">${registro.Proveedor}</span><br>
            Importe: <span class="fw-bold">${total} (${registro.Moneda})</span><br>
          </p>
        `,
      confirmButtonText: 'Rechazar',
      cancelButtonText: 'Cancelar',
      showCancelButton: true,
      input: 'textarea',
      inputLabel: 'Observación',
      inputPlaceholder: 'Inserte una observación (opcional)...',
      inputAttributes: {
        class: 'form-control'
      },
      inputValidator: desc => {
        if (desc.length > 500) {
          return 'La observación no puede superar los 500 caracteres';
        }
      }
    }).then(result => {
      if (result.isConfirmed) {
        this.descripcionComp = result.value;
        this.autorizarRechazarComprobante(registro, 'rechazar', idUsuario);
      }
    });
  }
  // MC Función que autoriza/rechaza un comprobante
  autorizarRechazarComprobante(registro, accion, idUsuario) {
    let body = {
      Id: registro.Id,
      IdAutConfigComprobante: registro.AutConfigComprobante.Id,
      IdUsrUsuarioResponsable: idUsuario,
      IdAutEstado: accion == 'autorizar' ? 2 : 3,
      IdComprobante: registro.IdComprobante,
      IdTipoComprobante: registro.TipoComprobante.Id,
      Descripcion: this.descripcionComp
    };
    const sbAut = this.autCompService.editar(body, registro.Id).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_12__.tap)(elem => {
      if (!elem.error) {
        if (accion == 'autorizar') {
          this.alert.showBasicAlert(MSJ_EXITO_AUTORIZACION, '', 'success');
        } else {
          this.alert.showBasicAlert(MSJ_EXITO_RECHAZO, '', 'success');
        }
        // this.loadPage();
        this.cargarIndicadoresComprobantes();
      }
    })).subscribe();
    sbAut.unsubscribe;
  }
  ngOnDestroy() {
    this.subscriptions.forEach(sb => sb.unsubscribe());
  }
  static #_ = this.ɵfac = function InicioAutorizacionComponent_Factory(t) {
    return new (t || InicioAutorizacionComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](src_app_core_services_autorizacion_configComprobantes_service__WEBPACK_IMPORTED_MODULE_5__.ConfigComprobantesService), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](src_app_core_services_autorizacion_autorizacionComprobante_service__WEBPACK_IMPORTED_MODULE_6__.AutorizacionComprobanteService), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](src_app_core_services_autorizacion_responsableAut_service__WEBPACK_IMPORTED_MODULE_7__.ResponsableAutService), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_8__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbModal), _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdirectiveInject"](src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_3__.AlertCustomService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵdefineComponent"]({
    type: InicioAutorizacionComponent,
    selectors: [["app-inicio-autorizacion"]],
    hostBindings: function InicioAutorizacionComponent_HostBindings(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵlistener"]("keydown.enter", function InicioAutorizacionComponent_keydown_enter_HostBindingHandler($event) {
          return ctx.onEnterKey($event);
        }, false, _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵresolveDocument"]);
      }
    },
    inputs: {
      standalone: "standalone"
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵProvidersFeature"]([src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_3__.AlertCustomService])],
    decls: 23,
    vars: 9,
    consts: [[1, "row"], [1, "col-lg-12"], [1, "card", 3, "ngClass"], [1, "card-body"], [1, "col-lg-4"], [1, "media", "text-md-start", "text-center"], [1, "text-center", "text-md-start", "me-md-3"], [1, "bx", "bx-lock-open", "bx-md", "text-primary"], [1, "media-body", "align-self-center"], [1, "text-muted"], [1, "my-2"], [1, "col-lg-5", "align-self-center"], [1, "text-center", "mt-4", "mt-lg-0"], ["class", "col-12 col-md-4", 4, "ngIf"], ["class", "col-lg-3 d-none d-lg-block", 4, "ngIf"], [1, "row", "pt-1"], ["class", "col-xl-4", 4, "ngIf"], ["class", "col-xl-8", 4, "ngIf"], [1, "col-12", "col-md-4"], [1, "text-muted", "text-truncate", "mb-2"], [1, "mb-0"], [1, "col-lg-3", "d-none", "d-lg-block"], [1, "clearfix", "mt-4", "mt-lg-0"], ["ngbDropdown", "", 1, "dropdown", "float-end"], ["type", "button", "data-toggle", "dropdown", "aria-haspopup", "true", "aria-expanded", "false", "ngbDropdownToggle", "", 1, "btn", "btn-primary", "dropdown-toggle"], [1, "bx", "bxs-share", "align-middle", "mr-1"], ["ngbDropdownMenu", "", 1, "dropdown-menu", "dropdown-menu-end"], ["class", "dropdown-item", "href", "javascript: void(0);", 3, "routerLink", 4, "ngIf"], ["href", "javascript: void(0);", 1, "dropdown-item", 3, "routerLink"], [1, "col-xl-4"], [1, "card", "mb-1", 3, "ngClass"], [1, "card-title"], [1, "row", "g-1"], [1, "col-xl-12"], [1, "card", 2, "min-height", "570px", 3, "ngClass"], [1, "text-muted", "mb-5"], ["class", "mt-2 mb-4", 4, "ngIf"], [1, "text-center", "text-muted"], [1, "col-md-6"], [1, "mt-4", "d-flex", "align-items-center", "justify-content-center", "gap-3"], [1, "bg-success", "bg-soft", "px-2", "rounded-3", "shadow-sm"], [1, "mdi", "mdi-power-plug", "mdi-36px", 2, "color", "#1abc9c"], [1, "mb-2"], [1, "m-0", "p-0"], [1, "bg-danger", "bg-soft", "px-2", "rounded-3", "shadow-sm"], [1, "mdi", "mdi-power-plug-off", "mdi-36px", 2, "color", "#f1556c"], [1, "mt-2", "mb-4"], ["dir", "ltr", 1, "apex-charts", 3, "series", "chart", "labels", "colors", "responsive", "legend"], [1, "col-xl-8"], [1, "col-xl-5"], [1, "card", "mb-0", 2, "min-height", "570px", 3, "ngClass"], [1, "text-muted", "mb-4"], [1, "text-center"], [1, "mb-4"], [1, "bx", "bx-receipt", "text-primary", "display-4"], [1, "card", "mini-stats-wid", "shadow-sm"], [1, "d-flex"], [1, "flex-grow-1"], [1, "text-muted", "mb-2"], [1, "flex-shrink-0", "align-self-center"], [1, "mini-stat-icon", "avatar-sm", "rounded-circle"], [1, "avatar-title", "bg-pendiente"], [1, "bx", "bx-hourglass", "font-size-20"], [1, "avatar-title", "bg-info"], [1, "bx", "bx-check-circle", "font-size-24"], [1, "card", "mini-stats-wid", "shadow-sm", "mb-0"], [1, "avatar-title", "bg-danger"], [1, "bx", "bx-x", "font-size-24"], ["class", "col-xl-7", 4, "ngIf"], [1, "col-xl-7"], ["ngbNav", "", 1, "nav-pills", "bg-light", "rounded", 3, "activeId"], ["nav", "ngbNav"], [3, "ngbNavItem"], ["ngbNavLink", ""], ["ngbNavContent", ""], [1, "mt-4", 3, "ngbNavOutlet"], [2, "max-height", "400px"], [1, "table", "table-centered", "table-nowrap", "table-hover"], [4, "ngFor", "ngForOf"], [1, "ms-3", "mt-2"], [2, "max-width", "90px"], [1, "text-truncate", "font-size-14", "mb-1"], [1, "text-dark"], [1, "text-truncate", "text-muted", "p-0"], [2, "width", "50px"], [1, "list-inline", "mb-0", "font-size-16"], ["class", "list-inline-item", "placement", "top", "ngbTooltip", "Autorizar", "container", "body", "triggers", "hover", 4, "ngIf"], ["class", "list-inline-item", "placement", "top", "ngbTooltip", "Rechazar", "container", "body", 4, "ngIf"], ["placement", "top", "ngbTooltip", "Autorizar", "container", "body", "triggers", "hover", 1, "list-inline-item"], ["href", "javascript: void(0);", 1, "text-info", "p-1", 3, "tabindex", "click"], [1, "bx", "bx-check", "bx-sm"], ["placement", "top", "ngbTooltip", "Rechazar", "container", "body", 1, "list-inline-item"], ["href", "javascript: void(0);", 1, "text-danger", "p-1", 3, "tabindex", "click"], [1, "bx", "bx-x", "bx-sm"], [2, "width", "25px"], ["placement", "top", "ngbTooltip", "Autorizado", "container", "body", 1, "list-inline-item"], [1, "text-light", "p-1"], [1, "bx", "bx-check", "bx-xs", "p-1", "bg-info", "rounded-circle"], ["placement", "top", "ngbTooltip", "Rechazado", "container", "body", 1, "list-inline-item"], [1, "bx", "bx-x", "bx-xs", "p-1", "bg-danger", "rounded-circle"]],
    template: function InicioAutorizacionComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3)(4, "div", 0)(5, "div", 4)(6, "div", 5)(7, "div", 6);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelement"](8, "i", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](9, "div", 8)(10, "div", 9)(11, "h5", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtext"](12, "M\u00F3dulo Autorizaci\u00F3n");
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](13, "div", 11)(14, "div", 12)(15, "div", 0);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](16, InicioAutorizacionComponent_div_16_Template, 6, 1, "div", 13)(17, InicioAutorizacionComponent_div_17_Template, 6, 1, "div", 13)(18, InicioAutorizacionComponent_div_18_Template, 6, 1, "div", 13);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](19, InicioAutorizacionComponent_div_19_Template, 9, 2, "div", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementStart"](20, "div", 15);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵtemplate"](21, InicioAutorizacionComponent_div_21_Template, 32, 9, "div", 16)(22, InicioAutorizacionComponent_div_22_Template, 55, 11, "div", 17);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵelementEnd"]();
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵpureFunction1"](7, _c2, ctx.useLargeShadow));
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](14);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.permisosInicio.ListConfigs);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.permisosInicio.ListComprobantes);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.permisosInicio.ListResponsables);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.permisosInicio.ListConfigs || ctx.permisosInicio.ListComprobantes);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.permisosInicio.ListConfigs);
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_9__["ɵɵproperty"]("ngIf", ctx.permisosInicio.ListComprobantes);
      }
    },
    dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_10__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_10__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_10__.NgIf, _angular_router__WEBPACK_IMPORTED_MODULE_14__.RouterLink, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbDropdown, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbDropdownToggle, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbDropdownMenu, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbNavContent, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbNav, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbNavItem, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbNavItemRole, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbNavLink, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbNavLinkBase, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbNavOutlet, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_13__.NgbTooltip, ng_apexcharts__WEBPACK_IMPORTED_MODULE_15__.ChartComponent, simplebar_angular__WEBPACK_IMPORTED_MODULE_16__.SimplebarAngularComponent, _angular_common__WEBPACK_IMPORTED_MODULE_10__.DecimalPipe],
    styles: [".bg-pendiente[_ngcontent-%COMP%] {\n  background-color: #ff8000;\n}"]
  });
}

/***/ }),

/***/ 27850:
/*!*****************************************************************************************************************************************!*\
  !*** ./src/app/pages/autorizacion/responsables-comprobantes/responsables-comprobantes-edit/responsables-comprobantes-edit.component.ts ***!
  \*****************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ResponsablesComprobantesEditComponent: () => (/* binding */ ResponsablesComprobantesEditComponent)
/* harmony export */ });
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/core/services/core/viewHelper.service */ 4506);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var src_app_core_services_autorizacion_responsableAut_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/services/autorizacion/responsableAut.service */ 2874);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_autorizacion_configComprobantes_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/core/services/autorizacion/configComprobantes.service */ 2029);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var src_app_core_services_core_usuario_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/services/core/usuario.service */ 6146);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var _ng_select_ng_select__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ng-select/ng-select */ 54807);
/* harmony import */ var _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/ui/input-number/input-number.component */ 62271);













function ResponsablesComprobantesEditComponent_ng_container_3_ng_container_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, "Editar");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
}
function ResponsablesComprobantesEditComponent_ng_container_3_ng_container_2_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1, "Nuevo");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
}
function ResponsablesComprobantesEditComponent_ng_container_3_ng_container_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r5 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtextInterpolate1"]("'", ctx_r5.responsable.Nombre, "'");
  }
}
function ResponsablesComprobantesEditComponent_ng_container_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](1, ResponsablesComprobantesEditComponent_ng_container_3_ng_container_1_Template, 2, 0, "ng-container", 3)(2, ResponsablesComprobantesEditComponent_ng_container_3_ng_container_2_Template, 2, 0, "ng-container", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](3, " Responsable de Autorizaci\u00F3n de Comprobante ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](4, ResponsablesComprobantesEditComponent_ng_container_3_ng_container_4_Template, 2, 1, "ng-container", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r0.responsable.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", !ctx_r0.responsable.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r0.responsable.Id);
  }
}
function ResponsablesComprobantesEditComponent_ng_container_5_ng_container_1_ng_template_13_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 22)(1, "div", 23)(2, "div", 10)(3, "label", 24);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](4, "Nombre");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](5, "input", 25);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](6, "div", 10)(7, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](8, "Descripci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](9, "textarea", 26);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](10, "div", 27)(11, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](12, "Tipo de Comprobante");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](13, "select", 28)(14, "option", 29);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](15, " Seleccione tipo de comprobante ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](16, "option", 30);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](17, "Orden de Pago");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](18, "option", 31);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](19, "Pedido Compra");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](20, "div", 27)(21, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](22, "Modo de Autorizaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](23, "select", 32)(24, "option", 29);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](25, " Seleccione el Modo ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](26, "option", 33);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](27, "General");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](28, "option", 34);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](29, "Por Proveedor");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](30, "div", 27);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](31, "app-input-number", 35);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](32, "div", 27)(33, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](34, "Moneda");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](35, "select", 36)(36, "option", 29);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](37, " Seleccione la moneda ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](38, "option", 37);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](39, "D\u00F3lar Estadounidense");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](40, "option", 38);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](41, "Euro");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](42, "option", 39);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](43, "Peso Argentino");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](44, "option", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](45, "Real");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()()()();
  }
  if (rf & 2) {
    const ctx_r10 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](14);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵattribute"]("disabled", true);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](10);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵattribute"]("disabled", true);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](7);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("title", "Monto")("value", ctx_r10.configSelectedForm.controls.Monto.value)("decimals", 2)("disabled", true);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵattribute"]("disabled", true);
  }
}
function ResponsablesComprobantesEditComponent_ng_container_5_ng_container_1_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](1, "div", 9)(2, "div", 13)(3, "div", 14, 15)(5, "div", 16)(6, "h2", 17)(7, "button", 18)(8, "span");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](9, "i", 19);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](10, "Informaci\u00F3n de la configuraci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](11, "div", 20)(12, "div", 21);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](13, ResponsablesComprobantesEditComponent_ng_container_5_ng_container_1_ng_template_13_Template, 46, 7, "ng-template");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()()()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("formGroup", ctx_r6.configSelectedForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("closeOthers", true);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("collapsed", false);
  }
}
function ResponsablesComprobantesEditComponent_ng_container_5_div_3_Template(rf, ctx) {
  if (rf & 1) {
    const _r12 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 10)(1, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](2, "Seleccionar configuraci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](3, "ng-select", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("ngModelChange", function ResponsablesComprobantesEditComponent_ng_container_5_div_3_Template_ng_select_ngModelChange_3_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r12);
      const ctx_r11 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](2);
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r11.modelChanged());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](4, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("items", ctx_r7.configuraciones)("multiple", false)("loading", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](4, 4, ctx_r7.configCompsService.isLoading$))("closeOnSelect", true);
  }
}
const _c0 = () => ({
  standalone: true
});
function ResponsablesComprobantesEditComponent_ng_container_5_ng_template_10_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](0, "input", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1);
  }
  if (rf & 2) {
    const item_r13 = ctx.item;
    const item$_r14 = ctx.item$;
    const index_r15 = ctx.index;
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpropertyInterpolate1"]("id", "item-", index_r15, "");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngModel", item$_r14.selected)("ngModelOptions", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpureFunction0"](4, _c0));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtextInterpolate1"](" ", item_r13.Nombre, " ");
  }
}
function ResponsablesComprobantesEditComponent_ng_container_5_Template(rf, ctx) {
  if (rf & 1) {
    const _r17 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](1, ResponsablesComprobantesEditComponent_ng_container_5_ng_container_1_Template, 14, 3, "ng-container", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](2, "div", 7);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](3, ResponsablesComprobantesEditComponent_ng_container_5_div_3_Template, 5, 6, "div", 8);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](4, "div", 9)(5, "div", 10)(6, "label");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](7, "Seleccionar responsable");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](8, "ng-select", 11);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("ngModelChange", function ResponsablesComprobantesEditComponent_ng_container_5_Template_ng_select_ngModelChange_8_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r17);
      const ctx_r16 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r16.modelChanged2($event));
    })("ngModelChange", function ResponsablesComprobantesEditComponent_ng_container_5_Template_ng_select_ngModelChange_8_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r17);
      const ctx_r18 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r18.configSelected = $event);
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](9, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](10, ResponsablesComprobantesEditComponent_ng_container_5_ng_template_10_Template, 2, 5, "ng-template", 12);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r1.responsable.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("formGroup", ctx_r1.formGroup);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx_r1.configuraciones && !ctx_r1.responsable.Id);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("items", ctx_r1.usuarios)("multiple", true)("loading", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](9, 8, ctx_r1.usuarioService.isLoading$))("closeOnSelect", false)("ngModel", ctx_r1.configSelected);
  }
}
function ResponsablesComprobantesEditComponent_ng_container_9_i_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](0, "i", 45);
  }
}
function ResponsablesComprobantesEditComponent_ng_container_9_Template(rf, ctx) {
  if (rf & 1) {
    const _r21 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerStart"](0);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](1, "button", 43);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("click", function ResponsablesComprobantesEditComponent_ng_container_9_Template_button_click_1_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r21);
      const ctx_r20 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r20.save());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](2, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](3, " Guardar ");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](4, ResponsablesComprobantesEditComponent_ng_container_9_i_4_Template, 1, 0, "i", 44);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](5, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("disabled", ctx_r2.formGroup.invalid || _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](2, 2, ctx_r2.responsableService.isLoading$));
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](3);
    _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](5, 4, ctx_r2.responsableService.isLoading$));
  }
}
// MC SINWEB-97 Componente encargado de la edición/creación de un responsable de autorización de comprobantes
class ResponsablesComprobantesEditComponent {
  constructor(fb, responsableService, modal, vh, configCompsService, authService, usuarioService) {
    this.fb = fb;
    this.responsableService = responsableService;
    this.modal = modal;
    this.vh = vh;
    this.configCompsService = configCompsService;
    this.authService = authService;
    this.usuarioService = usuarioService;
    this.subscriptions = [];
    this.configuraciones = []; // Arreglo con las configuraciones completas
    this.configSelectedInfo = {
      Id: undefined,
      Nombre: '',
      Descripcion: '',
      Monto: undefined,
      TipoMoneda: {},
      TipoComprobante: {},
      ModoAut: '',
      Activa: ''
    }; // Información de la configuración seleccionada
    this.configSelectedForm = this.fb.group({
      Id: [],
      Nombre: [],
      Descripcion: [],
      Monto: [],
      TipoMoneda: [],
      TipoComprobante: [],
      ModoAut: [],
      Activa: []
    }); // Formulario que uso solo para mostrar la información de la configuración seleccionada
    this.activeId = ''; // Id del panel activo para abrir el accordion con la información de la configuración seleccionada cuando se crea un nuevo responsable
    this.usuarios = []; // Arreglo con los usuarios de sinergial
    this.configSelected = [];
    this.configExistente = [];
  }
  ngOnInit() {
    //SP deshabilitado del formulario
    this.configSelectedForm.disable();
    this.currentUserSucursal = this.authService.usuario.IdSucursal;
    if (!this.responsable) {
      this.responsable = {
        Id: undefined,
        AutConfigComprobante: {},
        UsrUsuario: {}
      };
    } else {
      this.configSelectedForm.patchValue({
        Id: this.responsable.Id ? this.responsable.Id : undefined,
        Nombre: this.responsable.Nombre ? this.responsable.Nombre : undefined,
        Descripcion: this.responsable.Descripcion ? this.responsable.Descripcion : undefined,
        Monto: this.responsable.Monto ? this.responsable.Monto : undefined,
        TipoMoneda: this.responsable.TipoMoneda.Id ? this.responsable.TipoMoneda.Id : undefined,
        TipoComprobante: this.responsable.TipoComprobante.Id ? this.responsable.TipoComprobante.Id : undefined,
        ModoAut: this.responsable.ModoAut == 'General' ? 'G' : 'P',
        Activa: this.responsable.Activa ? this.responsable.Activa : undefined
      });
      if (this.responsable.AutResponsables.length) {
        this.configSelected = [];
        this.responsable.AutResponsables.forEach(resp => {
          this.configSelected.push(resp.UsrUsuario.Id);
        });
        this.configExistente = this.configSelected;
      }
    }
    // console.log(this.responsable);
    this.loadForm();
    this.cargarConfigs();
    this.cargarUsuarios();
  }
  // MC SINWEB-97 Formulario para inicializar el formulario del responsable
  loadForm() {
    this.formGroup = this.fb.group({
      IdAutConfigComprobante: [this.responsable.Id, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required])]
    });
    this.vh.inicializar();
    this.vh.formGroup = this.formGroup;
  }
  // MC SINWEB-97 Función para guardar cambios de una edición o creación del responsable
  save() {
    if (!this.formGroup.valid) {
      return;
    }
    if (this.responsable.Id) {
      this.edit();
    } else {
      this.create();
    }
  }
  // MC SINWEB-96 Función que edita un responsable existente
  edit() {
    let respPreparado = this.prepareResponsable('edit');
    const sbUpdate = this.configCompsService.putResponsables(respPreparado, this.responsable.Id).subscribe(res => {
      if (res.Errors == null) {
        this.modal.close();
      }
    });
    this.subscriptions.push(sbUpdate);
  }
  // MC SINWEB-96 Función que crea un nuevo responsable
  create() {
    let respPreparado = this.prepareResponsable('create');
    const sbCreate = this.configCompsService.postResponsables(respPreparado, this.formGroup.controls.IdAutConfigComprobante.value).subscribe(res => {
      if (res.Errors == null) {
        this.modal.close();
      }
    });
    this.subscriptions.push(sbCreate);
  }
  // MC SINWEB-97 Función que prepara el formulario para ser enviado al momento de la edición/creación
  prepareResponsable(accion) {
    let respPreparado = [];
    if (accion == 'edit') {
      respPreparado = this.configSelected.map(valor => {
        if (this.configExistente.includes(valor)) {
          let obj = {};
          obj['Id'] = this.responsable.AutResponsables.find(element => element.UsrUsuario.Id == valor).Id;
          obj['IdUsrUsuario'] = valor;
          return obj;
        } else {
          return {
            IdUsrUsuario: valor
          };
        }
      });
    } else {
      this.configSelected.forEach(idUser => {
        respPreparado.push({
          IdUsrUsuario: idUser
        });
      });
    }
    return respPreparado;
  }
  // MC SINWEB-97 Función que carga las configuraciones mostradas en el select
  cargarConfigs() {
    let datos = {};
    datos.PageNumber = -1;
    datos.Orden = 2;
    datos.SentidoOrden = 'Asc';
    datos.Activa = 'S';
    const susc = this.configCompsService.fetch(datos).subscribe(data => {
      this.configuraciones = data.Data;
    });
    this.subscriptions.push(susc);
  }
  // MC SINWEB-97 Función que carga los usuarios de Sinergial mostrados en el select
  cargarUsuarios() {
    let datos = {};
    datos.PageNumber = -1;
    datos.Orden = 2;
    datos.SentidoOrden = 'Asc';
    datos.BajaLogica = 'N';
    // datos.IdSucursal = this.currentUserSucursal;
    const susc = this.usuarioService.fetch(datos).subscribe(data => {
      this.usuarios = data.Data;
      // console.log(this.usuarios);
    });
    this.subscriptions.push(susc);
  }
  // MC SINWEB-97 Función que se ejecuta al seleccionar una configuración en el select, muestra la información de la configuración seleccionada
  modelChanged2(event) {
    this.configSelected = event;
  }
  modelChanged() {
    let configSelected = this.formGroup.controls.IdAutConfigComprobante.value;
    this.configSelectedInfo = this.configuraciones.find(config => config.Id == configSelected);
    // Si se selecciona una configuración, se muestra la información de la misma en el formulario
    // Si no, se limpia el formulario
    if (configSelected) {
      this.configSelectedForm.patchValue({
        Id: this.configSelectedInfo.Id,
        Nombre: this.configSelectedInfo.Nombre,
        Descripcion: this.configSelectedInfo.Descripcion,
        Monto: this.configSelectedInfo.Monto,
        TipoMoneda: this.configSelectedInfo.TipoMoneda.Id,
        TipoComprobante: this.configSelectedInfo.TipoComprobante.Id,
        ModoAut: this.configSelectedInfo.ModoAut,
        Activa: this.configSelectedInfo.Activa
      });
    } else {
      this.configSelectedForm.patchValue({
        Id: undefined,
        Nombre: undefined,
        Descripcion: undefined,
        Monto: undefined,
        TipoMoneda: undefined,
        TipoComprobante: undefined,
        ModoAut: undefined,
        Activa: undefined
      });
    }
    this.activeId = 'static-2';
  }
  ngOnDestroy() {
    this.subscriptions.forEach(sb => sb.unsubscribe());
  }
  static #_ = this.ɵfac = function ResponsablesComprobantesEditComponent_Factory(t) {
    return new (t || ResponsablesComprobantesEditComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](src_app_core_services_autorizacion_responsableAut_service__WEBPACK_IMPORTED_MODULE_1__.ResponsableAutService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__.NgbActiveModal), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__.ViewHelperService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](src_app_core_services_autorizacion_configComprobantes_service__WEBPACK_IMPORTED_MODULE_2__.ConfigComprobantesService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_3__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](src_app_core_services_core_usuario_service__WEBPACK_IMPORTED_MODULE_4__.UsuarioService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdefineComponent"]({
    type: ResponsablesComprobantesEditComponent,
    selectors: [["app-responsables-comprobantes-edit"]],
    inputs: {
      responsable: "responsable"
    },
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵProvidersFeature"]([src_app_core_services_core_viewHelper_service__WEBPACK_IMPORTED_MODULE_0__.ViewHelperService])],
    decls: 10,
    vars: 3,
    consts: [[1, "modal-content"], [1, "modal-header"], ["id", "example-modal-sizes-title-lg", 1, "modal-title", "h4"], [4, "ngIf"], [1, "overlay", "overlay-block", "cursor-default", "modal-body", 2, "min-height", "100px"], [1, "modal-footer"], ["type", "button", 1, "btn", "btn-light", "btn-elevate", "mr-2", 3, "click"], [1, "form-group", "row", 3, "formGroup"], ["class", "col-lg-12 p-2", 4, "ngIf"], [1, "row"], [1, "col-lg-12", "p-2"], ["bindLabel", "Nombre", "bindValue", "Id", "data-cy", "select-resp", 3, "items", "multiple", "loading", "closeOnSelect", "ngModel", "ngModelChange"], ["ng-option-tmp", ""], [1, "col-lg-12", "p-2", "mb-3", 3, "formGroup"], ["ngbAccordion", "", 3, "closeOthers"], ["accordion", "ngbAccordion"], ["ngbAccordionItem", "", 3, "collapsed"], ["ngbAccordionHeader", "", 1, "text-black"], ["ngbAccordionButton", ""], [1, "mdi", "mdi-information-outline", "me-1"], ["ngbAccordionCollapse", ""], ["ngbAccordionBody", ""], [1, "card", "mb-0", "shadow-sm"], [1, "card-body", "row"], [1, "form-label"], ["type", "text", "name", "Nombre", "formControlName", "Nombre", 1, "form-control", "form-control-solid"], ["name", "Descripcion", "name", "Descripcion", "formControlName", "Descripcion", 1, "form-control", "form-control-solid"], [1, "col-lg-6", "p-2"], ["formControlName", "TipoComprobante", 1, "form-select"], ["value", "null"], ["value", "5"], ["value", "18"], ["formControlName", "ModoAut", 1, "form-select"], ["value", "G"], ["value", "P"], [3, "title", "value", "decimals", "disabled"], ["placeholder", "Buscar moneda", "name", "IdTipoMoneda", "formControlName", "TipoMoneda", 1, "form-control", "form-control-lg", "form-control-solid", "form-select"], ["value", "1"], ["value", "2"], ["value", "3"], ["value", "4"], ["bindLabel", "Nombre", "bindValue", "Id", "formControlName", "IdAutConfigComprobante", 3, "items", "multiple", "loading", "closeOnSelect", "ngModelChange"], ["type", "checkbox", 3, "id", "ngModel", "ngModelOptions"], ["type", "submit", "data-cy", "guardar-resp", 1, "btn", "btn-success", "btn-elevate", 3, "disabled", "click"], ["Class", "bx bx-sync bx-spin font-size-16 align-middle", 4, "ngIf"], ["Class", "bx bx-sync bx-spin font-size-16 align-middle"]],
    template: function ResponsablesComprobantesEditComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](3, ResponsablesComprobantesEditComponent_ng_container_3_Template, 5, 3, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](4, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](5, ResponsablesComprobantesEditComponent_ng_container_5_Template, 11, 10, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](6, "div", 5)(7, "button", 6);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("click", function ResponsablesComprobantesEditComponent_Template_button_click_7_listener() {
          return ctx.modal.dismiss();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](8, " Cancelar ");
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](9, ResponsablesComprobantesEditComponent_ng_container_9_Template, 6, 6, "ng-container", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()();
      }
      if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.responsable);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.responsable);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", ctx.responsable);
      }
    },
    dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_9__.NgIf, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_7__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.CheckboxControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.NgModel, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__.NgbAccordionButton, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__.NgbAccordionDirective, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__.NgbAccordionItem, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__.NgbAccordionHeader, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__.NgbAccordionBody, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_8__.NgbAccordionCollapse, _ng_select_ng_select__WEBPACK_IMPORTED_MODULE_10__.NgSelectComponent, _ng_select_ng_select__WEBPACK_IMPORTED_MODULE_10__.NgOptionTemplateDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormControlName, _shared_ui_input_number_input_number_component__WEBPACK_IMPORTED_MODULE_5__.InputNumberComponent, _angular_common__WEBPACK_IMPORTED_MODULE_9__.AsyncPipe]
  });
}

/***/ }),

/***/ 2062:
/*!*****************************************************************************************************!*\
  !*** ./src/app/pages/autorizacion/responsables-comprobantes/responsables-comprobantes.component.ts ***!
  \*****************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ResponsablesComprobantesComponent: () => (/* binding */ ResponsablesComprobantesComponent)
/* harmony export */ });
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @angular/forms */ 56223);
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sweetalert2 */ 13519);
/* harmony import */ var sweetalert2__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sweetalert2__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ngx-ui-tour-ng-bootstrap */ 58469);
/* harmony import */ var src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/core/utils/constantes/constantes */ 74506);
/* harmony import */ var src_app_pages_autorizacion_responsables_comprobantes_responsables_comprobantes_edit_responsables_comprobantes_edit_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/pages/autorizacion/responsables-comprobantes/responsables-comprobantes-edit/responsables-comprobantes-edit.component */ 27850);
/* harmony import */ var src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/core/services/alertCustom.service */ 53206);
/* harmony import */ var src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/utils/permisos/permisos-autorizacion */ 92558);
/* harmony import */ var src_app_layouts_layouts_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/layouts/layouts.model */ 45660);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/core */ 65879);
/* harmony import */ var src_app_core_services_autorizacion_responsableAut_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/core/services/autorizacion/responsableAut.service */ 2874);
/* harmony import */ var src_app_core_services_core_tipoMoneda_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/core/services/core/tipoMoneda.service */ 29845);
/* harmony import */ var _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @ng-bootstrap/ng-bootstrap */ 85406);
/* harmony import */ var src_app_core_services_autorizacion_configComprobantes_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/core/services/autorizacion/configComprobantes.service */ 2029);
/* harmony import */ var src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/core/services/stateful.service */ 689);
/* harmony import */ var src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/core/services/exportacion.service */ 18969);
/* harmony import */ var src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/app/core/services/auth.service */ 90304);
/* harmony import */ var primeng_accordion__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! primeng/accordion */ 65389);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @angular/common */ 96814);
/* harmony import */ var primeng_sidebar__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! primeng/sidebar */ 99246);
/* harmony import */ var _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../shared/widget/tour/tour.component */ 63481);
/* harmony import */ var _shared_ui_select_loading_select_loading_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../shared/ui/select-loading/select-loading.component */ 24718);
/* harmony import */ var _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../shared/ui/table2/table2.component */ 63033);

























function ResponsablesComprobantesComponent_ng_template_3_Template(rf, ctx) {}
function ResponsablesComprobantesComponent_div_4_ng_template_3_Template(rf, ctx) {}
function ResponsablesComprobantesComponent_div_4_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "div", 38)(1, "div", 39)(2, "div", 40);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](3, ResponsablesComprobantesComponent_div_4_ng_template_3_Template, 0, 0, "ng-template", 3);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
    const _r5 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵreference"](56);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("formGroup", ctx_r1.filterForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngTemplateOutlet", _r5);
  }
}
function ResponsablesComprobantesComponent_a_43_Template(rf, ctx) {
  if (rf & 1) {
    const _r8 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "a", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function ResponsablesComprobantesComponent_a_43_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r8);
      const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r7.borrarNombreConfig());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](1, "i", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
  }
}
function ResponsablesComprobantesComponent_a_49_Template(rf, ctx) {
  if (rf & 1) {
    const _r10 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "a", 41);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function ResponsablesComprobantesComponent_a_49_Template_a_click_0_listener() {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r10);
      const ctx_r9 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r9.borrarNombreUsuario());
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](1, "i", 42);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
  }
}
const _c0 = () => [0];
function ResponsablesComprobantesComponent_ng_template_55_Template(rf, ctx) {
  if (rf & 1) {
    const _r12 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "div", 21)(1, "p-accordion", 43)(2, "p-accordionTab", 44)(3, "div")(4, "p", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](5, "Moneda");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](6, "select-loading", 46);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("valueSelect", function ResponsablesComprobantesComponent_ng_template_55_Template_select_loading_valueSelect_6_listener($event) {
      _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵrestoreView"](_r12);
      const ctx_r11 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
      return _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵresetView"](ctx_r11.filterForm.controls.IdTipoMonedaConfiguracion.setValue($event));
    });
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipe"](7, "async");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](8, "hr", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](9, "div")(10, "p", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](11, "Tipo de Comprobante");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](12, "select", 48)(13, "option", 49);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](14, "Todos");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](15, "option", 50);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](16, "Orden de Pago");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](17, "option", 51);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](18, "Pedido Compra");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](19, "hr", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](20, "div")(21, "p", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](22, "Modo de Autorizaci\u00F3n");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](23, "select", 52)(24, "option", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](25, "Todos");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](26, "option", 54);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](27, "General");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](28, "option", 55);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](29, "Por Proveedor");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](30, "hr", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](31, "div")(32, "p", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](33, "Estado");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](34, "select", 56)(35, "option", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](36, "Todos");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](37, "option", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](38, "Activa");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](39, "option", 58);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](40, "Inactiva");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](41, "hr", 47);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](42, "div")(43, "p", 45);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](44, "Cant. de responsables");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](45, "select", 59)(46, "option", 53);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](47, "Todos");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](48, "option", 57);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](49, "Sin responsables");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](50, "option", 58);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](51, "Con responsables");
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()()()()();
  }
  if (rf & 2) {
    const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("formGroup", ctx_r4.filterForm);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("multiple", true)("activeIndex", _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpureFunction0"](10, _c0));
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](5);
    _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("defaultValue", -1)("defaultString", "Todos")("items", ctx_r4.monedas)("valueSelected", ctx_r4.filterForm.controls.IdTipoMonedaConfiguracion.value)("loading", _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipeBind1"](7, 8, ctx_r4.tipoMonedaService.isLoading$));
  }
}
// MC SINWEB-97 Pantalla para asignar responsables de autorizaciones
class ResponsablesComprobantesComponent {
  constructor(fb, responsableService, tipoMonedaService, modalService, configCompsService, sf, alert, exportacion, authService, tourService) {
    this.fb = fb;
    this.responsableService = responsableService;
    this.tipoMonedaService = tipoMonedaService;
    this.modalService = modalService;
    this.configCompsService = configCompsService;
    this.sf = sf;
    this.alert = alert;
    this.exportacion = exportacion;
    this.authService = authService;
    this.tourService = tourService;
    this.MSJ_EXITO_INSERCION = 'Se asignaron correctamente los responsables.';
    this.MSJ_EXITO_EDICION = 'Se reasignó correctamente el responsable.';
    this.MSJ_EXITO_ELIMINACION = 'Se eliminaron correctamente los responsables seleccionados.';
    this.filtro = true;
    this.filtroMobile = false; // MC SINWEB-118
    this._unsubscribe = [];
    // Atributos para el componente tabla
    this.Responsables = [];
    this.cant_search = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_1__.CANT_SEARCH;
    this.pageOptions = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_1__.PAGE_OPTIONS;
    this.order = 2;
    this.sentido = src_app_core_utils_constantes_constantes__WEBPACK_IMPORTED_MODULE_1__.INIT_SENTIDO;
    this.totalItems = 0;
    this.respHeader = [{
      Nombre: 'Configuración',
      Order: 2,
      Key: 'Nombre',
      WCol: '40%'
    }, {
      Nombre: 'Monto',
      Key: 'Monto',
      Type: 'number',
      Pipe: 'number:1.2-2:es-AR',
      WCol: '8%'
    }, {
      Nombre: 'Moneda',
      Key: 'TipoMoneda.Nombre',
      WCol: '12%'
    }, {
      Nombre: 'Tipo',
      Key: 'TipoComprobante.Nombre',
      Type: 'badge',
      ColorKey: 'TipoComprobanteColor',
      WCol: '10%'
    }, {
      Nombre: 'Modo',
      Key: 'ModoAut',
      Type: 'badge',
      ColorKey: 'ModoAutColor',
      WCol: '10%'
    }, {
      Nombre: 'Estado',
      Order: 7,
      Key: 'ActivaString',
      Type: 'badge',
      ColorKey: 'ActivaColor',
      WCol: '7%'
    },
    // MC SINWEB-354 Se formatean diferente los responsables
    {
      Nombre: 'Responsables',
      Key: 'AutResponsables',
      // WCol: "25%",
      Type: 'list',
      Class: 'd-flex gap-1',
      ArrayList: [{
        Type: 'badge',
        Class: 'col-sm-2'
      }, {
        Key: 'UsrUsuario.Nombre',
        Class: 'col-sm-10'
      }]
    }];
    // Búsqueda por nombre
    this.searchForm = this.fb.group({
      NombreConfiguracion: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_16__.Validators.maxLength(100)],
      NombreUsuario: ['', _angular_forms__WEBPACK_IMPORTED_MODULE_16__.Validators.maxLength(20)]
    });
    // Filtros
    this.filterForm = this.fb.group({
      IdTipoMonedaConfiguracion: [-1],
      IdTipoComprobanteConfiguracion: [-1],
      ModoAutConfiguracion: [''],
      ActivaConfig: ['S'],
      SinResponsables: ['']
    });
    this.filterTipoMoneda = -1;
    this.filterTipoComprobante = -1;
    this.filterModoAut = '';
    this.filterActiva = 'S';
    this.filterSinResponsables = '';
    // Modal eliminar
    this.modalEliminar = sweetalert2__WEBPACK_IMPORTED_MODULE_0___default().mixin({
      customClass: {
        cancelButton: 'btn btn-secondary',
        confirmButton: 'btn btn-danger ms-2'
      },
      buttonsStyling: false,
      reverseButtons: true
    });
    // MC SINWEB-105 Permisos
    this.permisoInsRespAut = false;
    this.permisoModifRespAut = false;
    this.permisoElimRespAut = false;
  }
  ngOnInit() {
    this.page = 1;
    this.previousPage = 1;
    this.inicializarSteps();
    this.cargarPermisos();
    this.cargarTipoMonedas();
    this.configuracionFilter();
    this.inicializarEstado();
    this.loadPage();
    this.controlarTour();
    this.darkMode = document.querySelector('html').getAttribute('data-bs-theme') === src_app_layouts_layouts_model__WEBPACK_IMPORTED_MODULE_5__.THEME_DARK;
  }
  ngOnDestroy() {
    this._unsubscribe.forEach(sb => sb.unsubscribe());
  }
  /**
   * MC SINWEB-105 Carga de permisos
   */
  cargarPermisos() {
    this.permisoInsRespAut = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_4__.PERMISO_INS_RESP_AUT);
    this.permisoModifRespAut = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_4__.PERMISO_MODIF_RESP_AUT);
    this.permisoElimRespAut = this.authService.hasPermiso(src_app_core_utils_permisos_permisos_autorizacion__WEBPACK_IMPORTED_MODULE_4__.PERMISO_ELIM_RESP_AUT);
  }
  /**
   * MC SINWEB-118 Inicializa el estado de los componentes que permite almacenar su estado
   */
  inicializarEstado() {
    this.sf.states = this.sf.pagenamesAUT.RESP_AUT_STATES;
    //busqueda
    this.searchForm.controls.NombreConfiguracion.setValue(this.sf.getState(this.sf.states.RESP_AUT_S_NOMBRE_CONFIG));
    this.searchForm.controls.NombreUsuario.setValue(this.sf.getState(this.sf.states.RESP_AUT_S_NOMBRE_USUARIO));
    //SP SINWEB-239 variables para inputs no reactivos
    this.buscarConfig = this.sf.getState(this.sf.states.RESP_AUT_S_NOMBRE_CONFIG);
    this.buscarResponsable = this.sf.getState(this.sf.states.RESP_AUT_S_NOMBRE_USUARIO);
    //filtros
    // Nota: siempre establecer las variables locales primero, antes de modificar el formulario. Porque sino se dispara el valueChanges y por la naturaleza asincrona puede que no se establezcan los valores deseados correctamente
    this.filterSinResponsables = this.sf.getState(this.sf.states.RESP_AUT_F_SIN_RESP);
    this.filterTipoMoneda = this.sf.getState(this.sf.states.RESP_AUT_F_TIPO_MONEDA);
    this.filterTipoComprobante = this.sf.getState(this.sf.states.RESP_AUT_F_TIPO_COMP);
    this.filterModoAut = this.sf.getState(this.sf.states.RESP_AUT_F_MODO_AUT);
    this.filterActiva = this.sf.getState(this.sf.states.RESP_AUT_F_ACTIVA);
    this.filterForm.controls.ActivaConfig.setValue(this.filterActiva);
    this.filterForm.controls.ModoAutConfiguracion.setValue(this.filterModoAut);
    this.filterForm.controls.IdTipoComprobanteConfiguracion.setValue(this.filterTipoComprobante);
    this.filterForm.controls.SinResponsables.setValue(this.filterSinResponsables);
    //listado
    this.page = Number(this.sf.getState(this.sf.states.RESP_AUT_L_PAGE));
    this.cant_search = Number(this.sf.getState(this.sf.states.RESP_AUT_L_PAGESIZE));
    this.order = Number(this.sf.getState(this.sf.states.RESP_AUT_L_ORDER));
    this.sentido = this.sf.getState(this.sf.states.RESP_AUT_L_SENTIDO);
  }
  /**
   * Método que trae las configuraciones del servicio
   * @param {object} datos Datos de búsqueda
   */
  onSearch(datos) {
    const susc = this.responsableService.fetch(datos).subscribe(data => {
      this.Responsables = data.Data;
      if (data.Data != undefined) {
        this.totalItems = data.TotalRecords;
        // Creo una propiedad solo para mostrar los responsables en la tabla
        this.Responsables.forEach((value, index, array) => {
          if (value.Activa === 'N') {
            array[index]['ActivaColor'] = this.darkMode ? 'rgb(244, 106, 106)' : '#FF0000';
          } else {
            array[index]['ActivaColor'] = '#34c38f';
          }
          // array[index]['ActivaColor'] = value.Activa == 'S' ? '#34c38f' : '#FF0000';
          array[index]['ActivaString'] = value.Activa == 'S' ? 'Activa' : 'Inactiva';
          array[index].ModoAut = value.ModoAut === 'G' ? 'General' : 'Por Proveedor';
          array[index]['TipoComprobanteColor'] = value.TipoComprobante.Id === 5 ? '#85586F' : ' #BA94D1';
          array[index]['ModoAutColor'] = value.ModoAut === 'General' ? '#27374D' : '#74788d';
        });
      } else {
        this.totalItems = 0;
      }
    });
    susc.unsubscribe;
  }
  /**
   * Método que carga los filtros de búsqueda para realizar la petición
   * @param {any} page Página actual
   * @param {any} order Orden
   * @param {any} sentido Sentido (ascendente o descendente)
   * @returns {object} Datos de búsqueda
   */
  cargarFiltros(page, order, sentido) {
    let datos = {};
    // Paginación
    datos.PageNumber = page;
    datos.PageSize = this.cant_search;
    datos.Orden = order;
    // MC SINWEB-46 - Los valores internos que se manejan para el estado (order 7) con S y N, por lo cual intentar
    // ordenar muestra el orden contrario al deseado. Entonces, solo para este caso, se invierte
    // el comportamiento del sentido
    if (order == 7) {
      datos.SentidoOrden = sentido === 'Asc' ? 'Desc' : 'Asc';
    } else {
      datos.SentidoOrden = sentido;
    }
    datos.ActivaConfig = 'S';
    /**
     * SP SINWEB-239 variables para inputs no reactivos
     */
    if (this.buscarConfig != undefined && this.buscarConfig != '') {
      datos.NombreConfig = this.buscarConfig;
    }
    if (this.buscarResponsable != undefined && this.buscarResponsable != '') {
      datos.NombreUsuario = this.buscarResponsable;
    }
    // Filtros
    if (this.filterTipoMoneda >= 0) {
      datos.IdTipoMonedaConfig = this.filterTipoMoneda;
    }
    if (this.filterTipoComprobante >= 0) {
      datos.IdTipoComprobanteConfig = this.filterTipoComprobante;
    }
    if (this.filterModoAut !== undefined) {
      datos.ModoAutConfig = this.filterModoAut;
    }
    // MC SINWEB-324 Se aplica el filtro sin importar el valor
    datos.ActivaConfig = this.filterActiva;
    if (this.filterSinResponsables !== undefined) {
      datos.SinResponsables = this.filterSinResponsables;
    }
    //Almacenar el cambio de estado de los componentes
    if (datos.PageNumber != -1) {
      this.changeStates(datos);
    }
    return datos;
  }
  /**
   * MC SINWEB-118 Método que realiza el cambio de los estados según los valores elegidos
   * @param {any} datos Datos de búsqueda
   */
  changeStates(datos) {
    //busqueda
    this.sf.changeState(this.sf.states.RESP_AUT_S_NOMBRE_CONFIG, !datos.NombreConfig ? this.sf.states.RESP_AUT_S_NOMBRE_CONFIG.default : datos.NombreConfig);
    this.sf.changeState(this.sf.states.RESP_AUT_S_NOMBRE_USUARIO, !datos.NombreUsuario ? this.sf.states.RESP_AUT_S_NOMBRE_USUARIO.default : datos.NombreUsuario);
    //filtros
    this.sf.changeState(this.sf.states.RESP_AUT_F_TIPO_COMP, !datos.IdTipoComprobanteConfig ? this.sf.states.RESP_AUT_F_TIPO_COMP.default : datos.IdTipoComprobanteConfig);
    this.sf.changeState(this.sf.states.RESP_AUT_F_TIPO_MONEDA, !datos.IdTipoMonedaConfig ? this.sf.states.RESP_AUT_F_TIPO_MONEDA.default : datos.IdTipoMonedaConfig);
    this.sf.changeState(this.sf.states.RESP_AUT_F_MODO_AUT, !datos.ModoAutConfig ? this.sf.states.RESP_AUT_F_MODO_AUT.default : datos.ModoAutConfig);
    // MC SINWEB-324 Se aplica el filtro sin importar el valor
    this.sf.changeState(this.sf.states.RESP_AUT_F_ACTIVA, datos.ActivaConfig);
    this.sf.changeState(this.sf.states.RESP_AUT_F_SIN_RESP, !datos.SinResponsables ? this.sf.states.RESP_AUT_F_SIN_RESP.default : datos.SinResponsables);
    //listado
    this.sf.changeState(this.sf.states.RESP_AUT_L_PAGE, datos.PageNumber);
    this.sf.changeState(this.sf.states.RESP_AUT_L_PAGESIZE, datos.PageSize);
    this.sf.changeState(this.sf.states.RESP_AUT_L_ORDER, datos.Orden);
    this.sf.changeState(this.sf.states.RESP_AUT_L_SENTIDO, datos.SentidoOrden);
  }
  /**
   * Método para cargar los datos de la página
   */
  loadPage() {
    this.onSearch(this.cargarFiltros(this.page, this.order, this.sentido));
  }
  /**
   * Método para escuchar a los cambios en el formulario de filtros
   */
  configuracionFilter() {
    this._unsubscribe.push(this.filterForm.controls.IdTipoMonedaConfiguracion.valueChanges.subscribe(IdTipoMoneda => {
      if (this.filtro || this.filtroMobile) {
        this.filterTipoMoneda = IdTipoMoneda;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.IdTipoComprobanteConfiguracion.valueChanges.subscribe(IdTipoComprobante => {
      if (this.filtro || this.filtroMobile) {
        this.filterTipoComprobante = IdTipoComprobante;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.ModoAutConfiguracion.valueChanges.subscribe(ModoAut => {
      if (this.filtro || this.filtroMobile) {
        this.filterModoAut = ModoAut;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.ActivaConfig.valueChanges.subscribe(Activa => {
      if (this.filtro || this.filtroMobile) {
        this.filterActiva = Activa;
        this.page = 1;
        this.loadPage();
      }
    }));
    this._unsubscribe.push(this.filterForm.controls.SinResponsables.valueChanges.subscribe(SinResponsables => {
      if (this.filtro || this.filtroMobile) {
        this.filterSinResponsables = SinResponsables;
        this.page = 1;
        this.loadPage();
      }
    }));
  }
  /**
   * MC SINWEB-96 Método que carga los tipos de monedas
   */
  cargarTipoMonedas() {
    this.monedas = [];
    let datos = {
      PageNumber: -1
    };
    const susc = this.tipoMonedaService.fetch(datos).subscribe(resp => {
      this.monedas = resp.Data;
      this.filterForm.controls.IdTipoMonedaConfiguracion.setValue(this.sf.getState(this.sf.states.RESP_AUT_F_TIPO_MONEDA), {
        emitEvent: false
      });
    });
    susc.unsubscribe;
  }
  /**
   * MC SINWEB-97 Método para cambio de página
   * MC SINWEB-324 Se cambia el nombre y acciones del método
   * @param {any} event Evento con la pagina
   */
  lazyLoadChange($event) {
    this.page = $event.page;
    this.order = $event.order;
    this.cant_search = $event.cant;
    this.sentido = $event.sentido;
    this.loadPage();
  }
  /**
   * MC SINWEB-97 Método que abre el modal para la edición de un responsable
   * @param {any} responsable Responsable a editar
   * @param {string} accion Editar
   */
  editar(responsable, accion) {
    if (accion == 'edit') {
      const modalRef = this.modalService.open(src_app_pages_autorizacion_responsables_comprobantes_responsables_comprobantes_edit_responsables_comprobantes_edit_component__WEBPACK_IMPORTED_MODULE_2__.ResponsablesComprobantesEditComponent, {
        size: 'lg',
        backdrop: 'static',
        keyboard: false,
        scrollable: true
      });
      modalRef.componentInstance.responsable = responsable;
      modalRef.result.then(() => {
        this.loadPage();
        this.alert.showBasicAlert(this.MSJ_EXITO_INSERCION, '', 'success');
      }, () => {});
    }
  }
  /**
   * MC SINWEB-97 Método que abre la confirmación para eliminar un responsable
   * @param {any} registro Configuración con los responsables a eliminar
   */
  eliminar(registro) {
    this.alert.showReturnAlert('Eliminación de Responsables de Autorización de Comprobantes.', "¿Está seguro de eliminar los responsables: '" + registro.ResponsablesString + "' de la configuración '" + registro.Nombre + "'?", 'warning', 'Eliminar', 'Cancelar', true).then(result => {
      if (result.value) {
        this.eliminarResponsables(registro.Id);
      }
    });
  }
  /**
   * Método que elimina los responsables de una configuración
   * @param {number} id Id de la configuración
   */
  eliminarResponsables(id) {
    const sbUpdate = this.configCompsService.putResponsables([], id).subscribe(res => {
      if (res.Errors == null) {
        this.alert.showBasicAlert(this.MSJ_EXITO_ELIMINACION, '', 'success');
        this.loadPage();
      }
    });
    this._unsubscribe.push(sbUpdate);
  }
  /**
   * MC SINWEB-97 Método para activar acción
   * @param {any} event Evento con la acción a realizar
   */
  acciones(event) {
    switch (event.accion) {
      case 'edit':
        this.editar(event.registro, 'edit');
        break;
      case 'delete':
        this.eliminar(event.registro);
        break;
      default:
        console.log(`La accion ${event.accion} no esta disponible`);
    }
  }
  /**
   * MC SINWEB-118 Método para limpiar los filtros
   */
  cleanStates() {
    this.sf.cleanAllStates();
    this.resetComp();
  }
  resetComp() {
    this._unsubscribe.forEach(sub => {
      sub.unsubscribe();
    });
    this.page = 1;
    this.previousPage = 1;
    this.buscarConfig = '';
    this.buscarResponsable = '';
    //cargar combos de filtros
    this.cargarPermisos();
    this.cargarTipoMonedas();
    this.inicializarEstado();
    this.configuracionFilter();
    this.loadPage();
  }
  exportTo(extension) {
    let datos = this.cargarFiltros(-1, this.order, this.sentido);
    //datos.PageSize= this.totalItems;
    delete datos.PageSize;
    const columns = ['Configuración', 'Monto', 'Moneda', 'Tipo', 'Modo', 'Estado', 'Responsables'];
    const keys = ['Nombre', 'Monto', 'TipoMoneda.Nombre', 'TipoComprobante.Nombre', 'ModoAut', 'ActivaString', 'ResponsablesString'];
    this.alert.showLoadingAlert('Exportando Responsables', 'Generando archivo ' + extension + ', este proceso puede tardar unos minutos');
    this.responsableService.fetch(datos).subscribe(data => {
      let responsables = data.Data;
      responsables.forEach((resp, index, array) => {
        let nombresResp = resp.AutResponsables.map(obj => obj.UsrUsuario.Nombre);
        array[index]['ResponsablesString'] = nombresResp.join(', ');
        array[index]['ActivaString'] = resp.Activa == 'S' ? 'Activa' : 'Inactiva';
        array[index].ModoAut = resp.ModoAut === 'G' ? 'General' : 'Por Proveedor';
      });
      this.alert.closeLoadingAlert();
      this.alert.showBasicAlert('Responsables Exportados', 'Archivo ' + extension + ' generado', 'success');
      // MC SINWEB-378 Exportación a Pdf
      if (extension === 'Excel') {
        this.exportacion.exportToExcel(responsables, columns, keys, 'Listado de Responsables de Autorización de Comprobantes');
      } else {
        this.exportacion.exportToPdf(responsables, columns, keys, 'Listado de Responsables de Autorización de Comprobantes');
      }
    });
  }
  /**
   * SP Método para filtro por configuración
   * @returns {any} Nombre de la configuración
   */
  getNombreConfig() {
    return this.searchForm.get('NombreConfiguracion').value;
  }
  /**
   * Método para resetear el nombre de la configuración
   */
  borrarNombreConfig() {
    this.searchForm.get('NombreConfiguracion').reset('');
    this.page = 1;
    this.buscarConfig = '';
    this.loadPage();
  }
  buscarNombreConfig() {
    this.page = 1;
    //SP SINWEB-239 filtros no reactivos
    this.buscarConfig = this.getNombreConfig();
    this.loadPage();
  }
  /**
   * SP SINWEB-239 metodo para control de filtro no reactivo config
   */
  busquedaConfig() {
    return this.buscarConfig != undefined && this.buscarConfig != '';
  }
  /**
   * SP Método para filtro por responsable
   * @returns {any} Nombre del responsable
   */
  getNombreUsuario() {
    return this.searchForm.get('NombreUsuario').value;
  }
  buscarNombreUsuario() {
    this.page = 1;
    this.buscarResponsable = this.getNombreUsuario();
    this.loadPage();
  }
  /**
   * Método para resetear el nombre del responsable
   */
  borrarNombreUsuario() {
    this.searchForm.get('NombreUsuario').reset('');
    this.page = 1;
    this.buscarResponsable = '';
    this.loadPage();
  }
  /**
   * SP SINWEB-239 metodo para control de filtro no reactivo responsable
   */
  busquedaResponsable() {
    return this.buscarResponsable != undefined && this.buscarResponsable != '';
  }
  /**
   * MC SINWEB-159 Método que iniciar tour de la vista
   */
  iniciarTour() {
    this.tourService.start();
  }
  /**
   * MC SINWEB-159 Método para inicializar el objecto de pasos del tour
   */
  inicializarSteps() {
    fetch('./assets/tours/autorizacion/responsables-comprobantes.json').then(response => response.json()).then(tourRespComp => {
      this.tourSteps = tourRespComp;
      this.tourService.initialize(this.tourSteps);
    });
  }
  /**
   * MC SINWEB-159 Observable para realizar acciones durante los pasos
   */
  controlarTour() {
    this._unsubscribe.push(this.tourService.stepHide$.subscribe(step => {
      if (step.step.anchorId == 'responsablesComp.anchor.id') {
        this.filtro = true;
      }
    }));
  }
  static #_ = this.ɵfac = function ResponsablesComprobantesComponent_Factory(t) {
    return new (t || ResponsablesComprobantesComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_16__.FormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_autorizacion_responsableAut_service__WEBPACK_IMPORTED_MODULE_6__.ResponsableAutService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_core_tipoMoneda_service__WEBPACK_IMPORTED_MODULE_7__.TipoMonedaService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](_ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_17__.NgbModal), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_autorizacion_configComprobantes_service__WEBPACK_IMPORTED_MODULE_8__.ConfigComprobantesService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_stateful_service__WEBPACK_IMPORTED_MODULE_9__.StatefulService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_3__.AlertCustomService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_exportacion_service__WEBPACK_IMPORTED_MODULE_10__.ExportacionService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](src_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_11__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdirectiveInject"](ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__.TourService));
  };
  static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵdefineComponent"]({
    type: ResponsablesComprobantesComponent,
    selectors: [["app-responsables-comprobantes"]],
    features: [_angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵProvidersFeature"]([src_app_core_services_alertCustom_service__WEBPACK_IMPORTED_MODULE_3__.AlertCustomService, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__.TourService])],
    decls: 58,
    vars: 28,
    consts: [[1, "row"], ["position", "left", 1, "d-block", "d-lg-none", 3, "visible", "visibleChange"], [1, "m-2"], [3, "ngTemplateOutlet"], ["class", "d-none d-lg-block col-xxl-2 col-lg-3", 4, "ngIf"], [3, "ngClass"], [1, "card"], [1, "card-body", "border-bottom"], [1, "d-flex", "align-items-center"], [1, "mb-0", "card-title", "flex-grow-1", "d-flex", "flex-row"], ["tourAnchor", "responsablesComp.anchor.id", 1, "mb-1", "align-self-center"], [1, "text-primary", 2, "cursor", "pointer", 3, "click"], [1, "bx", "bx-info-circle", "font-size-24", "align-self-center"], [1, "flex-shrink-0", "d-flex", "gap-1"], ["tourAnchor", "refresh.anchor.id", 1, "btn", "btn-light", 3, "click"], ["tourAnchor", "filtroReset.anchor.id", 3, "ngClass", "click"], ["ngbDropdown", "", 1, "dropdown", "d-inline-block"], ["type", "menu", "id", "dropdownMenuButton1", "data-bs-toggle", "dropdown", "aria-expanded", "false", "ngbDropdownToggle", "", "tourAnchor", "export.anchor.id", 1, "btn", "btn-success"], [1, "mdi", "mdi-dots-vertical"], ["aria-labelledby", "dropdownMenuButton1", "ngbDropdownMenu", "", 1, "dropdown-menu"], ["href", "javascript:void(0);", 1, "dropdown-item", 3, "click"], [3, "formGroup"], [1, "row", "g-3", "justify-content-center", "justify-content-lg-start"], [1, "col-auto", "d-none", "d-lg-block"], ["data-cy", "boton-filtro", 1, "btn", "btn-icon", "btn-soft-secondary", "w-100", 3, "click"], [1, "col-auto", "d-block", "d-lg-none"], [1, "btn", "btn-icon", "btn-soft-secondary", "w-100", 3, "click"], [1, "col-xxl-4", "col-lg-4"], ["tourAnchor", "searchConfig.anchor.id", "data-cy", "div-search-config", 1, "input-group"], ["type", "text", "formControlName", "NombreConfiguracion", "placeholder", "Buscar por Configuraci\u00F3n", "data-cy", "search-config", "maxlength", "100", 1, "form-control", 3, "keyup.enter"], ["class", "btn btn-secondary", 3, "click", 4, "ngIf"], [1, "btn", "btn-primary", 3, "click"], [1, "bx", "bx-search-alt-2"], ["tourAnchor", "searchResp.anchor.id", "data-cy", "div-search-responsable", 1, "input-group"], ["type", "text", "formControlName", "NombreUsuario", "placeholder", "Buscar por Responsable", "data-cy", "search-responsable", "maxlength", "20", 1, "form-control", 3, "keyup.enter"], [1, "card-body"], ["title", "Responsables de Autorizaci\u00F3n de Comprobantes", 3, "columns", "datos", "page", "order", "sentido", "cant_search", "totalItems", "edit", "delete", "acciones", "apiTable", "isLoading", "lazyLoad", "emitAction"], ["FILTRO", ""], [1, "d-none", "d-lg-block", "col-xxl-2", "col-lg-3"], ["tourAnchor", "filtroRespComp.anchor.id", 1, "card", 3, "formGroup"], [1, "card-body", "p-2"], [1, "btn", "btn-secondary", 3, "click"], [1, "bx", "bx-x"], [3, "multiple", "activeIndex"], ["header", "B\u00E1sicos"], [1, "text-muted"], [3, "defaultValue", "defaultString", "items", "valueSelected", "loading", "valueSelect"], [1, "my-2"], ["formControlName", "IdTipoComprobanteConfiguracion", "data-cy", "tipocomp-resp", 1, "form-select"], ["value", "-1", "selected", ""], ["value", "5"], ["value", "18"], ["formControlName", "ModoAutConfiguracion", "data-cy", "modoaut-resp", 1, "form-select"], ["value", ""], ["value", "G"], ["value", "P"], ["formControlName", "ActivaConfig", "data-cy", "activa-resp", 1, "form-select"], ["value", "S"], ["value", "N"], ["formControlName", "SinResponsables", "data-cy", "cantresp-resp", 1, "form-select"]],
    template: function ResponsablesComprobantesComponent_Template(rf, ctx) {
      if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](0, "div", 0)(1, "p-sidebar", 1);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("visibleChange", function ResponsablesComprobantesComponent_Template_p_sidebar_visibleChange_1_listener($event) {
          return ctx.filtroMobile = $event;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](3, ResponsablesComprobantesComponent_ng_template_3_Template, 0, 0, "ng-template", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](4, ResponsablesComprobantesComponent_div_4_Template, 4, 2, "div", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](5, "div", 5)(6, "div", 6)(7, "div", 7)(8, "div", 8)(9, "span", 9)(10, "h5", 10);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](11, " Responsables de Autorizaci\u00F3n de Comprobantes ");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](12, " \u00A0 ");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](13, "a", 11);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function ResponsablesComprobantesComponent_Template_a_click_13_listener() {
          return ctx.iniciarTour();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](14, "i", 12);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](15, "div", 13)(16, "a", 14);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function ResponsablesComprobantesComponent_Template_a_click_16_listener() {
          return ctx.loadPage();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](17, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipe"](18, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](19, "a", 15);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function ResponsablesComprobantesComponent_Template_a_click_19_listener() {
          return ctx.cleanStates();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](20, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](21, "div", 16)(22, "button", 17);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](23, "i", 18);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](24, "ul", 19)(25, "li")(26, "a", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function ResponsablesComprobantesComponent_Template_a_click_26_listener() {
          return ctx.exportTo("Excel");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](27, "Exportar Excel");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](28, "li")(29, "a", 20);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function ResponsablesComprobantesComponent_Template_a_click_29_listener() {
          return ctx.exportTo("Pdf");
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtext"](30, "Exportar Pdf");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](31, "div", 7);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementContainerStart"](32, 21);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](33, "div", 22)(34, "div", 23)(35, "a", 24);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function ResponsablesComprobantesComponent_Template_a_click_35_listener() {
          return ctx.filtro = !ctx.filtro;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](36, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](37, "div", 25)(38, "a", 26);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function ResponsablesComprobantesComponent_Template_a_click_38_listener() {
          return ctx.filtroMobile = !ctx.filtroMobile;
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](39, "i", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](40, "div", 27)(41, "div", 28)(42, "input", 29);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("keyup.enter", function ResponsablesComprobantesComponent_Template_input_keyup_enter_42_listener() {
          return ctx.buscarNombreConfig();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](43, ResponsablesComprobantesComponent_a_43_Template, 2, 0, "a", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](44, "a", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function ResponsablesComprobantesComponent_Template_a_click_44_listener() {
          return ctx.buscarNombreConfig();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](45, "i", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](46, "div", 27)(47, "div", 33)(48, "input", 34);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("keyup.enter", function ResponsablesComprobantesComponent_Template_input_keyup_enter_48_listener() {
          return ctx.buscarNombreUsuario();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](49, ResponsablesComprobantesComponent_a_49_Template, 2, 0, "a", 30);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](50, "a", 31);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("click", function ResponsablesComprobantesComponent_Template_a_click_50_listener() {
          return ctx.buscarNombreUsuario();
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](51, "i", 32);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementContainerEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementStart"](52, "div", 35)(53, "app-table2", 36);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵlistener"]("lazyLoad", function ResponsablesComprobantesComponent_Template_app_table2_lazyLoad_53_listener($event) {
          return ctx.lazyLoadChange($event);
        })("emitAction", function ResponsablesComprobantesComponent_Template_app_table2_emitAction_53_listener($event) {
          return ctx.acciones($event);
        });
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipe"](54, "async");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelementEnd"]()()()()();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplate"](55, ResponsablesComprobantesComponent_ng_template_55_Template, 52, 11, "ng-template", null, 37, _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵtemplateRefExtractor"]);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵelement"](57, "app-tour");
      }
      if (rf & 2) {
        const _r5 = _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵreference"](56);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("visible", ctx.filtroMobile);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngTemplateOutlet", _r5);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx.filtro);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", ctx.filtro ? "col-xxl-10 col-lg-9" : "col-12");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](12);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipeBind1"](18, 24, ctx.responsableService.isLoading$) ? "bx bx-sync bx-spin font-size-16 align-middle" : "bx bx-sync font-size-16 align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](2);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", ctx.sf.getCantCustomStates() > 0 ? "btn btn-danger" : "btn bg-danger bg-soft");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"]();
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", "mdi mdi-filter-remove-outline mdi-16px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](12);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("formGroup", ctx.searchForm);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", !ctx.filtro ? "mdi mdi-filter-outline mdi-18px align-middle" : "mdi mdi-filter-off-outline mdi-18px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](3);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngClass", !ctx.filtroMobile ? "mdi mdi-filter-outline mdi-18px align-middle" : "mdi mdi-filter-off-outline mdi-18px align-middle");
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx.busquedaConfig());
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](6);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("ngIf", ctx.busquedaResponsable());
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵadvance"](4);
        _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵproperty"]("columns", ctx.respHeader)("datos", ctx.Responsables)("page", ctx.page)("order", ctx.order)("sentido", ctx.sentido)("cant_search", ctx.cant_search)("totalItems", ctx.totalItems)("edit", ctx.permisoModifRespAut)("delete", ctx.permisoElimRespAut)("acciones", ctx.permisoModifRespAut || ctx.permisoElimRespAut)("apiTable", true)("isLoading", _angular_core__WEBPACK_IMPORTED_MODULE_15__["ɵɵpipeBind1"](54, 26, ctx.responsableService.isLoading$));
      }
    },
    dependencies: [primeng_accordion__WEBPACK_IMPORTED_MODULE_19__.Accordion, primeng_accordion__WEBPACK_IMPORTED_MODULE_19__.AccordionTab, _angular_common__WEBPACK_IMPORTED_MODULE_20__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_20__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_20__.NgTemplateOutlet, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.NgSelectOption, _angular_forms__WEBPACK_IMPORTED_MODULE_16__["ɵNgSelectMultipleOption"], _angular_forms__WEBPACK_IMPORTED_MODULE_16__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.SelectControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.MaxLengthValidator, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_17__.NgbDropdown, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_17__.NgbDropdownToggle, _ng_bootstrap_ng_bootstrap__WEBPACK_IMPORTED_MODULE_17__.NgbDropdownMenu, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_16__.FormControlName, primeng_sidebar__WEBPACK_IMPORTED_MODULE_21__.Sidebar, ngx_ui_tour_ng_bootstrap__WEBPACK_IMPORTED_MODULE_18__.TourAnchorNgBootstrapDirective, _shared_widget_tour_tour_component__WEBPACK_IMPORTED_MODULE_12__.TourComponent, _shared_ui_select_loading_select_loading_component__WEBPACK_IMPORTED_MODULE_13__.SelectLoadingComponent, _shared_ui_table2_table2_component__WEBPACK_IMPORTED_MODULE_14__.Table2Component, _angular_common__WEBPACK_IMPORTED_MODULE_20__.AsyncPipe],
    styles: [".accordion .accordion-item {\n  color: #495057 !important;\n}\n\n  .accordion .accordion-item .accordion-body {\n  padding: 0 !important;\n}"]
  });
}

/***/ })

}]);