(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["modules-people-people-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/modules/people/components/people-form/people-form.component.html":
/*!************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/people/components/people-form/people-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"] = ("<!--\r\n  ~ DAA Example\r\n  ~\r\n  ~ Copyright (C) 2019 - Miguel Reboiro-Jato.\r\n  ~\r\n  ~ This program is free software: you can redistribute it and/or modify\r\n  ~ it under the terms of the GNU General Public License as published by\r\n  ~ the Free Software Foundation, either version 3 of the License, or\r\n  ~ (at your option) any later version.\r\n  ~\r\n  ~ This program is distributed in the hope that it will be useful,\r\n  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n  ~ GNU General Public License for more details.\r\n  ~\r\n  ~ You should have received a copy of the GNU General Public License\r\n  ~ along with this program. If not, see <http://www.gnu.org/licenses/>.\r\n  -->\r\n\r\n<form id=\"people-form\" class=\"mb-5 mb-10\">\r\n  <input name=\"id\" type=\"hidden\" value=\"\"/>\r\n\r\n  <div class=\"row\">\r\n    <div class=\"col-sm-4\">\r\n      <input name=\"name\" type=\"text\" value=\"\" placeholder=\"Nombre\" class=\"form-control\" required [(ngModel)]=\"name\"/>\r\n    </div>\r\n\r\n    <div class=\"col-sm-5\">\r\n      <input name=\"surname\" type=\"text\" value=\"\" placeholder=\"Apellido\" class=\"form-control\" required\r\n             [(ngModel)]=\"surname\"/>\r\n    </div>\r\n\r\n    <div class=\"col-sm-3\">\r\n      <button id=\"btnSubmit\" class=\"btn btn-primary\"\r\n              (click)=\"onModify()\">{{person.id === undefined ? 'Crear' : 'Editar'}}</button>\r\n      <button id=\"btnClear\" class=\"btn\" (click)=\"onClean()\">Limpiar</button>\r\n    </div>\r\n  </div>\r\n</form>\r\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/modules/people/components/people-list/people-list.component.html":
/*!************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/people/components/people-list/people-list.component.html ***!
  \************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<!--\r\n  ~ DAA Example\r\n  ~\r\n  ~ Copyright (C) 2019 - Miguel Reboiro-Jato.\r\n  ~\r\n  ~ This program is free software: you can redistribute it and/or modify\r\n  ~ it under the terms of the GNU General Public License as published by\r\n  ~ the Free Software Foundation, either version 3 of the License, or\r\n  ~ (at your option) any later version.\r\n  ~\r\n  ~ This program is distributed in the hope that it will be useful,\r\n  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n  ~ GNU General Public License for more details.\r\n  ~\r\n  ~ You should have received a copy of the GNU General Public License\r\n  ~ along with this program. If not, see <http://www.gnu.org/licenses/>.\r\n  -->\r\n\r\n<table id=\"people-list\" class=\"table\">\r\n  <thead>\r\n  <tr class=\"row\">\r\n    <th class=\"col-sm-4\">Nombre</th>\r\n    <th class=\"col-sm-5\">Apellido</th>\r\n    <th class=\"col-sm-3\">&nbsp;</th>\r\n  </tr>\r\n  </thead>\r\n  <tbody>\r\n    <tr *ngFor=\"let person of people\" class=\"row\" id=\"person-{{person.id}}\">\r\n      <td class=\"col-sm-4 name\">{{person.name}}</td>\r\n      <td class=\"col-sm-5 surname\">{{person.surname}}</td>\r\n      <td class=\"col-sm-3\">\r\n        <button class=\"btn btn-primary edit\" (click)=\"onEdit(person)\">Edit</button>\r\n        <button class=\"btn btn-warning delete\" (click)=\"onDelete(person)\">Delete</button>\r\n      </td>\r\n    </tr>\r\n  </tbody>\r\n</table>\r\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/modules/people/components/people-main/people-main.component.html":
/*!************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/modules/people/components/people-main/people-main.component.html ***!
  \************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<!--\r\n  ~ DAA Example\r\n  ~\r\n  ~ Copyright (C) 2019 - Miguel Reboiro-Jato.\r\n  ~\r\n  ~ This program is free software: you can redistribute it and/or modify\r\n  ~ it under the terms of the GNU General Public License as published by\r\n  ~ the Free Software Foundation, either version 3 of the License, or\r\n  ~ (at your option) any later version.\r\n  ~\r\n  ~ This program is distributed in the hope that it will be useful,\r\n  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n  ~ GNU General Public License for more details.\r\n  ~\r\n  ~ You should have received a copy of the GNU General Public License\r\n  ~ along with this program. If not, see <http://www.gnu.org/licenses/>.\r\n  -->\r\n\r\n<h1 class=\"display-5 mt-3 mb-3\">Personas</h1>\r\n<app-people-form [person]=\"activePerson\" (clean)=\"onCleanForm()\" (modify)=\"onModifyForm($event)\"></app-people-form>\r\n<app-people-list [people]=\"people\" (edit)=\"onEdit($event)\" (delete)=\"onDelete($event)\"></app-people-list>\r\n");

/***/ }),

