(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-cadastro-cad-apolice-cad-apolice-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/apolice-por-tanque-form/apolice-por-tanque-form.component.html":
/*!*************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/apolice-por-tanque-form/apolice-por-tanque-form.component.html ***!
  \*************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<table class=\"table table-striped table-hover\" *ngIf=\"showTableApoliceTanque\" [ngStyle]=\"{'margin-top':'2%'}\">\n    <thead>\n    <th scope=\"col\">{{ 'labels.tanque' | translate }}</th>\n    </thead>\n    <tbody>\n    <tr *ngFor=\"let art of responseApoliceTanque | removeExcluidos;let i = index\"\n        (click)=\"selected(art, i)\"\n        [ngClass]=\"{'info':i == _index && item.item }\">\n        <td>{{ art.tanqueId }}</td>\n    </tr>\n    <tr *ngIf=\"emptyApoliceTanque\">\n        <th colspan=\"9\">\n            {{'messages.nenhumRegistroEncontrado' | translate }}\n        </th>\n    </tr>\n    </tbody>\n</table>\n\n<form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\" *ngIf=\"!showTableApoliceTanque\">\n    <div class=\"modal-body\">\n        <div class=\"row\">\n            <div class=\"col-lg-12\">\n                <app-pesquisa-tanque id=\"tanqueId\"\n                                     name=\"tanqueId\"\n                                     [(ngModel)]=\"item.tanqueId\"\n                                     required=\"true\"\n                                     label=\"deposito\"\n                                     title=\"deposito\"\n                                     [disabled]=\"showDetailApoliceTanque?true:null\">\n                </app-pesquisa-tanque>\n            </div>\n        </div>\n        <div class=\"row\" *ngIf=\"!showDetailApoliceTanque\">\n            <div class=\"col-lg-6\">\n                <div class=\"form-group form-group-sm\">\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.salvar' | translate }}\n                    </button>\n                </div>\n            </div>\n        </div>\n    </div>\n</form>\n\n\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/cad-apolice-duplicate/cad-apolice-duplicate.component.html":
/*!*********************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/cad-apolice-duplicate/cad-apolice-duplicate.component.html ***!
  \*********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal\" id=\"cad-apolice-duplicate-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"uni-modal-dialog-md-50\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.duplicateApolice' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12\">\r\n                            <app-card-container tituloCard=\"dadosOrigem\">\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-4\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"_nrApolice\">{{\"labels.nrApolice\" | translate }}</label>\r\n                                            <input id=\"_nrApolice\"\r\n                                                   name=\"_nrApolice\"\r\n                                                   value=\"{{data.nrApolice}}\"\r\n                                                   class=\"form-control form-control-sm\"\r\n                                                   type=\"text\"\r\n                                                   disabled>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-12 col-md-12 col-sm-12\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"fornecedor\">{{\"labels.fornecedor\" | translate }}</label>\r\n                                            <div class=\"input-group\">\r\n                                                <input id=\"fornecedor\"\r\n                                                       name=\"fornecedor\"\r\n                                                       value=\"{{data.destinatarioIdFornecedor}}\"\r\n                                                       class=\"form-control form-control-sm col-2\"\r\n                                                       type=\"text\"\r\n                                                       disabled>\r\n                                                <input id=\"clienteFantasia\"\r\n                                                       name=\"clienteFantasia\"\r\n                                                       value=\"{{data.fantasia}}\"\r\n                                                       class=\"form-control form-control-sm col\"\r\n                                                       type=\"text\"\r\n                                                       disabled>\r\n                                            </div>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-4\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label for=\"_apolice\">{{\"labels.apolice\" | translate }}</label>\r\n                                            <input id=\"_apolice\"\r\n                                                   name=\"_apolice\"\r\n                                                   value=\"{{data.cadApoliceId}}\"\r\n                                                   class=\"form-control form-control-sm\"\r\n                                                   type=\"text\"\r\n                                                   disabled>\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </app-card-container>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12\">\r\n                            <app-card-container tituloCard=\"dadosDestino\">\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-4\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label class=\"required\" for=\"nrApolice\">{{'labels.nrApolice' | translate}}</label>\r\n                                            <input type=\"text\" class=\"form-control form-control-sm\" id=\"nrApolice\"\r\n                                                   name=\"nrApolice\"\r\n                                                   [(ngModel)]=\"data.nrApoliceDestino\"\r\n                                                   required=\"true\">\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                                <div class=\"row\">\r\n                                    <div class=\"col-lg-4\">\r\n                                        <div class=\"form-group form-group-sm\">\r\n                                            <label class=\"required\" for=\"apolice\">{{'labels.apolice' | translate}}</label>\r\n                                            <input type=\"text\" class=\"form-control form-control-sm\" id=\"apolice\"\r\n                                                   name=\"apolice\"\r\n                                                   [(ngModel)]=\"data.apoliceIdDestino\"\r\n                                                   required=\"true\">\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </app-card-container>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.ok' | translate }}\r\n                    </button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>\r\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/cad-apolice-form/cad-apolice-form.component.html":
/*!***********************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/cad-apolice-form/cad-apolice-form.component.html ***!
  \***********************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaForm\"\n                      [formAction]=\"actionForm\"\n                      [itemData]=\"data.cadApoliceId\"\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"section-comand-bar\">\n            <div class=\"tab-content top\">\n                <!-- ABAS -->\n                <app-form-legenda></app-form-legenda>\n                <div class=\"tab-pane active show\" id=\"ge\">\n                    <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\n                        <app-validacoes></app-validacoes>\n                        <div class=\"clearfix\">\n                            <ul class=\"nav nav-tabs \">\n                                <li class=\"nav-item\">\n                                    <a class=\"nav-link active show\" data-toggle=\"tab\" (click)=\"showAdd = false\"\n                                       href=\"#da\">{{\"labels.dados\" | translate}}</a>\n                                </li>\n                                <li class=\"nav-item\" *ngIf=\"data.cadApoliceId\">\n                                    <a class=\"nav-link\" data-toggle=\"tab\" (click)=\"showAdd = true\"\n                                       href=\"#co\">{{\"labels.itens\" | translate}}</a>\n                                </li>\n                                <li class=\"nav-item\" *ngIf=\"currentApolice?.cadApoliceId\">\n                                    <a class=\"nav-link\" data-toggle=\"tab\"\n                                       href=\"#de\">{{\"labels.depositos\" | translate}}</a>\n                                </li>\n                            </ul>\n                        </div>\n                        <div class=\"tab-content top\">\n                            <!-- ABA DADOS -->\n                            <div class=\"tab-pane active show\" id=\"da\">\n                                <div class=\"row\">\n                                    <div class=\"col-lg-6\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"nrApolice\"\n                                                   [class.required]=\"funcoesService.isCreate(this.actionForm)\">{{'labels.apolice' | translate}}</label>\n                                            <input id=\"apolice\"\n                                                   name=\"apolice\"\n                                                   [(ngModel)]=\"data.cadApoliceId\"\n                                                   maxlength=\"20\"\n                                                   required=\"true\"\n                                                   class=\"form-control form-control-sm\"\n                                                   type=\"text\"\n                                                   [disabled]=\"!funcoesService.isCreate(this.actionForm)\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-6\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <app-pesquisa-destinatario\n                                                    id=\"fornecedor\"\n                                                    name=\"fornecedor\"\n                                                    label=\"fornecedor\"\n                                                    modalTitle=\"pesquisaDeCliente\"\n                                                    [(ngModel)]=\"data.destinatarioIdFornecedor\"\n                                                    tipoDestinatario=\"F,J\"\n                                                    showCgcCpf=\"false\"\n                                                    showInscricao=\"false\"\n                                                    required=\"true\"\n                                                    [disabled]=\"funcoesService.isDetail(this.actionForm)\"\n                                                    [inSelected]=\"data.fornecedor\"\n                                                    (outModel)=\"trataDest($event)\">\n                                            </app-pesquisa-destinatario>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-6\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"nrApolice\"\n                                                   class=\"required\">{{'labels.nrApolice' | translate}}</label>\n                                            <input id=\"nrApolice\"\n                                                   name=\"nrApolice\"\n                                                   [(ngModel)]=\"data.nrApolice\"\n                                                   maxlength=\"20\"\n                                                   class=\"form-control form-control-sm\"\n                                                   type=\"text\"\n                                                   [disabled]=\"funcoesService.isDetail(this.actionForm)\">\n                                        </div>\n                                    </div>\n                                </div>\n                            </div>\n                            <!-- ABA ITENS -->\n                            <div class=\"tab-pane\" id=\"co\" *ngIf=\"data.cadApoliceId\">\n                                <div>\n                                    <div class=\"btn-group\">\n                                        <a title=\"\" class=\"btn uni-btn btn-sm\" (click)=\"goBackItemApolice();\"\n                                           *ngIf=\"!showTableApoliceItem\">\n                                            <i class=\"icon-arrow-left _white\"></i>\n                                        </a>\n                                        <a title=\"{{ 'buttons.novo' | translate }}\" class=\"btn uni-btn btn-sm\"\n                                           (click)=\"createItem(null, true, funcoesService.isDetail(this.actionForm))\" *ngIf=\"showTableApoliceItem\"\n                                           [ngClass]=\"{'opacity': funcoesService.isDetail(this.actionForm)}\">\n                                            <i class=\"icon-plus _white\"></i>\n                                        </a>\n                                        <a title=\"{{ 'buttons.visualizar' | translate }}\"\n                                           class=\"btn uni-btn btn-sm opacity\"\n                                           (click)=\"showItemApolice(currentApolice)\" *ngIf=\"showTableApoliceItem\"\n                                           [ngClass]=\"{'opacity': funcoesService.isDetail(this.actionForm) && currentApolice?.cadApoliceId == null ? true: false}\">\n                                            <i class=\"icon-eye _white\"></i>\n                                        </a>\n                                        <a title=\"{{ 'buttons.editar' | translate }}\" class=\"btn uni-btn btn-sm opacity\"\n                                           (click)=\"createItem(currentApolice, funcoesService.isDetail(this.actionForm), funcoesService.isDetail(this.actionForm))\" *ngIf=\"showTableApoliceItem\"\n                                           [ngClass]=\"{'opacity': funcoesService.isDetail(this.actionForm)}\">\n                                            <i class=\"icon-pencil _white\"></i>\n                                        </a>\n                                        <a title=\"{{ 'buttons.excluir' | translate }}\"\n                                           class=\"btn uni-btn btn-sm opacity\" (click)=\"deleteItem(currentApolice, funcoesService.isDetail(this.actionForm))\"\n                                           *ngIf=\"showTableApoliceItem\"\n                                           [ngClass]=\"{'opacity': funcoesService.isDetail(this.actionForm)}\">\n                                            <i class=\"icon-close _white\"></i>\n                                        </a>\n                                    </div>\n                                </div>\n\n                                <app-item-apolice-form [data]=\"data\"\n                                                       [showTableApoliceItem]=\"showTableApoliceItem\"\n                                                       [showDetailApoliceItem]=\"showDetailApoliceItem\"\n                                                       [item]=\"currentApolice\"\n                                                       [emptyItemApolice]=\"emptyItemApolice\"\n                                                       (selectedItemApolice)=\"updateItemApolice($event)\"\n                                                       (response)=\"executeItem($event)\"></app-item-apolice-form>\n\n                            </div>\n                            <!-- ABA DEPOSITOS -->\n                            <div class=\"tab-pane\" id=\"de\">\n                                <div>\n                                    <div class=\"btn-group\">\n                                        <a title=\"\" class=\"btn uni-btn btn-sm\" (click)=\"goBackApoliceTanque();\"\n                                           *ngIf=\"!showTableApoliceTanque\"\n                                        >\n                                            <i class=\"icon-arrow-left _white\"></i>\n                                        </a>\n                                        <a title=\"{{ 'buttons.novo' | translate }}\" class=\"btn uni-btn btn-sm\"\n                                           (click)=\"createApolicePorTanque(null, true, funcoesService.isDetail(this.actionForm))\" *ngIf=\"showTableApoliceTanque\"\n                                           [ngClass]=\"{'opacity': funcoesService.isDetail(this.actionForm)}\">\n                                            <i class=\"icon-plus _white\"></i>\n                                        </a>\n                                        <a title=\"{{ 'buttons.visualizar' | translate }}\"\n                                           class=\"btn uni-btn btn-sm opacity\"\n                                           (click)=\"showApoliceTanque(currentApoliceTanque)\"\n                                           *ngIf=\"showTableApoliceTanque\"\n                                           [ngClass]=\"{'opacity': funcoesService.isDetail(this.actionForm) && currentApolice?.cadApoliceId == null ? true: false}\">\n                                            <i class=\"icon-eye _white\"></i>\n                                        </a>\n                                        <a title=\"{{ 'buttons.editar' | translate }}\" class=\"btn uni-btn btn-sm opacity\"\n                                           (click)=\"createApolicePorTanque(currentApoliceTanque, funcoesService.isDetail(this.actionForm), funcoesService.isDetail(this.actionForm))\"\n                                           *ngIf=\"showTableApoliceTanque\"\n                                           [ngClass]=\"{'opacity': funcoesService.isDetail(this.actionForm)}\">\n                                            <i class=\"icon-pencil _white\"></i>\n                                        </a>\n                                        <a title=\"{{ 'buttons.excluir' | translate }}\"\n                                           class=\"btn uni-btn btn-sm opacity\"\n                                           (click)=\"deleteApoliceTanque(currentApoliceTanque, funcoesService.isDetail(this.actionForm))\"\n                                           *ngIf=\"showTableApoliceTanque\"\n                                           [ngClass]=\"{'opacity': funcoesService.isDetail(this.actionForm)}\">\n                                            <i class=\"icon-close _white\"></i>\n                                        </a>\n                                    </div>\n                                </div>\n                                <app-apolice-por-tanque-form [data]=\"data\"\n                                                             [showTableApoliceTanque]=\"showTableApoliceTanque\"\n                                                             [item]=\"currentApoliceTanque\"\n                                                             [showDetailApoliceTanque]=\"showDetailApoliceTanque\"\n                                                             [emptyApoliceTanque]=\"emptyApoliceTanque\"\n                                                             [currentApolice]=\"currentApolice\"\n                                                             [responseApoliceTanque]=\"responseApoliceTanque\"\n                                                             (selectedApoliceTanque)=\"updateApoliceTanque($event)\"\n                                                             (response)=\"executeApoliceTanque($event)\">\n                                </app-apolice-por-tanque-form>\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-lg-4\">\n                          <span *ngIf=\"data.sisCampoAdds\">\n                            <div *ngFor=\"let d of data.sisCampoAdds\" [class.col-lg-6]=\"!d.colunas\">\n                              <app-campos-adicionais name=\"{{d.campo}}\" [sisCampoAdd]=\"d\" [(ngModel)]=\"d.valorCampo\"\n                                                     [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                     [required]=\"d.obrigatorio === 'S'\"></app-campos-adicionais>\n                            </div>\n                          </span>\n                            </div>\n                        </div>\n                        <div class=\"row\" *ngIf=\"showTableApoliceItem && showTableApoliceTanque\">\n                            <div class=\"col-6 col-12\">\n                                <div class=\"form-group\">\n                                    <button class=\"btn btn-success mr-2\" type=\"submit\"\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                        {{ 'buttons.salvar' | translate }}\n                                    </button>\n                                    <button class=\"btn btn-success mr-2\" (click)=\"saveAndCreate(f)\" type=\"button\"\n                                            [disabled]=\"funcoesService.isDetail(actionForm)\">{{ 'buttons.salvarNovo' | translate }}</button>\n                                </div>\n                            </div>\n                        </div>\n                    </form>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/cad-apolice-index/cad-apolice-index.component.html":
/*!*************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/cad-apolice-index/cad-apolice-index.component.html ***!
  \*************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\"\n                      [formAction]=\"actionForm\"\n                      [itemData]=\"data.cadApoliceId\"\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <table id=\"dtCadApolice\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n</div>\n\n<app-propriedades></app-propriedades>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n<app-cad-apolice-duplicate [data]=\"data\"></app-cad-apolice-duplicate>\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/item-apolice-form/item-apolice-form.component.html":
/*!*************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/item-apolice-form/item-apolice-form.component.html ***!
  \*************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<table class=\"table table-striped table-hover\" *ngIf=\"showTableApoliceItem\" [ngStyle]=\"{'margin-top':'2%'}\">\n    <thead>\n    <th class=\"pct-10-l\">{{ 'labels.item' | translate }}</th>\n    <th class=\"text-left\">{{ 'labels.planta' | translate }}</th>\n    <th class=\"text-left\">{{ 'labels.localizacao' | translate }}</th>\n    <th class=\"pct-20-r\">{{ 'labels.seguro' | translate }}</th>\n    </thead>\n    <tbody>\n    <tr *ngFor=\"let _item of data.itemApolices | removeExcluidos; let i = index\"\n        (click)=\"selected(_item, i)\"\n        [ngClass]=\"{'info':i == _index && item.item}\"\n    >\n        <td>{{ _item.item }}</td>\n        <td>{{ _item.planta }}</td>\n        <td>{{ _item.localizacao }}</td>\n        <td class=\"pct-20-r\">{{ _item.vlSeguro | formatCurrency: 2 }}</td>\n    </tr>\n    <tr *ngIf=\"emptyItemApolice\">\n        <th colspan=\"9\">\n            {{'messages.nenhumRegistroEncontrado' | translate }}\n        </th>\n    </tr>\n    </tbody>\n</table>\n\n<form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\" *ngIf=\"!showTableApoliceItem\">\n    <div class=\"modal-body\">\n        <div class=\"row\">\n            <div class=\"col-lg-6\">\n                <div class=\"form-group form-group-sm\">\n                    <label for=\"adicaoDi\"\n                           class=\"required\">{{'labels.item' | translate}}</label>\n                    <input id=\"adicaoDi\"\n                           name=\"adicaoDi\"\n                           [(ngModel)]=\"item.item\"\n                           maxlength=\"4\"\n                           class=\"form-control form-control-sm\"\n                           type=\"number\"\n                           required=\"true\"\n                           disabled>\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-lg-6\">\n                <div class=\"form-group form-group-sm\">\n                    <label for=\"item\">{{'labels.planta' | translate}}</label>\n                    <input id=\"item\"\n                           name=\"item\"\n                           [(ngModel)]=\"item.planta\"\n                           class=\"form-control form-control-sm\"\n                           maxlength=\"15\"\n                           type=\"text\"\n                           required=\"true\"\n                           [disabled]=\"showDetailApoliceItem?true:null\">\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-lg-6\">\n                <div class=\"form-group form-group-sm\">\n                    <label for=\"vlAduaneiro\">{{'labels.localizacao' | translate}}</label>\n                    <input id=\"vlAduaneiro\"\n                           name=\"vlAduaneiro\"\n                           [(ngModel)]=\"item.localizacao\"\n                           maxlength=\"20\"\n                           class=\"form-control form-control-sm\"\n                           type=\"text\"\n                           [disabled]=\"showDetailApoliceItem?true:null\">\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-lg-6\">\n                <div class=\"form-group form-group-sm\">\n                    <label for=\"txCambio\">{{'labels.valor' | translate}}</label>\n                    <input id=\"txCambio\"\n                           name=\"txCambio\"\n                           [(ngModel)]=\"item.vlSeguro\"\n                           maxlength=\"11\"\n                           class=\"form-control form-control-sm\"\n                           type=\"text\"\n                           maxlength=\"11\"\n                           currencyMask\n                           [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\"\n                           [disabled]=\"showDetailApoliceItem?true:null\">\n                </div>\n            </div>\n        </div>\n\n        <div class=\"row\" *ngIf=\"!showDetailApoliceItem\">\n            <div class=\"col-lg-6\">\n                <div class=\"form-group form-group-sm\">\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.salvar' | translate }}\n                    </button>\n                </div>\n            </div>\n        </div>\n    </div>\n</form>\n\n\n");

/***/ }),

