(self["webpackChunkLearningchain"] = self["webpackChunkLearningchain"] || []).push([["src_app_pages_userprofile_userprofile_module_ts"],{

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "UserprofilePageRoutingModule": () => (/* binding */ UserprofilePageRoutingModule)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ 1855);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 2741);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ 9535);
/* harmony import */ var _userprofile_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./userprofile.page */ 6712);




const routes = [
    {
        path: '',
        component: _userprofile_page__WEBPACK_IMPORTED_MODULE_0__.UserprofilePage
    }
];
let UserprofilePageRoutingModule = class UserprofilePageRoutingModule {
};
UserprofilePageRoutingModule = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
    (0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.NgModule)({
        imports: [_angular_router__WEBPACK_IMPORTED_MODULE_3__.RouterModule.forChild(routes)],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_3__.RouterModule],
    })
], UserprofilePageRoutingModule);



/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "UserprofilePageModule": () => (/* binding */ UserprofilePageModule)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ 1855);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 2741);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ 6274);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ 3324);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ionic/angular */ 6820);
/* harmony import */ var _userprofile_routing_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./userprofile-routing.module */ 6699);
/* harmony import */ var _userprofile_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./userprofile.page */ 6712);







let UserprofilePageModule = class UserprofilePageModule {
};
UserprofilePageModule = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
    (0,_angular_core__WEBPACK_IMPORTED_MODULE_3__.NgModule)({
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_4__.CommonModule,
            _angular_forms__WEBPACK_IMPORTED_MODULE_5__.FormsModule,
            _ionic_angular__WEBPACK_IMPORTED_MODULE_6__.IonicModule,
            _userprofile_routing_module__WEBPACK_IMPORTED_MODULE_0__.UserprofilePageRoutingModule
        ],
        declarations: [_userprofile_page__WEBPACK_IMPORTED_MODULE_1__.UserprofilePage]
    })
], UserprofilePageModule);



/***/ }),

/***/ 6712:
/*!*******************************************************!*\
  !*** ./src/app/pages/userprofile/userprofile.page.ts ***!
  \*******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "UserprofilePage": () => (/* binding */ UserprofilePage)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ 1855);
/* harmony import */ var _raw_loader_userprofile_page_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !raw-loader!./userprofile.page.html */ 9058);
/* harmony import */ var _userprofile_page_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./userprofile.page.scss */ 3237);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/core */ 2741);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ionic/angular */ 6820);
/* harmony import */ var src_app_services_db_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/services/db.service */ 5185);
/* harmony import */ var _new_wallet_new_wallet_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../new-wallet/new-wallet.page */ 9324);
/* harmony import */ var _ionic_native_barcode_scanner_ngx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ionic-native/barcode-scanner/ngx */ 3370);
/* harmony import */ var src_app_services_common_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/services/common.service */ 6880);









let UserprofilePage = class UserprofilePage {
    constructor(modalCtrl, dbService, barcodeScanner, commonService) {
        this.modalCtrl = modalCtrl;
        this.dbService = dbService;
        this.barcodeScanner = barcodeScanner;
        this.commonService = commonService;
        this.row_data = [];
        this.username = '';
        this.status = '';
    }
    ngOnInit() {
    }
    ionViewDidEnter() {
        this.loginData = JSON.parse(localStorage.getItem("loginData"));
        this.username = this.loginData.FirstName;
        this.status = this.loginData.LastName;
        this.getRows();
    }
    scanBarcode() {
        const options = {
            preferFrontCamera: false,
            showFlipCameraButton: true,
            showTorchButton: true,
            torchOn: false,
            prompt: 'Place a barcode inside the scan area',
            resultDisplayDuration: 0,
            formats: 'EAN_13,EAN_8,QR_CODE,PDF_417 ',
            orientation: 'portrait'
        };
        this.barcodeScanner.scan(options).then(barcodeData => {
            console.log('Barcode data', barcodeData);
            this.scannedData = barcodeData;
            let index = this.scannedData.text.lastIndexOf('/');
            let walletId = this.scannedData.text.slice(index + 1, this.scannedData.text.length);
            this.newWallet(walletId);
        }).catch(err => {
            console.log('Error', err);
        });
    }
    newWallet(walletId) {
        return (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__awaiter)(this, void 0, void 0, function* () {
            const modalPage = yield this.modalCtrl.create({
                component: _new_wallet_new_wallet_page__WEBPACK_IMPORTED_MODULE_3__.NewWalletPage,
                cssClass: 'my-custom-modal-css',
                componentProps: { pageName: 'NewWalletPage', walletId: walletId }
            });
            yield modalPage.present();
            yield modalPage.onDidDismiss().then((dataReturned) => {
                this.getRows();
                console.log('called dismiss');
            });
        });
    }
    // Retrieve rows from table
    getRows() {
        this.dbService.databaseObj.executeSql('SELECT * FROM WalletList WHERE UserId = ?', [this.loginData.UserName])
            .then((res) => {
            this.row_data = [];
            if (res.rows.length > 0) {
                for (var i = 0; i < res.rows.length; i++) {
                    this.row_data.push(res.rows.item(i));
                }
            }
        })
            .catch(e => {
            this.commonService.showErrorShowToast("Something went wrong with fetching data");
        });
    }
};
UserprofilePage.ctorParameters = () => [
    { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_7__.ModalController },
    { type: src_app_services_db_service__WEBPACK_IMPORTED_MODULE_2__.DbService },
    { type: _ionic_native_barcode_scanner_ngx__WEBPACK_IMPORTED_MODULE_4__.BarcodeScanner },
    { type: src_app_services_common_service__WEBPACK_IMPORTED_MODULE_5__.CommonService }
];
UserprofilePage = (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
    (0,_angular_core__WEBPACK_IMPORTED_MODULE_8__.Component)({
        selector: 'app-userprofile',
        template: _raw_loader_userprofile_page_html__WEBPACK_IMPORTED_MODULE_0__.default,
        styles: [_userprofile_page_scss__WEBPACK_IMPORTED_MODULE_1__.default]
    })
], UserprofilePage);