/***/ "./src/app/modules/people/components/people-form/people-form.component.scss":
/*!**********************************************************************************!*\
  !*** ./src/app/modules/people/components/people-form/people-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"] = ("/*!\n * DAA Example\n *\n * Copyright (C) 2019 - Miguel Reboiro-Jato.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvbW9kdWxlcy9wZW9wbGUvY29tcG9uZW50cy9wZW9wbGUtZm9ybS9DOlxcVXNlcnNcXE5vZWxpYVxcRGVza3RvcFxcREFBXFxkYWFleGFtcGxlXFxzcmNcXG1haW5cXGFuZ3VsYXIvc3JjXFxhcHBcXG1vZHVsZXNcXHBlb3BsZVxcY29tcG9uZW50c1xccGVvcGxlLWZvcm1cXHBlb3BsZS1mb3JtLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7OztFQUFBIiwiZmlsZSI6InNyYy9hcHAvbW9kdWxlcy9wZW9wbGUvY29tcG9uZW50cy9wZW9wbGUtZm9ybS9wZW9wbGUtZm9ybS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi8qIVxyXG4gKiBEQUEgRXhhbXBsZVxyXG4gKlxyXG4gKiBDb3B5cmlnaHQgKEMpIDIwMTkgLSBNaWd1ZWwgUmVib2lyby1KYXRvLlxyXG4gKlxyXG4gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeVxyXG4gKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieVxyXG4gKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZSBMaWNlbnNlLCBvclxyXG4gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLlxyXG4gKlxyXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCxcclxuICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2ZcclxuICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlXHJcbiAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuXHJcbiAqXHJcbiAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXHJcbiAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtLiBJZiBub3QsIHNlZSA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzLz4uXHJcbiAqL1xyXG5cclxuIl19 */");

/***/ }),

/***/ "./src/app/modules/people/components/people-form/people-form.component.ts":
/*!********************************************************************************!*\
  !*** ./src/app/modules/people/components/people-form/people-form.component.ts ***!
  \********************************************************************************/
/*! exports provided: PeopleFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PeopleFormComponent", function() { return PeopleFormComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm2015/core.js");
/* harmony import */ var _models_person_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../models/person.model */ "./src/app/modules/people/models/person.model.ts");
/*
 * DAA Example
 *
 * Copyright (C) 2019 - Miguel Reboiro-Jato.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */



let PeopleFormComponent = class PeopleFormComponent {
    constructor() {
        this.modify = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.clean = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
    }
    set person(person) {
        this.activePerson = person;
        this.name = person.name;
        this.surname = person.surname;
    }
    get person() {
        return this.activePerson;
    }
    onModify() {
        this.modify.emit({
            id: this.person.id,
            name: this.name,
            surname: this.surname
        });
    }
    onClean() {
        this.clean.emit();
    }
};
tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
    tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"])
], PeopleFormComponent.prototype, "modify", void 0);
tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
    tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"])
], PeopleFormComponent.prototype, "clean", void 0);
tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
    tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", _models_person_model__WEBPACK_IMPORTED_MODULE_2__["PersonModel"]),
    tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_models_person_model__WEBPACK_IMPORTED_MODULE_2__["PersonModel"]])
], PeopleFormComponent.prototype, "person", null);
PeopleFormComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-people-form',
        template: tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"](__webpack_require__(/*! raw-loader!./people-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/modules/people/components/people-form/people-form.component.html")).default,
        styles: [tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"](__webpack_require__(/*! ./people-form.component.scss */ "./src/app/modules/people/components/people-form/people-form.component.scss")).default]
    }),
    tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [])
], PeopleFormComponent);