/***/ "./src/app/pages/cadastro/cad-apolice/apolice-por-tanque-form/apolice-por-tanque-form.component.ts":
/*!*********************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cad-apolice/apolice-por-tanque-form/apolice-por-tanque-form.component.ts ***!
  \*********************************************************************************************************/
/*! exports provided: ApolicePorTanqueFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApolicePorTanqueFormComponent", function() { return ApolicePorTanqueFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cad_apolice_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../cad-apolice.model */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.model.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};




var ApolicePorTanqueFormComponent = /** @class */ (function () {
    function ApolicePorTanqueFormComponent(loginService, message) {
        this.loginService = loginService;
        this.message = message;
        this.response = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.selectedApoliceTanque = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    ApolicePorTanqueFormComponent.prototype.ngOnInit = function () {
    };
    ApolicePorTanqueFormComponent.prototype.onSubmit = function (form) {
        if (!form.invalid) {
            jQuery("#apolice-tanque").modal("hide");
            if (!this.item.item) {
                this.item.item = this.currentApolice.item;
            }
            var isset = false;
            for (var i = 0; i < this.responseApoliceTanque.length; i++) {
                if (this.responseApoliceTanque[i].tanqueId === this.item.tanqueId) {
                    isset = true;
                    break;
                }
            }
            if (isset) {
                this.message.warning("titles.deposito", 'messages.depositoJaExiste');
                return;
            }
            this.response.emit(this.item);
            this.item = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_3__["ApolicePorTanque"]();
        }
    };
    ApolicePorTanqueFormComponent.prototype.selected = function (item, index) {
        this.item = item;
        this.item.item = +this.currentApolice.item;
        this._index = index;
        this.selectedApoliceTanque.emit(this.item);
    };
    ApolicePorTanqueFormComponent.ctorParameters = function () { return [
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__["LoginService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], ApolicePorTanqueFormComponent.prototype, "data", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _cad_apolice_model__WEBPACK_IMPORTED_MODULE_3__["ApolicePorTanque"])
    ], ApolicePorTanqueFormComponent.prototype, "item", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], ApolicePorTanqueFormComponent.prototype, "currentApolice", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Boolean)
    ], ApolicePorTanqueFormComponent.prototype, "showTableApoliceTanque", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Boolean)
    ], ApolicePorTanqueFormComponent.prototype, "showDetailApoliceTanque", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Boolean)
    ], ApolicePorTanqueFormComponent.prototype, "emptyApoliceTanque", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Array)
    ], ApolicePorTanqueFormComponent.prototype, "responseApoliceTanque", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ApolicePorTanqueFormComponent.prototype, "response", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ApolicePorTanqueFormComponent.prototype, "selectedApoliceTanque", void 0);
    ApolicePorTanqueFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-apolice-por-tanque-form',
            template: __importDefault(__webpack_require__(/*! raw-loader!./apolice-por-tanque-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/apolice-por-tanque-form/apolice-por-tanque-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_1__["LoginService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"]])
    ], ApolicePorTanqueFormComponent);
    return ApolicePorTanqueFormComponent;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/cad-apolice/cad-apolice-duplicate/cad-apolice-duplicate.component.ts":
/*!*****************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cad-apolice/cad-apolice-duplicate/cad-apolice-duplicate.component.ts ***!
  \*****************************************************************************************************/
/*! exports provided: CadApoliceDuplicateComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadApoliceDuplicateComponent", function() { return CadApoliceDuplicateComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cad_apolice_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cad-apolice.model */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.model.ts");
/* harmony import */ var _cad_apolice_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../cad-apolice.service */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.service.ts");
/* harmony import */ var _cad_apolice_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../cad-apolice.constants */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.constants.ts");
/* harmony import */ var _cad_apolice_index_cad_apolice_index_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../cad-apolice-index/cad-apolice-index.component */ "./src/app/pages/cadastro/cad-apolice/cad-apolice-index/cad-apolice-index.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};









var CadApoliceDuplicateComponent = /** @class */ (function () {
    function CadApoliceDuplicateComponent(funcoesService, messageService, index, service) {
        var _this = this;
        this.funcoesService = funcoesService;
        this.messageService = messageService;
        this.index = index;
        this.service = service;
        this.dataApoliceDuplica = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_5__["CadApolice"]();
        this.constantes = new _cad_apolice_constants__WEBPACK_IMPORTED_MODULE_7__["CadApoliceConstants"]();
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        this.mensagens = [];
        this.sub = _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("emitterDuplicaApolice").subscribe(function (object) {
            _this.service.getById(object.cadApoliceId).subscribe(function (data) {
                _this.data = data;
                _this.data.fantasia = data.fornecedor.fantasia;
                jQuery("#cad-apolice-duplicate-dialog").modal("show");
            });
        });
    }
    CadApoliceDuplicateComponent.prototype.ngOnInit = function () {
    };
    CadApoliceDuplicateComponent.prototype.onSubmit = function (form) {
        var _this = this;
        if (form.invalid) {
            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formError").emit(form);
            this.funcoesService.backToTop();
            return;
        }
        this.data.logRotina = "Manut. Duplica Apolice";
        this.data.cadApoliceId = this.data.apoliceIdDestino;
        this.data.nrApolice = this.data.nrApoliceDestino;
        this.data.itemApolices.forEach(function (result) {
            delete result.cadApoliceId;
            delete result.item;
            result.apoliceporTanques.forEach(function (_result) {
                delete _result.cadApoliceId;
                delete _result.item;
                // delete _result.tanqueId;
            });
        });
        this.service
            .save(this.data, false)
            .subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result.validationResult);
            if (result.validationResult && !result.validationResult.isValid) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("backError").emit(_this.mensagens);
            }
            else {
                _this.messageService.saveSuccess("titles.cadApolice");
                jQuery("#cad-apolice-duplicate-dialog").modal("hide");
                _this.index.refresh();
            }
        });
    };
    CadApoliceDuplicateComponent.ctorParameters = function () { return [
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] },
        { type: _cad_apolice_index_cad_apolice_index_component__WEBPACK_IMPORTED_MODULE_8__["CadApoliceIndexComponent"] },
        { type: _cad_apolice_service__WEBPACK_IMPORTED_MODULE_6__["CadApoliceService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _cad_apolice_model__WEBPACK_IMPORTED_MODULE_5__["CadApolice"])
    ], CadApoliceDuplicateComponent.prototype, "data", void 0);
    CadApoliceDuplicateComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-cad-apolice-duplicate",
            template: __importDefault(__webpack_require__(/*! raw-loader!./cad-apolice-duplicate.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/cad-apolice-duplicate/cad-apolice-duplicate.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"],
            _cad_apolice_index_cad_apolice_index_component__WEBPACK_IMPORTED_MODULE_8__["CadApoliceIndexComponent"],
            _cad_apolice_service__WEBPACK_IMPORTED_MODULE_6__["CadApoliceService"]])
    ], CadApoliceDuplicateComponent);
    return CadApoliceDuplicateComponent;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/cad-apolice/cad-apolice-form/cad-apolice-form.component.scss":
/*!*********************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cad-apolice/cad-apolice-form/cad-apolice-form.component.scss ***!
  \*********************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".opacity {\n  opacity: 0.7;\n}\n\ni._white {\n  color: white;\n}\n\ntable tr.active {\n  background-color: #f5f5f5;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvY2FkYXN0cm8vY2FkLWFwb2xpY2UvY2FkLWFwb2xpY2UtZm9ybS9DOlxcQ29ycG9yYXRlXFxDb3Jwb3JhdGVXZWJEZXNlbnZcXF91bmlzb2x1dGlvbi9zcmNcXGFwcFxccGFnZXNcXGNhZGFzdHJvXFxjYWQtYXBvbGljZVxcY2FkLWFwb2xpY2UtZm9ybVxcY2FkLWFwb2xpY2UtZm9ybS5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvcGFnZXMvY2FkYXN0cm8vY2FkLWFwb2xpY2UvY2FkLWFwb2xpY2UtZm9ybS9jYWQtYXBvbGljZS1mb3JtLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsWUFBQTtBQ0NGOztBREVBO0VBQ0UsWUFBQTtBQ0NGOztBREVBO0VBQ0UseUJBQUE7QUNDRiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL2NhZGFzdHJvL2NhZC1hcG9saWNlL2NhZC1hcG9saWNlLWZvcm0vY2FkLWFwb2xpY2UtZm9ybS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5vcGFjaXR5IHtcclxuICBvcGFjaXR5OiAwLjc7XHJcbn1cclxuXHJcbmkuX3doaXRlIHtcclxuICBjb2xvcjogd2hpdGU7XHJcbn1cclxuXHJcbnRhYmxlIHRyLmFjdGl2ZSB7XHJcbiAgYmFja2dyb3VuZC1jb2xvcjogI2Y1ZjVmNTtcclxufVxyXG4iLCIub3BhY2l0eSB7XG4gIG9wYWNpdHk6IDAuNztcbn1cblxuaS5fd2hpdGUge1xuICBjb2xvcjogd2hpdGU7XG59XG5cbnRhYmxlIHRyLmFjdGl2ZSB7XG4gIGJhY2tncm91bmQtY29sb3I6ICNmNWY1ZjU7XG59Il19 */");

/***/ }),