/***/ }),

/***/ 3237:
/*!*********************************************************!*\
  !*** ./src/app/pages/userprofile/userprofile.page.scss ***!
  \*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (".blockchainlogo {\n  border-radius: 100%;\n  width: 70px;\n}\n\n.section {\n  height: 50px;\n  background-color: #f6f6f6;\n  width: 100%;\n  border-top: gray 1px solid;\n  border-bottom: gray 1px solid;\n  display: flex;\n}\n\n.walletsection {\n  height: 100%;\n  background-color: #f6f6f6;\n  width: 100%;\n  margin-left: 10px;\n  display: flex;\n  align-items: center;\n  margin-top: auto;\n  margin-bottom: auto;\n  float: left;\n}\n\n.circle {\n  float: right;\n  margin-right: 10px;\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  margin-top: auto;\n  margin-bottom: auto;\n  width: 32px;\n  height: 28px;\n}\n\n.disabled {\n  color: gray;\n  border: 1px solid gray;\n}\n\n.plus {\n  display: flex;\n  align-items: center;\n  margin-top: auto;\n  margin-bottom: auto;\n  margin-left: auto;\n  margin-right: auto;\n  font-size: 20px;\n  line-height: 16px;\n}\n\n.listsection {\n  font-size: 14px;\n}\n\n.headsection {\n  border: solid gray 1px;\n  border-top: white solid 0.8px;\n  text-align: center;\n  height: 38px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background: #408597;\n}\n\n.textsection {\n  border-left: solid gray 1px;\n  border-right: solid gray 1px;\n  border-bottom: solid gray 1px;\n  text-align: center;\n}\n\n.colborder {\n  border-right: solid 1px gray;\n  justify-content: center;\n  align-items: center;\n  display: flex;\n}\n\n.colwrap {\n  word-wrap: break-word;\n  justify-content: center;\n  align-items: center;\n  display: flex;\n  padding: 14px;\n}\n\n.section1 {\n  width: auto;\n  display: flex;\n  color: white;\n  font-weight: 600;\n  letter-spacing: 1px;\n  font-size: 18px;\n}\n\n.section2 {\n  display: flex;\n  height: inherit;\n  justify-content: center;\n  align-items: center;\n}\n\n.name {\n  color: white;\n  text-transform: capitalize;\n  margin-top: 10px;\n  margin-bottom: 5px;\n}\n\n.titlep {\n  font-size: 16px;\n  font-family: \"robotomedium\";\n}\n/*# sourceMappingURL=data:application/json;base64,  */");

/***/ }),