/***/ }),

/***/ "./src/app/modules/people/components/people-list/people-list.component.scss":
/*!**********************************************************************************!*\
  !*** ./src/app/modules/people/components/people-list/people-list.component.scss ***!
  \**********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("/*!\n * DAA Example\n *\n * Copyright (C) 2019 - Miguel Reboiro-Jato.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvbW9kdWxlcy9wZW9wbGUvY29tcG9uZW50cy9wZW9wbGUtbGlzdC9DOlxcVXNlcnNcXE5vZWxpYVxcRGVza3RvcFxcREFBXFxkYWFleGFtcGxlXFxzcmNcXG1haW5cXGFuZ3VsYXIvc3JjXFxhcHBcXG1vZHVsZXNcXHBlb3BsZVxcY29tcG9uZW50c1xccGVvcGxlLWxpc3RcXHBlb3BsZS1saXN0LmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7OztFQUFBIiwiZmlsZSI6InNyYy9hcHAvbW9kdWxlcy9wZW9wbGUvY29tcG9uZW50cy9wZW9wbGUtbGlzdC9wZW9wbGUtbGlzdC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi8qIVxyXG4gKiBEQUEgRXhhbXBsZVxyXG4gKlxyXG4gKiBDb3B5cmlnaHQgKEMpIDIwMTkgLSBNaWd1ZWwgUmVib2lyby1KYXRvLlxyXG4gKlxyXG4gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeVxyXG4gKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieVxyXG4gKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZSBMaWNlbnNlLCBvclxyXG4gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLlxyXG4gKlxyXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCxcclxuICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2ZcclxuICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlXHJcbiAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuXHJcbiAqXHJcbiAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXHJcbiAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtLiBJZiBub3QsIHNlZSA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzLz4uXHJcbiAqL1xyXG5cclxuIl19 */");

/***/ }),

/***/ "./src/app/modules/people/components/people-list/people-list.component.ts":
/*!********************************************************************************!*\
  !*** ./src/app/modules/people/components/people-list/people-list.component.ts ***!
  \********************************************************************************/
/*! exports provided: PeopleListComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PeopleListComponent", function() { return PeopleListComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm2015/core.js");
/*
 * DAA Example
 *
 * Copyright (C) 2019 - Miguel Reboiro-Jato.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */


let PeopleListComponent = class PeopleListComponent {
    constructor() {
        this.people = [];
        this.edit = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.delete = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
    }
    onEdit(person) {
        this.edit.emit(person);
    }
    onDelete(person) {
        this.delete.emit(person);
    }
};
tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
    tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", Array)
], PeopleListComponent.prototype, "people", void 0);
tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
    tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"])
], PeopleListComponent.prototype, "edit", void 0);
tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
    tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"])
], PeopleListComponent.prototype, "delete", void 0);
PeopleListComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-people-list',
        template: tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"](__webpack_require__(/*! raw-loader!./people-list.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/modules/people/components/people-list/people-list.component.html")).default,
        styles: [tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"](__webpack_require__(/*! ./people-list.component.scss */ "./src/app/modules/people/components/people-list/people-list.component.scss")).default]
    }),
    tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [])
], PeopleListComponent);



/***/ }),