/***/ "./src/app/pages/cadastro/cad-apolice/cad-apolice-form/cad-apolice-form.component.ts":
/*!*******************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cad-apolice/cad-apolice-form/cad-apolice-form.component.ts ***!
  \*******************************************************************************************/
/*! exports provided: CadApoliceFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadApoliceFormComponent", function() { return CadApoliceFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cad-apolice.model */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.model.ts");
/* harmony import */ var _cad_apolice_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cad-apolice.constants */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.constants.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _cad_apolice_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../cad-apolice.service */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.service.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};










var CadApoliceFormComponent = /** @class */ (function (_super) {
    __extends(CadApoliceFormComponent, _super);
    function CadApoliceFormComponent(router, cadApoliceService, messageService, activatedRoute, funcoesService, permissoesUtils, service) {
        var _this = _super.call(this, new _cad_apolice_constants__WEBPACK_IMPORTED_MODULE_2__["CadApoliceConstants"](), funcoesService) || this;
        _this.router = router;
        _this.cadApoliceService = cadApoliceService;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.service = service;
        _this.data = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["CadApolice"]();
        _this.mensagens = [];
        _this.constantes = new _cad_apolice_constants__WEBPACK_IMPORTED_MODULE_2__["CadApoliceConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.currentApolice = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ItemApolice"]();
        _this.currentApoliceTanque = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ApolicePorTanque"]();
        _this.showAdd = false;
        _this.showTableApoliceItem = true;
        _this.showDetailApoliceItem = false;
        _this.showTableApoliceTanque = true;
        _this.showDetailApoliceTanque = false;
        _this.responseApoliceTanque = [];
        _this.emptyItemApolice = false;
        _this.emptyApoliceTanque = false;
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    CadApoliceFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
            var cadApolice = _this.activatedRoute.snapshot.paramMap.get("id");
            if (cadApolice) {
                _this.cadApoliceService.getById(cadApolice).subscribe(function (resp) {
                    if (resp) {
                        _this.data = resp;
                        _this.data.itemApolices.filter(function (value) {
                            for (var i = 0; i < value.apoliceporTanques.length; i++) {
                                if (_this.currentApolice.item === value.apoliceporTanques[i].item) {
                                    _this.responseApoliceTanque.push(value.apoliceporTanques[i]);
                                }
                            }
                        });
                        _this.doCheckItemApolice();
                    }
                    else {
                        _this.messageService.warning("titles.cadApolice", "messages.nenhumRegistroEncontrado");
                        _this.back();
                    }
                });
            }
            else {
                _this.doCheckItemApolice();
            }
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    CadApoliceFormComponent.prototype.back = function () {
        this.router.navigate([this.target + "/cadastro/cadApolice"]);
    };
    CadApoliceFormComponent.prototype.getCamposAdicionais = function () {
        var _this = this;
        this.funcoesService.camposAdicionais
            .get(this.constantes.sisFormularioId)
            .subscribe(function (data) {
            _this.data.sisCampoAdds = data;
        });
    };
    CadApoliceFormComponent.prototype.saveAndCreate = function (form) {
        this.onSubmit(form, true);
    };
    CadApoliceFormComponent.prototype.onSubmit = function (form, create) {
        var _this = this;
        if (create === void 0) { create = false; }
        if (form.invalid) {
            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_9__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        this.data.logRotina = "Manutenção Apolice";
        this.service
            .save(this.data, this.funcoesService.isEdit(this.actionForm))
            .subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result.validationResult);
            if (result.validationResult && !result.validationResult.isValid) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_9__["EventEmitterService"].get("backError").emit(_this.mensagens);
                _this.data = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["CadApolice"]();
                _this.currentApolice = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ItemApolice"]();
                _this.currentApoliceTanque = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ApolicePorTanque"]();
                _this.doCheckItemApolice();
                _this.doCheckApoliceTanque();
            }
            else {
                _this.messageService.saveSuccess("titles.cadApolice");
                _this.back();
            }
        });
    };
    CadApoliceFormComponent.prototype.updateItemApolice = function (event) {
        var _this = this;
        this.currentApolice = event;
        this.currentApoliceTanque = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ApolicePorTanque"]();
        this.currentApoliceTanque.item = this.currentApolice.item;
        this.responseApoliceTanque = [];
        this.data.itemApolices.filter(function (value) {
            for (var i = 0; i < value.apoliceporTanques.length; i++) {
                if (_this.currentApolice.item === value.apoliceporTanques[i].item) {
                    _this.responseApoliceTanque.push(value.apoliceporTanques[i]);
                }
            }
        });
        this.doCheckApoliceTanque();
    };
    CadApoliceFormComponent.prototype.updateApoliceTanque = function (event) {
        this.currentApoliceTanque = event;
    };
    CadApoliceFormComponent.prototype.createItem = function (item, create, action) {
        if (item === void 0) { item = null; }
        if (create === void 0) { create = false; }
        if (action === void 0) { action = false; }
        if (item && !item.cadApoliceId) {
            return;
        }
        if (create) {
            this.currentApolice = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ItemApolice"]();
        }
        this.showTableApoliceItem = action;
    };
    CadApoliceFormComponent.prototype.showItemApolice = function (item) {
        if (item && !item.cadApoliceId) {
            return;
        }
        this.showDetailApoliceItem = true;
        this.showTableApoliceItem = false;
    };
    CadApoliceFormComponent.prototype.deleteItem = function (item, action) {
        var _this = this;
        if (action === void 0) { action = false; }
        if (action) {
            return;
        }
        if (!item) {
            return;
        }
        this.messageService.removeConfirm(function () {
            if (item.sitReg && item.sitReg === "A") {
                item.sitReg = "E";
            }
            else if (!item.sitReg) {
                var currentPos = null;
                for (var i = 0; i < _this.data.itemApolices.length; i++) {
                    if (_this.data.itemApolices[i] === item) {
                        currentPos = i;
                        break;
                    }
                }
                if (currentPos != null) {
                    _this.data.itemApolices.splice(currentPos, 1);
                }
            }
            _this.doCheckItemApolice();
            _this.currentApolice = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ItemApolice"]();
        });
    };
    CadApoliceFormComponent.prototype.doCheckItemApolice = function () {
        var count;
        count = this.data.itemApolices.filter(function (item) {
            if (item.sitReg && item.sitReg === "A") {
                return item;
            }
            else if (!item.sitReg) {
                return item;
            }
        });
        if (count.length > 0) {
            this.emptyItemApolice = false;
        }
        else {
            this.emptyItemApolice = true;
        }
    };
    CadApoliceFormComponent.prototype.doCheckApoliceTanque = function () {
        var count;
        count = this.responseApoliceTanque.filter(function (item) {
            if (item.sitReg && item.sitReg === "A") {
                return item;
            }
            else if (!item.sitReg) {
                return item;
            }
        });
        if (count.length > 0) {
            this.emptyApoliceTanque = false;
        }
        else {
            this.emptyApoliceTanque = true;
        }
    };
    CadApoliceFormComponent.prototype.createApolicePorTanque = function (item, create, action) {
        if (item === void 0) { item = null; }
        if (create === void 0) { create = false; }
        if (action === void 0) { action = false; }
        if (item && !item.cadApoliceId) {
            return;
        }
        if (create) {
            this.currentApoliceTanque = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ApolicePorTanque"]();
        }
        else if (!item.sitReg) {
            return;
        }
        this.showTableApoliceTanque = action;
    };
    CadApoliceFormComponent.prototype.showApoliceTanque = function (item) {
        if (item && !item.cadApoliceId) {
            return;
        }
        this.showDetailApoliceTanque = true;
        this.showTableApoliceTanque = false;
    };
    CadApoliceFormComponent.prototype.deleteApoliceTanque = function (item, action) {
        var _this = this;
        if (action === void 0) { action = false; }
        if (action) {
            return;
        }
        if (!item) {
            return;
        }
        this.messageService.removeConfirm(function () {
            if (item.sitReg && item.sitReg === "A") {
                item.sitReg = "E";
            }
            else if (!item.sitReg) {
                var currentPos_1 = null;
                _this.data.itemApolices.map(function (value) {
                    if (value.item === item.item) {
                        for (var i = 0; i < value.apoliceporTanques.length; i++) {
                            if (value.apoliceporTanques[i] === item) {
                                currentPos_1 = i;
                                break;
                            }
                        }
                        if (currentPos_1) {
                            value.apoliceporTanques.splice(currentPos_1, 1);
                        }
                    }
                });
            }
            _this.responseApoliceTanque = [];
            _this.data.itemApolices.filter(function (value) {
                for (var i = 0; i < value.apoliceporTanques.length; i++) {
                    if (_this.currentApolice.item === value.apoliceporTanques[i].item) {
                        _this.responseApoliceTanque.push(value.apoliceporTanques[i]);
                    }
                }
            });
            _this.doCheckApoliceTanque();
            _this.currentApoliceTanque = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ApolicePorTanque"]();
            _this.currentIndexApoliceTanque = null;
        });
    };
    CadApoliceFormComponent.prototype.goBackItemApolice = function () {
        this.showTableApoliceItem = true;
        this.showTableApoliceTanque = true;
        this.currentApolice = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ItemApolice"]();
        this.currentApoliceTanque = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ApolicePorTanque"]();
        this.currentIndexApoliceTanque = null;
        this.showDetailApoliceItem = false;
    };
    CadApoliceFormComponent.prototype.goBackApoliceTanque = function () {
        this.showTableApoliceTanque = true;
        this.currentApoliceTanque = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ApolicePorTanque"]();
        this.showDetailApoliceTanque = false;
    };
    CadApoliceFormComponent.prototype.executeItem = function (event) {
        event.cadApoliceId = this.data.cadApoliceId;
        if (this.data.itemApolices.length === 0) {
            event.item = 1;
            this.data.itemApolices.push(event);
        }
        else if (this.data.itemApolices.length > 0 && !event.sitReg) {
            var pos = this.data.itemApolices.length - 1;
            var aux = this.data.itemApolices[pos].item;
            if (!event.item) {
                event.item = aux + 1;
                this.data.itemApolices.push(event);
            }
        }
        this.doCheckItemApolice();
        this.showTableApoliceItem = true;
        this.currentApolice = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ItemApolice"]();
    };
    CadApoliceFormComponent.prototype.executeApoliceTanque = function (event) {
        var _this = this;
        event.cadApoliceId = this.data.cadApoliceId;
        this.data.itemApolices.map(function (value) {
            if (value.item === event.item) {
                if (!event.sitReg) {
                    value.apoliceporTanques.push(event);
                }
            }
        });
        this.responseApoliceTanque = [];
        this.data.itemApolices.filter(function (value) {
            for (var i = 0; i < value.apoliceporTanques.length; i++) {
                if (value.apoliceporTanques[i].item === event.item) {
                    _this.responseApoliceTanque.push(value.apoliceporTanques[i]);
                }
            }
        });
        this.doCheckApoliceTanque();
        this.showTableApoliceTanque = true;
        this.currentApoliceTanque = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ApolicePorTanque"]();
    };
    CadApoliceFormComponent.prototype.edit = function () {
        this.router.navigate([this.target + "/cadastro/cadApolice/edit/" + this.data.cadApoliceId]);
    };
    CadApoliceFormComponent.prototype.trataDest = function (destinatario) {
        this.data.fornecedor = destinatario;
    };
    CadApoliceFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"] },
        { type: _cad_apolice_service__WEBPACK_IMPORTED_MODULE_8__["CadApoliceService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["ActivatedRoute"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] },
        { type: _cad_apolice_service__WEBPACK_IMPORTED_MODULE_8__["CadApoliceService"] }
    ]; };
    CadApoliceFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-cad-apolice-form',
            template: __importDefault(__webpack_require__(/*! raw-loader!./cad-apolice-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/cad-apolice-form/cad-apolice-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./cad-apolice-form.component.scss */ "./src/app/pages/cadastro/cad-apolice/cad-apolice-form/cad-apolice-form.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"],
            _cad_apolice_service__WEBPACK_IMPORTED_MODULE_8__["CadApoliceService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_4__["ActivatedRoute"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"],
            _cad_apolice_service__WEBPACK_IMPORTED_MODULE_8__["CadApoliceService"]])
    ], CadApoliceFormComponent);
    return CadApoliceFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/cad-apolice/cad-apolice-index/cad-apolice-index.component.ts":
