webpackJsonp([6],{

/***/ 1476:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationPageModule", function() { return LocationPageModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__location_page__ = __webpack_require__(1573);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__component_common_module__ = __webpack_require__(989);
var __decorate = (this && this.__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 LocationPageModule = /** @class */ (function () {
    function LocationPageModule() {
    }
    LocationPageModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["NgModule"])({
            declarations: [__WEBPACK_IMPORTED_MODULE_2__location_page__["a" /* StoreLocationPage */]],
            imports: [__WEBPACK_IMPORTED_MODULE_0_ionic_angular__["j" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__location_page__["a" /* StoreLocationPage */]), __WEBPACK_IMPORTED_MODULE_4__component_common_module__["a" /* StoreComponentsModule */], __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */]],
            exports: [__WEBPACK_IMPORTED_MODULE_2__location_page__["a" /* StoreLocationPage */]]
        })
    ], LocationPageModule);
    return LocationPageModule;
}());

//# sourceMappingURL=location-page.module.js.map

/***/ }),

/***/ 1570:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LocationDataModel; });
/* unused harmony export Label */
var LocationDataModel = /** @class */ (function () {
    function LocationDataModel(obj) {
        this.title = obj && obj.title;
        if (obj && obj.labels) {
            this.setLabels(obj.labels);
        }
    }
    LocationDataModel.prototype.setLabels = function (labels) {
        var converted = [];
        labels.forEach(function (label) {
            converted.push(new Label(label));
        });
        this.labels = converted;
    };
    return LocationDataModel;
}());

var Label = /** @class */ (function () {
    function Label(obj) {
        this.type = obj && obj.type;
        this.display_name = obj && obj.display_name;
        this.editable = obj && obj.editable;
        this.remove_available = obj && obj.remove_available;
        this.label_name = obj && obj.label_name;
    }
    return Label;
}());

//# sourceMappingURL=location-data-model.js.map

/***/ }),

/***/ 1573:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StoreLocationPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__models_location_data_model__ = __webpack_require__(1570);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_ngx_logger__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__location_page_template__ = __webpack_require__(1574);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__providers_store_event_service__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__providers_store_data_service__ = __webpack_require__(990);
var __decorate = (this && this.__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 = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};








var StoreLocationPage = /** @class */ (function () {
    function StoreLocationPage(navControl, navParams, logger, appState, dataService) {
        this.navControl = navControl;
        this.navParams = navParams;
        this.logger = logger;
        this.appState = appState;
        this.dataService = dataService;
    }
    StoreLocationPage.prototype.ionViewDidLoad = function () {
        this.config = new __WEBPACK_IMPORTED_MODULE_2__models_location_data_model__["a" /* LocationDataModel */](this.navParams.data.conf);
        this.data = this.navParams.data.data;
        var conf = this.navParams.data.conf;
        this.configurePage(conf);
    };
    StoreLocationPage.prototype.saveLocation = function () {
        this.dataService.addTag(this.data);
        this.navControl.pop();
        this.appState.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_5__providers_store_event_service__["a" /* StoreEvent */].SKUTransaction + '_' + this.sku_type, this.data);
    };
    StoreLocationPage.prototype.cancel = function () {
        // this.navProvider.exitToRoot(null);
        this.navControl.pop();
        // this.appState.notifyDataChanged('save:data', this.data);
    };
    StoreLocationPage.prototype.configurePage = function (value) {
        if (value) {
            this.title = value.title;
            this.sub_title = value.sub_title;
            this.sku_type = this.dataService.skuType;
            this.labels = value.labels;
            this.addFields();
        }
    };
    StoreLocationPage.prototype.addFields = function () {
        var _this = this;
        this.labels.forEach(function (label) {
            if (!_this.data.hasOwnProperty(label['label_name'])) {
                _this.data[label['label_name']] = '';
            }
        });
    };
    StoreLocationPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["i" /* IonicPage */])(),
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'location-page',
            template: __WEBPACK_IMPORTED_MODULE_4__location_page_template__["a" /* LOCATION_PAGE_HTML */]
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["o" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */],
            __WEBPACK_IMPORTED_MODULE_3_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist__["e" /* ApplicationService */],
            __WEBPACK_IMPORTED_MODULE_7__providers_store_data_service__["a" /* StoreDataService */]])
    ], StoreLocationPage);
    return StoreLocationPage;
}());

//# sourceMappingURL=location-page.js.map

/***/ }),

/***/ 1574:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LOCATION_PAGE_HTML; });
/**
 * Created by nisitha athukoarala on 5/3/18.
 */
var LOCATION_PAGE_HTML = "\n<ion-header class=\"store-menubar-header\">\n<common-main-header [title]=\"title\"></common-main-header>\n</ion-header>\n<ion-content class=\"main-content\">\n    <div class=\"grid-wrapper\">\n        <ion-grid *ngIf=\"config\" class=\"main-grid\">\n            <ion-row class=\"height-100\">\n                <ion-col class=\"img-box height-100\" col-4>\n                    <ion-row class=\"img-box-row\"></ion-row>\n                    <ion-row class=\"img-box-row\">\n                        <ion-col></ion-col>\n                        <ion-img class=\"location-img\" src=\"assets/img/location.png\"></ion-img>\n                        <ion-col></ion-col>\n                        <ion-col></ion-col>\n                    </ion-row>\n                    <ion-row class=\"img-box-row\">\n                    <ion-label class=\"img-box-text\" *ngIf=\"sub_title\">{{sub_title}}</ion-label></ion-row>\n                    <ion-row class=\"img-box-row\"></ion-row>\n                </ion-col>\n                <ion-col col-8 class=\"from-container\">\n                <ion-row class=\"form-loc-row content-hide\"></ion-row>\n                    <ion-row class=\"form-loc-row\">\n                        <ion-col col-11 col-md-11 col-lg-8>\n                            <ion-row class=\"sku-row\" *ngFor=\"let d of labels\">\n                                <ion-col col-6 col-md-5 col-lg-4 class=\"sku-col\">\n                                    <ion-label class=\"form-label-ctm\">{{d.display_name}}</ion-label>\n                                </ion-col>\n                                <ion-col col-6 col-md-7 col-lg-8>\n                                    <ion-input class=\"form-filed\"\n                                     value=\"{{data.tag_details[d.label_name]}}\" [(ngModel)]=\"data.tag_details[d.label_name]\"\n                                               [readonly]=\"(!d.editable)\" placeholder=\"{{d.display_name}}\"></ion-input>\n                                </ion-col>\n                            </ion-row>\n                            <ion-row>\n                                <ion-col col-2 col-md-3 col-lg-6></ion-col>\n                                <ion-col class=\"btn-container\">\n                                    <button ion-button class=\"cancel-btn\" (click)=\"cancel()\">Cancel</button>\n                                    <button ion-button class=\"done-btn\" (click)=\"saveLocation()\">Done</button>\n                                </ion-col>\n                            </ion-row>\n                        </ion-col>\n                        <ion-col col-1 col-md-1 col-lg-4></ion-col>\n                    </ion-row>\n                    <ion-row class=\"form-loc-row\"></ion-row>\n                </ion-col>\n            </ion-row>\n        </ion-grid>\n    </div>\n</ion-content>";
//# sourceMappingURL=location-page-template.js.map

/***/ })

});
//# sourceMappingURL=6.js.map