/***/ "./src/app/modules/people/components/people-main/people-main.component.scss":
/*!**********************************************************************************!*\
  !*** ./src/app/modules/people/components/people-main/people-main.component.scss ***!
  \**********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("/*!\n * DAA Example\n *\n * Copyright (C) 2019 - Miguel Reboiro-Jato.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvbW9kdWxlcy9wZW9wbGUvY29tcG9uZW50cy9wZW9wbGUtbWFpbi9DOlxcVXNlcnNcXE5vZWxpYVxcRGVza3RvcFxcREFBXFxkYWFleGFtcGxlXFxzcmNcXG1haW5cXGFuZ3VsYXIvc3JjXFxhcHBcXG1vZHVsZXNcXHBlb3BsZVxcY29tcG9uZW50c1xccGVvcGxlLW1haW5cXHBlb3BsZS1tYWluLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7OztFQUFBIiwiZmlsZSI6InNyYy9hcHAvbW9kdWxlcy9wZW9wbGUvY29tcG9uZW50cy9wZW9wbGUtbWFpbi9wZW9wbGUtbWFpbi5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi8qIVxyXG4gKiBEQUEgRXhhbXBsZVxyXG4gKlxyXG4gKiBDb3B5cmlnaHQgKEMpIDIwMTkgLSBNaWd1ZWwgUmVib2lyby1KYXRvLlxyXG4gKlxyXG4gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeVxyXG4gKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieVxyXG4gKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZSBMaWNlbnNlLCBvclxyXG4gKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLlxyXG4gKlxyXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCxcclxuICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2ZcclxuICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiBTZWUgdGhlXHJcbiAqIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuXHJcbiAqXHJcbiAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlXHJcbiAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtLiBJZiBub3QsIHNlZSA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzLz4uXHJcbiAqL1xyXG5cclxuIl19 */");

/***/ }),

/***/ "./src/app/modules/people/components/people-main/people-main.component.ts":
/*!********************************************************************************!*\
  !*** ./src/app/modules/people/components/people-main/people-main.component.ts ***!
  \********************************************************************************/
/*! exports provided: PeopleMainComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PeopleMainComponent", function() { return PeopleMainComponent; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm2015/core.js");
/* harmony import */ var _services_people_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../services/people.service */ "./src/app/modules/people/services/people.service.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
/*
 * DAA Example
 *
 * Copyright (C) 2019 - Miguel Reboiro-Jato.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */




let PeopleMainComponent = class PeopleMainComponent {
    constructor(peopleService) {
        this.peopleService = peopleService;
        this.people = [];
        this.clearActivePerson();
    }
    ngOnInit() {
        this.peopleService.list()
            .subscribe(people => this.people = people);
    }
    onEdit(person) {
        this.activePerson = person;
    }
    onDelete(person) {
        if (confirm(`¿Estás seguro de que deseas eliminar a ${person.name} ${person.surname}?`)) {
            this.peopleService.delete(person)
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(() => this.peopleService.list()))
                .subscribe(people => this.people = people);
        }
    }
    onCleanForm() {
        this.clearActivePerson();
    }
    onModifyForm(person) {
        if (person.id === undefined) {
            this.peopleService.create(person)
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(() => this.peopleService.list()))
                .subscribe(people => {
                this.people = people;
                this.clearActivePerson();
            });
        }
        else {
            this.peopleService.modify(person)
                .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(() => this.peopleService.list()))
                .subscribe(people => {
                this.people = people;
                this.clearActivePerson();
            });
        }
    }
    clearActivePerson() {
        this.activePerson = { id: undefined, name: '', surname: '' };
    }
};
PeopleMainComponent.ctorParameters = () => [
    { type: _services_people_service__WEBPACK_IMPORTED_MODULE_2__["PeopleService"] }
];
PeopleMainComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-people-main',
        template: tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"](__webpack_require__(/*! raw-loader!./people-main.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/modules/people/components/people-main/people-main.component.html")).default,
        styles: [tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"](__webpack_require__(/*! ./people-main.component.scss */ "./src/app/modules/people/components/people-main/people-main.component.scss")).default]
    }),
    tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_services_people_service__WEBPACK_IMPORTED_MODULE_2__["PeopleService"]])
], PeopleMainComponent);



/***/ }),

/***/ "./src/app/modules/people/models/person.model.ts":
/*!*******************************************************!*\
  !*** ./src/app/modules/people/models/person.model.ts ***!
  \*******************************************************/