/*!*********************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cad-apolice/cad-apolice-index/cad-apolice-index.component.ts ***!
  \*********************************************************************************************/
/*! exports provided: CadApoliceIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadApoliceIndexComponent", function() { return CadApoliceIndexComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cad-apolice.model */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.model.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _cad_apolice_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../cad-apolice.service */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.service.ts");
/* harmony import */ var _cad_apolice_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../cad-apolice.constants */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.constants.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};











var CadApoliceIndexComponent = /** @class */ (function (_super) {
    __extends(CadApoliceIndexComponent, _super);
    function CadApoliceIndexComponent(router, cadApoliceService, datatablesService, messageService, funcoesService, permissoesUtils) {
        var _this = _super.call(this, _cad_apolice_constants__WEBPACK_IMPORTED_MODULE_9__["CadApoliceConstants"], funcoesService) || this;
        _this.router = router;
        _this.cadApoliceService = cadApoliceService;
        _this.datatablesService = datatablesService;
        _this.messageService = messageService;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.data = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["CadApolice"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.constantes = new _cad_apolice_constants__WEBPACK_IMPORTED_MODULE_9__["CadApoliceConstants"]();
        _this.mensagens = [];
        _this.duplicate = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 1, function () {
                var object = {
                    cadApoliceId: _this.data.cadApoliceId,
                    nrApolice: _this.data.nrApolice,
                };
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_10__["EventEmitterService"].get('emitterDuplicaApolice').emit(object);
            });
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    CadApoliceIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            _this.refresh();
        }, function () {
            _this.permissoesUtils.back();
        }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'duplicate', func: function () { return _this.duplicate; } }
        ]);
    };
    CadApoliceIndexComponent.prototype.refresh = function () {
        var _this = this;
        var columns = [
            this.datatablesService.getDataString('cadApoliceId', 'controle', '15%'),
            this.datatablesService.getDataString('nrApolice', 'numApolice', '15%'),
            this.datatablesService.getDataString('fornecedor.fantasia', 'fornecedor'),
        ];
        this.cadApoliceService.get().subscribe(function (resp) {
            _this.dados = resp;
            _this.datatablesService.datatable("dtCadApolice", columns, resp, function (aData) {
                _this.data = aData;
            });
        });
    };
    CadApoliceIndexComponent.prototype.create = function () {
        this.router.navigate([this.target + "/cadastro/cadApolice/create"]);
    };
    CadApoliceIndexComponent.prototype.edit = function () {
        if (!!(this.data.cadApoliceId)) {
            this.router.navigate([this.target + "/cadastro/cadApolice/edit/" + this.data.cadApoliceId]);
        }
    };
    CadApoliceIndexComponent.prototype.detail = function () {
        if (!!(btoa(this.data.cadApoliceId))) {
            this.router.navigate([this.target + "/cadastro/cadApolice/detail/" + this.data.cadApoliceId]);
        }
    };
    CadApoliceIndexComponent.prototype.remove = function () {
        var _this = this;
        if (!!(this.data.cadApoliceId)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
                _this.messageService.removeConfirm(function () {
                    _this.cadApoliceService.remove(_this.data).subscribe(function (result) {
                        _this.mensagens = _this.messageService.validationResult(result.validationResult);
                        if (result.validationResult && !result.validationResult.isValid) {
                            _this.messageService.warning("titles.dtCadApolice", _this.mensagens[0]);
                        }
                        else {
                            _this.datatablesService.remove("dtCadApolice");
                        }
                    });
                });
            });
        }
    };
    CadApoliceIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function () {
            _super.prototype.properties.call(_this, _this.data);
        });
    };
    CadApoliceIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    CadApoliceIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"] },
        { type: _cad_apolice_service__WEBPACK_IMPORTED_MODULE_8__["CadApoliceService"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__["DatatablesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] }
    ]; };
    CadApoliceIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-cad-apolice-index',
            template: __importDefault(__webpack_require__(/*! raw-loader!./cad-apolice-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/cad-apolice-index/cad-apolice-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"],
            _cad_apolice_service__WEBPACK_IMPORTED_MODULE_8__["CadApoliceService"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_5__["DatatablesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"]])
    ], CadApoliceIndexComponent);
    return CadApoliceIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_7__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/cad-apolice/cad-apolice.constants.ts":
/*!*********************************************************************!*\
  !*** ./src/app/pages/cadastro/cad-apolice/cad-apolice.constants.ts ***!
  \*********************************************************************/
/*! exports provided: CadApoliceConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadApoliceConstants", function() { return CadApoliceConstants; });
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../config/enumerables */ "./src/app/config/enumerables.ts");
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

var CadApoliceConstants = /** @class */ (function () {
    function CadApoliceConstants() {
        this.sisFormularioId = 90119;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.inclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.exclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.propriedades" },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "CAD";
        this.nomeForm = "titles.cadastroApolices";
        this.reportId = "CAD0204";
        this.reportTitulo = { "titulo": "Cadastro de Apólices", "subTitulo": "" };
        this.listaIndex = [
            { title: 'Novo', action: 'create', icon: "icon-plus", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Visualizar', action: 'detail', icon: "icon-eye", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Excluir', action: 'remove', icon: "icon-close", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: 'print', icon: "icon-printer", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Propriedade', action: 'properties', icon: "icon-menu", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Duplicate', action: 'duplicate', icon: "fa fa-clone", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
        ];
        this.listaForm = [
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
    }
    CadApoliceConstants.prototype.getLibRotina = function (actionForm) {
        var lista = [
            { id: _config_enumerables__WEBPACK_IMPORTED_MODULE_0__["ActionForm"].create, descricao: "1" },
            { id: _config_enumerables__WEBPACK_IMPORTED_MODULE_0__["ActionForm"].edit, descricao: "2" },
            { id: _config_enumerables__WEBPACK_IMPORTED_MODULE_0__["ActionForm"].detail, descricao: "4" },
            { id: 4, descricao: "8" }
        ];
        var i = lista.findIndex(function (x) { return x.id === actionForm; });
        return lista[i].descricao;
    };
    return CadApoliceConstants;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/cad-apolice/cad-apolice.model.ts":
/*!*****************************************************************!*\
  !*** ./src/app/pages/cadastro/cad-apolice/cad-apolice.model.ts ***!
  \*****************************************************************/
/*! exports provided: CadApolice, ItemApolice, ApolicePorTanque */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadApolice", function() { return CadApolice; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ItemApolice", function() { return ItemApolice; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApolicePorTanque", function() { return ApolicePorTanque; });
/* harmony import */ var _shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

var CadApolice = /** @class */ (function (_super) {
    __extends(CadApolice, _super);
    function CadApolice() {
        var _this = _super.call(this) || this;
        _this.itemApolices = [];
        return _this;
    }
    return CadApolice;
}(_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var ItemApolice = /** @class */ (function (_super) {
    __extends(ItemApolice, _super);
    function ItemApolice() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.apoliceporTanques = [];
        return _this;
    }
    return ItemApolice;
}(_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var ApolicePorTanque = /** @class */ (function (_super) {
    __extends(ApolicePorTanque, _super);
    function ApolicePorTanque() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return ApolicePorTanque;
}(_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));



/***/ }),

/***/ "./src/app/pages/cadastro/cad-apolice/cad-apolice.module.ts":
/*!******************************************************************!*\
  !*** ./src/app/pages/cadastro/cad-apolice/cad-apolice.module.ts ***!
  \******************************************************************/
/*! exports provided: CadApoliceModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadApoliceModule", function() { return CadApoliceModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _cad_apolice_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cad-apolice.service */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.service.ts");
/* harmony import */ var _cad_apolice_routing_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cad-apolice.routing.module */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.routing.module.ts");
/* harmony import */ var _cad_apolice_index_cad_apolice_index_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cad-apolice-index/cad-apolice-index.component */ "./src/app/pages/cadastro/cad-apolice/cad-apolice-index/cad-apolice-index.component.ts");
/* harmony import */ var _cad_apolice_form_cad_apolice_form_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cad-apolice-form/cad-apolice-form.component */ "./src/app/pages/cadastro/cad-apolice/cad-apolice-form/cad-apolice-form.component.ts");
/* harmony import */ var _item_apolice_form_item_apolice_form_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./item-apolice-form/item-apolice-form.component */ "./src/app/pages/cadastro/cad-apolice/item-apolice-form/item-apolice-form.component.ts");
/* harmony import */ var _apolice_por_tanque_form_apolice_por_tanque_form_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./apolice-por-tanque-form/apolice-por-tanque-form.component */ "./src/app/pages/cadastro/cad-apolice/apolice-por-tanque-form/apolice-por-tanque-form.component.ts");
/* harmony import */ var _cad_apolice_duplicate_cad_apolice_duplicate_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./cad-apolice-duplicate/cad-apolice-duplicate.component */ "./src/app/pages/cadastro/cad-apolice/cad-apolice-duplicate/cad-apolice-duplicate.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};









var CadApoliceModule = /** @class */ (function () {
    function CadApoliceModule() {
    }
    CadApoliceModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [
                _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"],
                _cad_apolice_routing_module__WEBPACK_IMPORTED_MODULE_3__["CadApoliceRoutingModule"]
            ],
            declarations: [_cad_apolice_index_cad_apolice_index_component__WEBPACK_IMPORTED_MODULE_4__["CadApoliceIndexComponent"], _cad_apolice_form_cad_apolice_form_component__WEBPACK_IMPORTED_MODULE_5__["CadApoliceFormComponent"], _item_apolice_form_item_apolice_form_component__WEBPACK_IMPORTED_MODULE_6__["ItemApoliceFormComponent"], _apolice_por_tanque_form_apolice_por_tanque_form_component__WEBPACK_IMPORTED_MODULE_7__["ApolicePorTanqueFormComponent"], _cad_apolice_duplicate_cad_apolice_duplicate_component__WEBPACK_IMPORTED_MODULE_8__["CadApoliceDuplicateComponent"]],
            exports: [],
            providers: [_cad_apolice_service__WEBPACK_IMPORTED_MODULE_2__["CadApoliceService"]]
        })
    ], CadApoliceModule);
    return CadApoliceModule;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/cad-apolice/cad-apolice.routing.module.ts":
/*!**************************************************************************!*\
  !*** ./src/app/pages/cadastro/cad-apolice/cad-apolice.routing.module.ts ***!
  \**************************************************************************/
/*! exports provided: CadApoliceRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadApoliceRoutingModule", function() { return CadApoliceRoutingModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _cad_apolice_index_cad_apolice_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cad-apolice-index/cad-apolice-index.component */ "./src/app/pages/cadastro/cad-apolice/cad-apolice-index/cad-apolice-index.component.ts");
/* harmony import */ var _cad_apolice_form_cad_apolice_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cad-apolice-form/cad-apolice-form.component */ "./src/app/pages/cadastro/cad-apolice/cad-apolice-form/cad-apolice-form.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};





var MRoutes = [
    {
        path: "",
        component: _cad_apolice_index_cad_apolice_index_component__WEBPACK_IMPORTED_MODULE_3__["CadApoliceIndexComponent"],
        data: { breadcrumb: "cadastroApolices", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    },
    {
        path: "create",
        component: _cad_apolice_form_cad_apolice_form_component__WEBPACK_IMPORTED_MODULE_4__["CadApoliceFormComponent"],
        data: {
            breadcrumb: "cadastroApolices",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create }
        }
    },
    {
        path: "edit/:id",
        component: _cad_apolice_form_cad_apolice_form_component__WEBPACK_IMPORTED_MODULE_4__["CadApoliceFormComponent"],
        data: {
            breadcrumb: "cadastroApolices",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    },
    {
        path: "detail/:id",
        component: _cad_apolice_form_cad_apolice_form_component__WEBPACK_IMPORTED_MODULE_4__["CadApoliceFormComponent"],
        data: {
            breadcrumb: "cadastroApolices",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    }
];
var CadApoliceRoutingModule = /** @class */ (function () {
    function CadApoliceRoutingModule() {
    }
    CadApoliceRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(MRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], CadApoliceRoutingModule);
    return CadApoliceRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/cad-apolice/cad-apolice.service.ts":
/*!*******************************************************************!*\
  !*** ./src/app/pages/cadastro/cad-apolice/cad-apolice.service.ts ***!
  \*******************************************************************/
/*! exports provided: CadApoliceService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadApoliceService", function() { return CadApoliceService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};



var CadApoliceService = /** @class */ (function (_super) {
    __extends(CadApoliceService, _super);
    function CadApoliceService(http) {
        return _super.call(this, http, "cadastros/cadApolice") || this;
    }
    CadApoliceService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"] }
    ]; };
    CadApoliceService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]])
    ], CadApoliceService);
    return CadApoliceService;
}(_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_2__["BaseService"]));