/***/ 9058:
/*!***********************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/userprofile/userprofile.page.html ***!
  \***********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<!-- <ion-header>\n        <ion-toolbar>\n                        <ion-buttons slot=\"start\">\n                               <ion-menu-button autoHide=\"false\"></ion-menu-button>\n                        </ion-buttons>\n                        <ion-title>User Profile</ion-title>\n        </ion-toolbar>\n</ion-header> -->\n\n<ion-content>\n  <div class=\"bg-class\">\n  <div class=\"section1\"> \n      <ion-buttons slot=\"start\">\n          <ion-menu-button autoHide=\"false\"></ion-menu-button>\n      </ion-buttons>\n      <div class=\"section2\">User Profile</div>\n </div>\n                      <div class=\"ion-text-center ion-padding\">\n\n                                      <img src=\"../assets/images/ProfilePic.png\" class=\"profileimg\"/>\n\n                                      <div class=\"name\">{{username}} {{status}}</div>\n\n                                      <!-- <div class=\"ion-padding\"> </div> -->\n\n                                      <!-- <ion-item lines=\"none\">\n                                            <ion-input type=\"text\" readonly class=\"inputbox\" placeholder=\"FirstName\"  [(ngModel)]=\"username\" ></ion-input>\n                                      </ion-item>\n\n                                      <ion-item lines=\"none\">\n                                            <ion-input type=\"text\" readonly class=\"inputbox\" placeholder=\"LastName\"  [(ngModel)]=\"status\" ></ion-input>\n                                      </ion-item>  commented for new design-->\n\n                                      <!-- <img src=\"../assets/images/polygon-matic-logo.png\" class=\"blockchainlogo mt10\"/>\n\n                                      <div class=\"title mb10\">BLockchain Address</div>\n\n                                      <a href=\"https://ind.backpack.education/olExplorer/explorer/dashboard/\">https://ind.backpack.education/olExplorer/explorer/dashboard/</a>\n\n                                      <div class=\"title mt10\"> App SSO Token</div>\n\n                                      <div>5C15BB11</div> -->\n\n                                      <!-- <ion-accordion-group>\n                                        <ion-accordion value=\"first\">\n                                          <ion-item slot=\"header\" color=\"light\">\n                                            <ion-label>Academic Strengths</ion-label>\n                                          </ion-item>\n                                          <div class=\"ion-padding\" slot=\"content\">\n                                            \n                                          </div>\n                                        </ion-accordion>\n                                        <ion-accordion value=\"second\">\n                                          <ion-item slot=\"header\" color=\"light\">\n                                            <ion-label>Study Time</ion-label>\n                                          </ion-item>\n                                          <div class=\"ion-padding\" slot=\"content\">\n                                            \n                                          </div>\n                                        </ion-accordion>\n                                        <ion-accordion value=\"third\">\n                                          <ion-item slot=\"header\" color=\"light\">\n                                            <ion-label>Ownership Spirit</ion-label>\n                                          </ion-item>\n                                          <div class=\"ion-padding\" slot=\"content\">\n                                         \n                                          </div>\n                                        </ion-accordion>\n                                      </ion-accordion-group> -->\n\n                      </div>\n                    </div>   \n\n                      <!-- <div class=\"section title\"> commented for new design\n\n                                      <div class=\"walletsection title\"> Wallets</div> -->\n                                      <!-- <div class=\"circle title\" (click)=\"scanBarcode()\"><div class=\"plus\"> + </div> </div> -->\n                                      <!-- <div class=\"circle title disabled\"><div class=\"plus\"> + </div> </div>\n                      </div>  commented for new design-->\n\n                      <div class=\"listsection\">\n\n                              <ion-row class=\"headsection\">\n                                          <ion-col class=\"colborder\" size = '6'>\n                                              <div class=\"titlep fontwhite dinblck\"> Wallet ID </div>\n                                          </ion-col>\n                                          <ion-col  size = '6'>\n                                              <div class=\"titlep fontwhite dinblck\"> Wallet Name </div>\n                                          </ion-col>\n                              </ion-row>\n\n                              <ion-row class=\"textsection\" *ngFor=\"let wallet of row_data; let i = index\"  [ngClass]=\"(i+1) % 2 === 0 ? 'bgcell' : '' \">\n                                          <ion-col class=\"colborder colwrap\" size = '6'>\n                                               <div class=\"dinblck\"> {{ wallet.WalletId }} </div>\n                                          </ion-col>\n                                          <ion-col size = '6' class=\"colwrap\">\n                                               <div class=\" dinblck\"> {{ wallet.WalletName}} </div>\n                                          </ion-col>\n                              </ion-row>\n\n                      </div>\n</ion-content>\n");

/***/ })

}]);
//# sourceMappingURL=src_app_pages_userprofile_userprofile_module_ts.js.map