/*! exports provided: PersonModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PersonModel", function() { return PersonModel; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/*
 * DAA Example
 *
 * Copyright (C) 2019 - Miguel Reboiro-Jato.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

class PersonModel {
}


/***/ }),

/***/ "./src/app/modules/people/people-routing.module.ts":
/*!*********************************************************!*\
  !*** ./src/app/modules/people/people-routing.module.ts ***!
  \*********************************************************/
/*! exports provided: PeopleRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PeopleRoutingModule", function() { return PeopleRoutingModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm2015/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm2015/router.js");
/* harmony import */ var _components_people_main_people_main_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/people-main/people-main.component */ "./src/app/modules/people/components/people-main/people-main.component.ts");
/*
 * DAA Example
 *
 * Copyright (C) 2019 - Miguel Reboiro-Jato.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */




const routes = [
    {
        path: '',
        component: _components_people_main_people_main_component__WEBPACK_IMPORTED_MODULE_3__["PeopleMainComponent"]
    }
];
let PeopleRoutingModule = class PeopleRoutingModule {
};
PeopleRoutingModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        imports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"].forChild(routes)],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"]]
    })
], PeopleRoutingModule);



/***/ }),

/***/ "./src/app/modules/people/people.module.ts":
/*!*************************************************!*\
  !*** ./src/app/modules/people/people.module.ts ***!
  \*************************************************/
/*! exports provided: PeopleModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PeopleModule", function() { return PeopleModule; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm2015/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm2015/common.js");
/* harmony import */ var _people_routing_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./people-routing.module */ "./src/app/modules/people/people-routing.module.ts");
/* harmony import */ var _components_people_list_people_list_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/people-list/people-list.component */ "./src/app/modules/people/components/people-list/people-list.component.ts");
/* harmony import */ var _components_people_form_people_form_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/people-form/people-form.component */ "./src/app/modules/people/components/people-form/people-form.component.ts");
/* harmony import */ var _components_people_main_people_main_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/people-main/people-main.component */ "./src/app/modules/people/components/people-main/people-main.component.ts");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm2015/forms.js");
/*
 * DAA Example
 *
 * Copyright (C) 2019 - Miguel Reboiro-Jato.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */








let PeopleModule = class PeopleModule {
};
PeopleModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [
            _components_people_form_people_form_component__WEBPACK_IMPORTED_MODULE_5__["PeopleFormComponent"],
            _components_people_list_people_list_component__WEBPACK_IMPORTED_MODULE_4__["PeopleListComponent"],
            _components_people_main_people_main_component__WEBPACK_IMPORTED_MODULE_6__["PeopleMainComponent"]
        ],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_7__["FormsModule"],
            _people_routing_module__WEBPACK_IMPORTED_MODULE_3__["PeopleRoutingModule"]
        ]
    })
], PeopleModule);



/***/ }),

/***/ "./src/app/modules/people/services/people.service.ts":
/*!***********************************************************!*\
  !*** ./src/app/modules/people/services/people.service.ts ***!
  \***********************************************************/
/*! exports provided: PeopleService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PeopleService", function() { return PeopleService; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm2015/core.js");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm2015/http.js");
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
/*
 * DAA Example
 *
 * Copyright (C) 2019 - Miguel Reboiro-Jato.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */




let PeopleService = class PeopleService {
    constructor(http) {
        this.http = http;
    }
    list() {
        return this.http.get(`${_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].restApi}/people`);
    }
    create(person) {
        const data = new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpParams"]()
            .set('name', person.name)
            .set('surname', person.surname);
        return this.http.post(`${_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].restApi}/people`, data);
    }
    modify(person) {
        const data = new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpParams"]()
            .set('name', person.name)
            .set('surname', person.surname);
        return this.http.put(`${_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].restApi}/people/${person.id}`, data);
    }
    delete(person) {
        return this.http.delete(`${_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].restApi}/people/${person.id}`);
    }
};
PeopleService.ctorParameters = () => [
    { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"] }
];
PeopleService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
        providedIn: 'root'
    }),
    tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]])
], PeopleService);



/***/ })

}]);
//# sourceMappingURL=modules-people-people-module-es2015.js.map