/***/ }),

/***/ "./src/app/pages/cadastro/cad-apolice/item-apolice-form/item-apolice-form.component.ts":
/*!*********************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cad-apolice/item-apolice-form/item-apolice-form.component.ts ***!
  \*********************************************************************************************/
/*! exports provided: ItemApoliceFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ItemApoliceFormComponent", function() { return ItemApoliceFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cad-apolice.model */ "./src/app/pages/cadastro/cad-apolice/cad-apolice.model.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};


var ItemApoliceFormComponent = /** @class */ (function () {
    function ItemApoliceFormComponent() {
        this.response = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.selectedItemApolice = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    ItemApoliceFormComponent.prototype.ngOnInit = function () {
    };
    ItemApoliceFormComponent.prototype.onSubmit = function (form) {
        if (!form.invalid) {
            jQuery('div#iten-form').modal("hide");
            this.response.emit(this.item);
            this.item = new _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ItemApolice"]();
        }
    };
    ItemApoliceFormComponent.prototype.selected = function (item, index) {
        this.item = item;
        this._index = index;
        this.selectedItemApolice.emit(this.item);
    };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], ItemApoliceFormComponent.prototype, "data", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _cad_apolice_model__WEBPACK_IMPORTED_MODULE_1__["ItemApolice"])
    ], ItemApoliceFormComponent.prototype, "item", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Boolean)
    ], ItemApoliceFormComponent.prototype, "showTableApoliceItem", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Boolean)
    ], ItemApoliceFormComponent.prototype, "showDetailApoliceItem", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Boolean)
    ], ItemApoliceFormComponent.prototype, "emptyItemApolice", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ItemApoliceFormComponent.prototype, "response", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ItemApoliceFormComponent.prototype, "selectedItemApolice", void 0);
    ItemApoliceFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-item-apolice-form',
            template: __importDefault(__webpack_require__(/*! raw-loader!./item-apolice-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cad-apolice/item-apolice-form/item-apolice-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [])
    ], ItemApoliceFormComponent);
    return ItemApoliceFormComponent;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-cadastro-cad-apolice-cad-apolice-module.js.map