(function () {
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }

  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

  (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vehicle-list-vehicle-list-module"], {
    /***/
    "2yrg":
    /*!*******************************************************************************************!*\
      !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/vehicle-list/vehicle-list.page.html ***!
      \*******************************************************************************************/

    /*! exports provided: default */

    /***/
    function yrg(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony default export */


      __webpack_exports__["default"] = "<ion-header>\r\n\t<ion-toolbar>\r\n\t\t<ion-buttons slot=\"start\" class=\"on-search-hide\" *ngIf=\"!showSearchBar \">\r\n\t\t\t<ion-menu-button></ion-menu-button>\r\n\t\t</ion-buttons>\r\n\t\t<ion-title>\r\n\t\t\t<span class=\"d-flex\">\r\n\t\t\t\t<span *ngIf=\"!showSearchBar\" class=\"on-search-hide\">{{'vehicle_list' | translate}}\r\n\t\t\t\t</span>\r\n\t\t\t\t<span class=\"search-opt\">\r\n\t\t\t\t\t<ion-icon *ngIf=\"!showSearchBar\" slot=\"end\" name=\"search\" (click)=\"showSearch()\">\r\n\t\t\t\t\t</ion-icon>\r\n\t\t\t\t\t<ion-searchbar *ngIf=\"showSearchBar\" placeholder=\"Search items\" showCancelButton=\"always\"\r\n\t\t\t\t\t\tdeopenChatbounce=500 [(ngModel)]=\"searchTerm\" (ionCancel)=\"showSearch()\"></ion-searchbar>\r\n\t\t\t\t\t<!-- <ion-icon name=\"funnel\" (click)=\"openModel()\" *ngIf=\"!showSearchBar\" class=\"on-search-hide\">\r\n\t\t\t\t\t</ion-icon> -->\r\n\t\t\t\t</span>\r\n\t\t\t</span>\r\n\t\t</ion-title>\r\n\t</ion-toolbar>\r\n</ion-header>\r\n\r\n<ion-content fullscreen class=\"\" [scrollEvents]=\"true\" (ionScroll)=\"getScrollPos($event.detail.scrollTop)\">\r\n\t<div class=\"main_container active\">\r\n\t\t<ion-list lines=\"none\">\r\n\t\t\t<ion-grid>\r\n\t\t\t\t<ion-row>\r\n\t\t\t\t\t<ion-col class=\"top-label\" size=\"8\">\r\n\t\t\t\t\t\t<ion-label>Vehicle list last updated on {{vehicleUpdateTime | formatDate:'short' }}\r\n\t\t\t\t\t\t\t{{vehicleUpdateTime | formatDate:'time' }}</ion-label>\r\n\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t<ion-col size=\"2\" class=\"end\">\r\n\t\t\t\t\t\t<ion-icon class=\"refresh\" name=\"refresh-outline\" (click)=\"reload()\"></ion-icon>\t\t\t\t\t\t\r\n\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t<ion-col size=\"2\" class=\"end\">\t\t\t\t\t\r\n\t\t\t\t\t\t<ion-icon class=\"refresh\" name=\"add-circle-outline\" (click)=\"vehicleAdd()\"></ion-icon>\r\n\t\t\t\t\t</ion-col>\r\n\r\n\t\t\t\t</ion-row>\r\n\t\t\t</ion-grid>\r\n\t\t\t<ion-item-sliding>\r\n\t\t\t\t<ion-item *ngFor=\"let list of lists| keyvalue |filter:searchTerm; let i = index\">\r\n\t\t\t\t\t<div class=\"item_inner\">\r\n\t\t\t\t\t\t<div class=\"item_header d-flex\">\r\n\t\t\t\t\t\t\t<!-- <ion-icon class=\"zmdi zmdi-{{list?.value?.type}} start ion-text-start\"></ion-icon> -->\r\n\t\t\t\t\t\t\t<ion-icon slot=\"start\" name=\"car-outline\" class=\"start ion-text-start\"></ion-icon>\r\n\t\t\t\t\t\t\t<h2 class=\"d-flex\">\r\n\t\t\t\t\t\t\t\t{{list?.value?.vrn}}\r\n\t\t\t\t\t\t\t\t<!-- <sub> SCANIA R730</sub> class=\"toggle-icon\" -->\r\n\t\t\t\t\t\t\t\t\t<span *ngIf = \"list?.value?.tag_id != null\" class=\"end\" [ngClass]=\"{'red':list?.value?.tag_status == 'Suspend',\r\n\t\t\t\t\t\t\t\t'green':list?.value?.tag_status == 'Active',\r\n\t\t\t\t\t\t\t\t'amber':list?.value?.tag_status == 'Low Balance',\r\n\t\t\t\t\t\t\t\t'black':list?.value?.tag_status == 'Black List'}\"\r\n\t\t\t\t\t\t\t\t\t(click)=\"list.open = !list.open\">{{list?.value?.tag_status}}</span>\r\n\t\t\t\t\t\t\t\t\t<span *ngIf = \"list?.value?.tag_id == null\" class=\"end\" [ngClass]=\"{'red':list?.value?.tag_status == 'Suspend',\r\n\t\t\t\t\t\t\t\t\t'green':list?.value?.tag_status == 'Low Balance',\r\n\t\t\t\t\t\t\t\t\t'amber':list?.value?.tag_status == 'Active',\r\n\t\t\t\t\t\t\t\t\t'black':list?.value?.tag_status == 'Active'}\"\r\n\t\t\t\t\t\t\t\t\t\t(click)=\"list.open = !list.open\">Pending</span>\r\n\t\t\t\t\t\t\t</h2>\r\n\t\t\t\t\t\t\t<span (click)=\"list.open = !list.open\">\r\n\t\t\t\t\t\t\t\t<ion-icon *ngIf=\"!list.open\" name=\"chevron-down-outline\"></ion-icon>\r\n\t\t\t\t\t\t\t\t<ion-icon *ngIf=\"list.open\" name=\"chevron-up-outline\"></ion-icon>\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"item_containt\">\r\n\t\t\t\t\t\t\t<!-- {{list.tagStatus}} -->\r\n\t\t\t\t\t\t\t<ion-row>\r\n\t\t\t\t\t\t\t\t<ion-col size=\"9\">\r\n\t\t\t\t\t\t\t\t\t<h3>Barcode</h3>\r\n\t\t\t\t\t\t\t\t\t<h4>{{list?.value?.barcode}}<ion-icon *ngIf=\"list?.value?.barcode !== null\" class=\"copy-icon\" name=\"copy-outline\"\r\n\t\t\t\t\t\t\t\t\t\t(click)=\"copyText(list)\"></ion-icon></h4>\r\n\t\t\t\t\t\t\t\t\t<h4 *ngIf=\"list?.value?.barcode == null\">NA</h4>\r\n\t\t\t\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t\t\t\t<ion-col size=\"3\" (click)=\"list.open = !list.open\">\r\n\t\t\t\t\t\t\t\t\t<h3>Tag Class</h3>\r\n\t\t\t\t\t\t\t\t\t<h4>{{list?.value?.tag_class}}</h4>\r\n\t\t\t\t\t\t\t\t\t<h4 *ngIf=\"list?.value?.tag_class == null\">NA</h4>\r\n\t\t\t\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t\t\t</ion-row>\r\n\t\t\t\t\t\t\t<div [hidden]=\"!list.open\">\r\n\t\t\t\t\t\t\t\t<ion-row>\r\n\t\t\t\t\t\t\t\t\t<ion-col size=\"6\">\r\n\t\t\t\t\t\t\t\t\t\t<h3>Tag ID</h3>\r\n\t\t\t\t\t\t\t\t\t\t<h4 >{{list?.value?.tag_id}}</h4>\r\n\t\t\t\t\t\t\t\t\t\t<h4 *ngIf=\"list?.value?.tag_id == null\">NA</h4>\r\n\t\t\t\t\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t\t\t\t\t<ion-col class=\"action-button\" size=\"2\">\r\n\t\t\t\t\t\t\t\t\t\t<ion-icon (click)=\"openAttachmentsList(list)\" name=\"attach-outline\"></ion-icon>\r\n\t\t\t\t\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t\t\t\t\t<ion-col class=\"act_btn\" size=\"4\" (click)=\"openAttachmentModel(list)\">\r\n\t\t\t\t\t\t\t\t\t\t<ion-button size=\"small\" shape=\"block\" class=\"btn\">Attachment</ion-button>\r\n\t\t\t\t\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t\t\t\t</ion-row>\r\n\t\t\t\t\t\t\t\t<ion-row>\r\n\t\t\t\t\t\t\t\t\t<ion-col size=\"12\">\r\n\t\t\t\t\t\t\t\t\t\t<h3>Issue date: <span>{{list?.value?.issuer_ts | formatDate:'short'}}</span>\r\n\t\t\t\t\t\t\t\t\t\t</h3>\r\n\t\t\t\t\t\t\t\t\t</ion-col>\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t</ion-row>\r\n\t\t\t\t\t\t\t\t<ion-row *ngIf = \"list?.value?.tag_id !== null\">\r\n\t\t\t\t\t\t\t\t\t<ion-col class=\"act_btn\" (click)=\"downloadChallan(list)\">\r\n\t\t\t\t\t\t\t\t\t\t<ion-button size=\"small\" shape=\"block\" class=\"btn\">Challan Download</ion-button>\r\n\t\t\t\t\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t\t\t\t\t<ion-col class=\"act_btn\">\r\n\t\t\t\t\t\t\t\t\t\t<ion-button size=\"small\" shape=\"block\" class=\"btn\">Active</ion-button>\r\n\t\t\t\t\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t\t\t\t</ion-row>\r\n\t\t\t\t\t\t\t\t<!--<ion-row *ngIf = \"list?.value?.tag_id == null\">\r\n\t\t\t\t\t\t\t\t\t<ion-col class=\"act_btn\" (click)=\"downloadChallan(list)\">\r\n\t\t\t\t\t\t\t\t\t\t<ion-button size=\"small\" shape=\"block\" class=\"btn\" [disabled]=\"true\">Challan Download</ion-button>\r\n\t\t\t\t\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t\t\t\t\t<ion-col class=\"act_btn\">\r\n\t\t\t\t\t\t\t\t\t\t<ion-button size=\"large\" shape=\"block\" class=\"btn\"\r\n\t\t\t\t\t\t\t\t\t\t\t(click)=\"activeSuspend(list.value)\" [disabled]=\"true\">Suspend</ion-button>\r\n\t\t\t\t\t\t\t\t\t</ion-col>\r\n\t\t\t\t\t\t\t\t</ion-row>-->\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</ion-item>\r\n\t\t\t</ion-item-sliding>\r\n\t\t</ion-list>\r\n\t</div>\r\n\t<ion-fab class=\"back-to-top-btn\" *ngIf=\"backToTop\" (click)=\"gotToTop()\" horizontal=\"end\" vertical=\"bottom\"\r\n\t\tslot=\"fixed\">\r\n\t\t<ion-fab-button>\r\n\t\t\t<!-- <ion-icon md=\"caret-up\" ios=\"chevron-back-circle-outline\"></ion-icon> -->\r\n\t\t\t<ion-icon name=\"chevron-up-circle-outline\"></ion-icon>\r\n\t\t</ion-fab-button>\r\n\t</ion-fab>\r\n</ion-content>\r\n<!-- <ion-footer>\r\n\t<ion-toolbar color=\"secondary\">\r\n\t\t<ion-buttons slot=\"start\">\r\n\t\t\t<ion-icon name=\"arrow-up-sharp\" (click)=\"toggleSort()\" class=\"sort-order\"></ion-icon>\r\n\t\t\t<ion-icon name=\"arrow-down-sharp\" (click)=\"toggleSort()\"></ion-icon>\r\n\t\t\t<ion-button class=\"sort-option\">\r\n\t\t\t\t<span (click)=\"sortOption()\">Sort {{sortOn}}</span>\r\n\t\t\t</ion-button>\r\n\t\t</ion-buttons>\r\n\t\t<ion-buttons slot=\"end\">\r\n\t\t\t<ion-button (click)=\"filterOption()\">\r\n\t\t\t\t<ion-icon name=\"funnel-sharp\" class=\"filter\"></ion-icon>\r\n\t\t\t\tFilter {{filterOn}}\r\n\t\t\t</ion-button>\r\n\t\t</ion-buttons>\r\n\t\t<ion-title>\r\n\t\t</ion-title>\r\n\t</ion-toolbar>\r\n</ion-footer> -->";
      /***/
    },

    /***/
    "4rAQ":
    /*!*****************************************************!*\
      !*** ./src/app/vehicle-list/vehicle-list.page.scss ***!
      \*****************************************************/

    /*! exports provided: default */

    /***/
    function rAQ(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony default export */


      __webpack_exports__["default"] = "ion-header ion-toolbar ion-buttons ion-menu-button {\n  border-radius: 50%;\n  margin: 0 15px;\n  width: 42px;\n  height: 42px;\n}\nion-header ion-toolbar:last-child {\n  padding: 0 7px 0 7px;\n}\nion-header ion-toolbar:last-child ion-button {\n  font-weight: 500;\n  white-space: normal;\n}\nion-header ion-toolbar:last-child ion-icon {\n  padding-right: 10px;\n  font-size: 25px !important;\n}\nion-header .search-opt {\n  width: 100%;\n  text-align: end;\n}\nion-header .search-opt ion-searchbar {\n  text-align: initial;\n}\nion-footer ion-toolbar:last-child {\n  border-radius: 10px 10px 0 0;\n  padding: 0 7px 0 7px;\n}\nion-footer ion-toolbar:last-child ion-button {\n  font-weight: 500;\n  white-space: normal;\n}\nion-footer ion-toolbar:last-child ion-icon {\n  padding-right: 5px;\n  font-size: 20px;\n}\nion-content {\n  --offset-bottom:-10px !important;\n  --offset-top:60px !important;\n}\n.main_container {\n  position: absolute;\n  left: 0;\n  right: 0;\n  width: 100%;\n  bottom: -100%;\n  height: 100%;\n  transition: all 0.3s;\n}\n.main_container .end {\n  text-align: end;\n  margin-left: -10px;\n}\n.main_container .end ion-icon {\n  color: var(--primary);\n}\n.main_container .opt2 {\n  margin-bottom: 15px !important;\n}\n.main_container .top-label {\n  color: var(--secondary);\n  font-size: var(--text_font_size);\n  padding-left: 35px;\n  margin-top: -5px;\n}\n.main_container .refresh {\n  right: 10%;\n  font-size: var(--title_font_size);\n}\n.main_container ion-button {\n  right: 10%;\n}\n.main_container ion-list {\n  padding: 0;\n  background: none;\n  padding-top: 10px;\n  padding-top: 75px;\n}\n.main_container ion-list ion-item {\n  box-shadow: 4px 5px 10px -2px #b7b3b3 !important;\n  border: 1px solid #cac8c8 !important;\n}\n.main_container ion-list ion-item-sliding, .main_container ion-list ion-item {\n  width: calc(100% - 15px);\n  margin: 0 auto;\n  padding: 0;\n  position: relative;\n  overflow: hidden;\n  border-radius: 7px;\n  margin-bottom: 7px;\n  --background: var(--transparent);\n  --inner-padding-end: 0px;\n  --inner-min-height: unset !important;\n  --padding-start: 0;\n  --min-height: unset;\n}\n.main_container ion-list ion-item-sliding .item_inner, .main_container ion-list ion-item .item_inner {\n  width: 100%;\n}\n.main_container ion-list ion-item-sliding .item_inner .green, .main_container ion-list ion-item .item_inner .green {\n  border-right: 7px solid #d2b800;\n}\n.main_container ion-list ion-item-sliding .item_inner span.green, .main_container ion-list ion-item .item_inner span.green {\n  color: #d2b800 !important;\n  border-right: unset;\n}\n.main_container ion-list ion-item-sliding .item_inner .red, .main_container ion-list ion-item .item_inner .red {\n  border-right: 7px solid #e75119;\n}\n.main_container ion-list ion-item-sliding .item_inner span.red, .main_container ion-list ion-item .item_inner span.red {\n  color: #e75119 !important;\n  border-right: unset;\n}\n.main_container ion-list ion-item-sliding .item_inner .black, .main_container ion-list ion-item .item_inner .black {\n  border-right: 7px solid var(--text-black);\n}\n.main_container ion-list ion-item-sliding .item_inner span.black, .main_container ion-list ion-item .item_inner span.black {\n  color: var(--text-black) !important;\n  border-right: unset;\n}\n.main_container ion-list ion-item-sliding .item_inner .amber, .main_container ion-list ion-item .item_inner .amber {\n  border-right: 7px solid #ec8413;\n}\n.main_container ion-list ion-item-sliding .item_inner span.amber, .main_container ion-list ion-item .item_inner span.amber {\n  color: #ec8413 !important;\n  border-right: unset;\n}\n.main_container ion-list ion-item-sliding .item_inner .item_header, .main_container ion-list ion-item .item_inner .item_header {\n  padding: 0px 5px;\n  background: var(--white);\n}\n.main_container ion-list ion-item-sliding .item_inner .item_header .expand, .main_container ion-list ion-item .item_inner .item_header .expand {\n  font-size: 29px;\n  margin: 0;\n}\n.main_container ion-list ion-item-sliding .item_inner .item_header .img_box, .main_container ion-list ion-item .item_inner .item_header .img_box {\n  min-width: 30px;\n  max-width: 30px;\n  min-height: 30px;\n  border-radius: 50%;\n  margin-right: 10px;\n}\n.main_container ion-list ion-item-sliding .item_inner .item_header h2, .main_container ion-list ion-item .item_inner .item_header h2 {\n  font-size: var(--title_font_size);\n  font-weight: 700;\n  margin: 0;\n  color: var(--secondary);\n  margin-right: 10px;\n}\n.main_container ion-list ion-item-sliding .item_inner .item_header h2 sub, .main_container ion-list ion-item .item_inner .item_header h2 sub {\n  color: var(--text-light);\n  font-weight: 400;\n  font-size: 0.7rem;\n  margin: 0px 4px;\n}\n.main_container ion-list ion-item-sliding .item_inner .item_header h2 .end, .main_container ion-list ion-item .item_inner .item_header h2 .end {\n  color: var(--green_color);\n  font-size: var(--title_font_size);\n  letter-spacing: 0.5px;\n}\n.main_container ion-list ion-item-sliding .item_inner .item_header ion-icon, .main_container ion-list ion-item .item_inner .item_header ion-icon {\n  font-size: 125%;\n  margin: 5px 15px 5px 1px;\n  background: var(--white);\n  border-radius: 50%;\n  padding: 5px;\n  color: var(--secondary);\n}\n.main_container ion-list ion-item-sliding .item_inner .item_header .option2, .main_container ion-list ion-item .item_inner .item_header .option2 {\n  margin: 0 0 0 10px;\n  background: unset;\n}\n.main_container ion-list ion-item-sliding .item_inner ion-item-sliding, .main_container ion-list ion-item-sliding .item_inner .item_containt, .main_container ion-list ion-item .item_inner ion-item-sliding, .main_container ion-list ion-item .item_inner .item_containt {\n  padding: 8px 9px 8px 9px;\n  background: #fff;\n}\n.main_container ion-list ion-item-sliding .item_inner ion-item-sliding ion-row, .main_container ion-list ion-item-sliding .item_inner .item_containt ion-row, .main_container ion-list ion-item .item_inner ion-item-sliding ion-row, .main_container ion-list ion-item .item_inner .item_containt ion-row {\n  align-items: flex-end;\n}\n.main_container ion-list ion-item-sliding .item_inner ion-item-sliding ion-row ion-col, .main_container ion-list ion-item-sliding .item_inner .item_containt ion-row ion-col, .main_container ion-list ion-item .item_inner ion-item-sliding ion-row ion-col, .main_container ion-list ion-item .item_inner .item_containt ion-row ion-col {\n  padding-bottom: 5px;\n}\n.main_container ion-list ion-item-sliding .item_inner ion-item-sliding ion-row ion-col.d-flex, .main_container ion-list ion-item-sliding .item_inner .item_containt ion-row ion-col.d-flex, .main_container ion-list ion-item .item_inner ion-item-sliding ion-row ion-col.d-flex, .main_container ion-list ion-item .item_inner .item_containt ion-row ion-col.d-flex {\n  width: 16.66667%;\n}\n.main_container ion-list ion-item-sliding .item_inner ion-item-sliding ion-row ion-col h3, .main_container ion-list ion-item-sliding .item_inner .item_containt ion-row ion-col h3, .main_container ion-list ion-item .item_inner ion-item-sliding ion-row ion-col h3, .main_container ion-list ion-item .item_inner .item_containt ion-row ion-col h3 {\n  color: var(--text-light);\n  font-size: var(--sub_title_font_size);\n  margin: 0;\n  margin-bottom: 3px;\n  opacity: 0.8;\n}\n.main_container ion-list ion-item-sliding .item_inner ion-item-sliding ion-row ion-col h4, .main_container ion-list ion-item-sliding .item_inner .item_containt ion-row ion-col h4, .main_container ion-list ion-item .item_inner ion-item-sliding ion-row ion-col h4, .main_container ion-list ion-item .item_inner .item_containt ion-row ion-col h4 {\n  color: var(--text-dark);\n  font-size: var(--text_font_size);\n  margin: 0;\n  font-weight: 400;\n}\n.main_container ion-list ion-item-sliding .item_inner ion-item-sliding ion-row ion-col h4 .copy-icon, .main_container ion-list ion-item-sliding .item_inner .item_containt ion-row ion-col h4 .copy-icon, .main_container ion-list ion-item .item_inner ion-item-sliding ion-row ion-col h4 .copy-icon, .main_container ion-list ion-item .item_inner .item_containt ion-row ion-col h4 .copy-icon {\n  color: #212121 !important;\n  padding: 0 0px;\n}\n.main_container ion-list ion-item-sliding .item_inner ion-item-sliding ion-row ion-col h4 .copy-icon, .main_container ion-list ion-item-sliding .item_inner .item_containt ion-row ion-col h4 .copy-icon, .main_container ion-list ion-item .item_inner ion-item-sliding ion-row ion-col h4 .copy-icon, .main_container ion-list ion-item .item_inner .item_containt ion-row ion-col h4 .copy-icon {\n  color: var(--primary) !important;\n  padding: 0 0px;\n  margin: 0px 0 0 2px;\n  max-width: 13px;\n  max-height: 13px;\n}\n.main_container ion-list ion-item-sliding .item_inner ion-item-sliding ion-row ion-col span, .main_container ion-list ion-item-sliding .item_inner .item_containt ion-row ion-col span, .main_container ion-list ion-item .item_inner ion-item-sliding ion-row ion-col span, .main_container ion-list ion-item .item_inner .item_containt ion-row ion-col span {\n  color: var(--text-dark);\n  font-size: var(--text_font_size);\n  margin: 0;\n  font-weight: 400;\n}\n.main_container ion-list ion-item-sliding .item_inner ion-item-sliding ion-row ion-col ion-icon, .main_container ion-list ion-item-sliding .item_inner .item_containt ion-row ion-col ion-icon, .main_container ion-list ion-item .item_inner ion-item-sliding ion-row ion-col ion-icon, .main_container ion-list ion-item .item_inner .item_containt ion-row ion-col ion-icon {\n  color: var(--primary);\n  font-size: 1rem;\n  width: 30px;\n  height: 30px;\n  line-height: 30px;\n  text-align: center;\n}\n.main_container.active {\n  bottom: 0;\n}\n.main_container .act_btn {\n  text-align: right;\n}\n.main_container .act_btn ion-button {\n  text-align: center;\n  height: 40px;\n  font-size: 14px;\n  --border-radius:10px !important;\n}\nion-fab {\n  z-index: 1;\n}\nion-fab ion-fab-button {\n  --background: var(--secondary);\n  opacity: 0.6;\n  --color: var(--white);\n}\n/*\nion-footer {\n\t//height: 75px;\n\ttransition: all .5s;\n\tposition: absolute;\n\tbottom: 0;\n\n\t.upcoming_tasks {\n\t\tpadding: 9px 0 14px 0;\n\t\tbackground: var(--white);\n\t\toverflow: hidden;\n\t\tborder-radius: 10px 10px 0 0;\n\t\twidth: calc(100% - 25px);\n\t\theight: 75px; \n\t\tmargin: 0 auto;\n\n\t\th2 {\n\t\t\tmargin: 0;\n\t\t\tcolor: var(--text-light);\n\t\t\tfont-weight: 700;\n\t\t\tfont-size: 1.1rem;\n\t\t\tletter-spacing: 0;\n\t\t}\n\n\t\tion-icon {\n\t\t\tcolor: var(--text-light);\n\t\t\tdisplay: block;\n\t\t\tmargin: 0 auto;\n\t\t\tfont-size: 1.5rem;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t}\n\n\t&.active {\n\t\tbottom: -100px;\n\t}\n\n}\n*/\n/*# sourceMappingURL=data:application/json;base64,  */";
      /***/
    },

    /***/
    "7e/F":
    /*!***************************************************!*\
      !*** ./src/app/vehicle-list/vehicle-list.page.ts ***!
      \***************************************************/

    /*! exports provided: VehicleListPage */

    /***/
    function eF(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VehicleListPage", function () {
        return VehicleListPage;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _raw_loader_vehicle_list_page_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! raw-loader!./vehicle-list.page.html */
      "2yrg");
      /* harmony import */


      var _vehicle_list_page_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! ./vehicle-list.page.scss */
      "4rAQ");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! @angular/router */
      "tyNb");
      /* harmony import */


      var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! @ngx-translate/core */
      "sYmb");
      /* harmony import */


      var _ionic_angular__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! @ionic/angular */
      "TEn/");
      /* harmony import */


      var src_services_common_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! src/services/common.service */
      "FBGF");
      /* harmony import */


      var src_services_vehicle_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! src/services/vehicle.service */
      "lMcH");
      /* harmony import */


      var _services_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
      /*! ../../services/constants */
      "k8oS");
      /* harmony import */


      var _vehicle_filter_vehicle_filter_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
      /*! ../vehicle-filter/vehicle-filter.component */
      "uhMM");
      /* harmony import */


      var _angular_common_http__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
      /*! @angular/common/http */
      "tk/3");
      /* harmony import */


      var _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
      /*! @capacitor/filesystem */
      "F7bV");
      /* harmony import */


      var _capacitor_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
      /*! @capacitor/core */
      "FUe0");
      /* harmony import */


      var _ionic_native_file_opener_ngx__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(
      /*! @ionic-native/file-opener/ngx */
      "te5A");
      /* harmony import */


      var file_saver__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(
      /*! file-saver */
      "Iab2");
      /* harmony import */


      var file_saver__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_15__);
      /* harmony import */


      var src_models_vehicle_attachment_vehicle_attachment_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(
      /*! src/models/vehicle-attachment/vehicle-attachment.component */
      "YAtm"); //import { ModalController } from '@ionic/angular';
      //import { UpcomingPage } from '../upcoming/upcoming.page';  


      var VehicleListPage = /*#__PURE__*/function () {
        function VehicleListPage(router, translate, actionSheetController, modalController, alert, commonService, vehicleService, navCtrl, _fileOpener, route) {
          _classCallCheck(this, VehicleListPage);

          this.router = router;
          this.translate = translate;
          this.actionSheetController = actionSheetController;
          this.modalController = modalController;
          this.alert = alert;
          this.commonService = commonService;
          this.vehicleService = vehicleService;
          this.navCtrl = navCtrl;
          this._fileOpener = _fileOpener;
          this.route = route;
          this.listType = 1;
          this.showSearchBar = false;
          this.currentSortOrder = "desc";
          this.sortOn = '(on Status)';
          this.currentSortName = "status";
          this.filterOn = '(on All status)';
          this.SortCategory = 'All_request';
          this.dataGet = {
            op: "Opt1"
          };
          this.searchTerm = null;
          this.toggleGroups = {};
          this.BtnText = 'Suspend';
          this.selectedStatementIndex = 0;
          this.selectedButton = {};
          this.vehicleList = [];
          this.record_per_page = _services_constants__WEBPACK_IMPORTED_MODULE_9__["CONSTANTS"].ROW_COUNT;
          this.offset = this.record_per_page * 0;
          this.backToTop = false;
          this.fileName = 'vehicle-list.page.ts';
          this.ngInitCalled = false; // this.dataGet = JSON.parse(this.router.getCurrentNavigation().extras.queryParams.                         );
          // this.commonService.log({ tst: this.dataGet.op });
        }

        _createClass(VehicleListPage, [{
          key: "option",
          value: function option(op) {
            try {
              this.dataGet.op = op;
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'option(op)',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "showSearch",
          value: function showSearch() {
            try {
              if (this.showSearchBar) {
                this.ele.style.visibility = 'visible';
                this.showSearchBar = false;
              } else {
                this.ele.style.visibility = 'hidden';
                this.showSearchBar = true;
              }
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'showSearch()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "ionViewWillEnter",
          value: function ionViewWillEnter() {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
              var ng, obj;
              return regeneratorRuntime.wrap(function _callee$(_context) {
                while (1) {
                  switch (_context.prev = _context.next) {
                    case 0:
                      _context.prev = 0;

                      if (this.ngInitCalled) {
                        _context.next = 6;
                        break;
                      }

                      _context.next = 4;
                      return this.ngOnInit();

                    case 4:
                      ng = this;
                      setTimeout(function () {
                        ng.commonService.hideLoader();
                      }, 3000);

                    case 6:
                      _context.next = 12;
                      break;

                    case 8:
                      _context.prev = 8;
                      _context.t0 = _context["catch"](0);
                      obj = {
                        fileName: this.fileName,
                        functionName: 'ionViewWillEnter()',
                        error: _context.t0
                      };
                      this.commonService.systemException(obj);

                    case 12:
                    case "end":
                      return _context.stop();
                  }
                }
              }, _callee, this, [[0, 8]]);
            }));
          }
        }, {
          key: "ionViewDidEnter",
          value: function ionViewDidEnter() {
            try {
              this.ele = document.getElementsByClassName('on-search-hide')[0];
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'ngOnInit()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "ionViewWillLeave",
          value: function ionViewWillLeave() {
            try {
              /* resetting header for search & menu option if page is left or aborted */
              this.ele.style.visibility = 'visible';
              this.showSearchBar = false;
              this.searchTerm = '';
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'ionViewWillLeave()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "ngOnInit",
          value: function ngOnInit() {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
              var devDetail, obj;
              return regeneratorRuntime.wrap(function _callee2$(_context2) {
                while (1) {
                  switch (_context2.prev = _context2.next) {
                    case 0:
                      this.ngInitCalled = true;
                      _context2.prev = 1;
                      devDetail = this.commonService.getLocalgetDeviceInfo();
                      this.platform = devDetail.platform;
                      this.vehicleUpdateTime = this.commonService.getLocalvehicleUpdateTime();
                      this.lists = null;
                      _context2.next = 8;
                      return this.commonService.showLoader();

                    case 8:
                      this.lists = this.vehicleService.getLocalVehicleList();
                      this.commonService.log({
                        list: this.lists
                      });
                      this.backOpt = location.search.length;
                      _context2.next = 13;
                      return this.commonService.hideLoader();

                    case 13:
                      _context2.next = 19;
                      break;

                    case 15:
                      _context2.prev = 15;
                      _context2.t0 = _context2["catch"](1);
                      obj = {
                        fileName: this.fileName,
                        functionName: 'ngOnInit()',
                        error: _context2.t0
                      };
                      this.commonService.systemException(obj);

                    case 19:
                      this.ngInitCalled = false;

                    case 20:
                    case "end":
                      return _context2.stop();
                  }
                }
              }, _callee2, this, [[1, 15]]);
            }));
          }
        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this.lists = null;
          }
        }, {
          key: "openPDF",
          value: function openPDF() {
            try {
              window.open("https://dev.1pay.devops.merce.co/vehicle-challan.pdf", '_system', 'location=no');
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'openPDF()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "downloadChallan",
          value: function downloadChallan(listObj) {
            var _this = this;

            try {
              this.vehicleService.generatePdf(listObj).subscribe(function (res) {
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
                  var _this2 = this;

                  return regeneratorRuntime.wrap(function _callee4$(_context4) {
                    while (1) {
                      switch (_context4.prev = _context4.next) {
                        case 0:
                          if (!res.status) {
                            _context4.next = 4;
                            break;
                          }

                          _context4.next = 3;
                          return this.commonService.showLoader();

                        case 3:
                          this.vehicleService.downloadPdf(res).subscribe(function (res2) {
                            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this2, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
                              var base64, savedFile, filePath, obj;
                              return regeneratorRuntime.wrap(function _callee3$(_context3) {
                                while (1) {
                                  switch (_context3.prev = _context3.next) {
                                    case 0:
                                      if (!(res2.type === _angular_common_http__WEBPACK_IMPORTED_MODULE_11__["HttpEventType"].DownloadProgress)) {
                                        _context3.next = 3;
                                        break;
                                      }

                                      _context3.next = 23;
                                      break;

                                    case 3:
                                      if (!(res2.type === _angular_common_http__WEBPACK_IMPORTED_MODULE_11__["HttpEventType"].Response)) {
                                        _context3.next = 23;
                                        break;
                                      }

                                      console.log("wwwwwwwwwwwwwwww", res2);
                                      _context3.next = 7;
                                      return this.commonService.convertBlobToBase64(res2.body);

                                    case 7:
                                      base64 = _context3.sent;
                                      this.commonService.log({
                                        base64Obj: base64,
                                        path: res.data,
                                        directory: _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_12__["Directory"].Documents
                                      });

                                      if (!(this.platform === 'web')) {
                                        _context3.next = 15;
                                        break;
                                      }

                                      Object(file_saver__WEBPACK_IMPORTED_MODULE_15__["saveAs"])(base64, res.data);
                                      _context3.next = 13;
                                      return this.commonService.hideLoader();

                                    case 13:
                                      _context3.next = 23;
                                      break;

                                    case 15:
                                      _context3.next = 17;
                                      return _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_12__["Filesystem"].writeFile({
                                        path: res.data,
                                        data: base64,
                                        directory: _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_12__["Directory"].Documents
                                      });

                                    case 17:
                                      savedFile = _context3.sent;
                                      filePath = _capacitor_core__WEBPACK_IMPORTED_MODULE_13__["Capacitor"].convertFileSrc(savedFile.uri);
                                      obj = {
                                        base64: base64,
                                        filePath: savedFile.uri
                                      };
                                      _context3.next = 22;
                                      return this.commonService.hideLoader();

                                    case 22:
                                      this.commonService.openFile(obj);

                                    case 23:
                                    case "end":
                                      return _context3.stop();
                                  }
                                }
                              }, _callee3, this);
                            }));
                          });

                        case 4:
                        case "end":
                          return _context4.stop();
                      }
                    }
                  }, _callee4, this);
                }));
              });
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'downloadChallan(listObj)',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
          /*
            openFile(filePath) {
              try {
                this._fileOpener.open(filePath, 'application/pdf')
                  .then(() => { this.commonService.simpleToast('File downloaded') })
                  .catch((err) => { this.commonService.simpleToast('Error in opening the file / not supported in browser'); this.commonService.log(err) });
              }
              catch (error) {
                let obj = {
                  fileName: this.fileName,
                  functionName: 'openFile(filePath)',
                  error: error
                }
                this.commonService.systemException(obj);
              }
            }
          */

        }, {
          key: "sortOption",
          value: function sortOption() {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
              var _this3 = this;

              var actionSheet, obj;
              return regeneratorRuntime.wrap(function _callee5$(_context5) {
                while (1) {
                  switch (_context5.prev = _context5.next) {
                    case 0:
                      _context5.prev = 0;

                      if (!this.showSearchBar) {
                        _context5.next = 3;
                        break;
                      }

                      return _context5.abrupt("return");

                    case 3:
                      _context5.next = 5;
                      return this.actionSheetController.create({
                        header: 'Sort On',
                        cssClass: 'onepay-action-sheet',
                        buttons: [{
                          text: 'Status',
                          icon: 'invert-mode-outline',
                          handler: function handler() {
                            _this3.sortOn = '(on status)';
                            _this3.currentSortName = "status";
                          }
                        }, {
                          text: 'Vehicle Number',
                          icon: 'car-sport-outline',
                          handler: function handler() {
                            _this3.sortOn = '(on Vehicle Number)';
                            _this3.currentSortName = "Vehicle_number";
                          }
                        }, {
                          text: 'Tag Number',
                          icon: 'pricetags-outline',
                          handler: function handler() {
                            _this3.sortOn = '(on Tag Number)';
                            _this3.currentSortName = "Tag_number";
                          }
                        }]
                      });

                    case 5:
                      actionSheet = _context5.sent;
                      _context5.next = 8;
                      return actionSheet.present();

                    case 8:
                      _context5.next = 14;
                      break;

                    case 10:
                      _context5.prev = 10;
                      _context5.t0 = _context5["catch"](0);
                      obj = {
                        fileName: this.fileName,
                        functionName: 'sortOption()',
                        error: _context5.t0
                      };
                      this.commonService.systemException(obj);

                    case 14:
                    case "end":
                      return _context5.stop();
                  }
                }
              }, _callee5, this, [[0, 10]]);
            }));
          }
        }, {
          key: "filterOption",
          value: function filterOption() {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
              var _this4 = this;

              var actionSheet, obj;
              return regeneratorRuntime.wrap(function _callee6$(_context6) {
                while (1) {
                  switch (_context6.prev = _context6.next) {
                    case 0:
                      _context6.prev = 0;

                      if (!this.showSearchBar) {
                        _context6.next = 3;
                        break;
                      }

                      return _context6.abrupt("return");

                    case 3:
                      _context6.next = 5;
                      return this.actionSheetController.create({
                        header: 'Filter On',
                        cssClass: 'onepay-action-sheet',
                        buttons: [{
                          text: 'All Status',
                          icon: 'color-filter-outline',
                          handler: function handler() {
                            _this4.filterOn = '(on All status)';
                            _this4.SortCategory = 'all_status';
                          }
                        }, {
                          text: 'Active',
                          icon: 'flash-outline',
                          handler: function handler() {
                            _this4.filterOn = '(on Active)';
                            _this4.SortCategory = 'Active';
                          }
                        }, {
                          text: 'Suspend',
                          icon: 'flash-off-outline',
                          handler: function handler() {
                            _this4.filterOn = '(on Suspend)';
                            _this4.SortCategory = 'Suspend';
                          }
                        }, {
                          text: 'Reissue',
                          icon: 'refresh-circle-outline',
                          handler: function handler() {
                            _this4.filterOn = '(on Reissue)';
                            _this4.SortCategory = 'Reissue';
                          }
                        }]
                      });

                    case 5:
                      actionSheet = _context6.sent;
                      _context6.next = 8;
                      return actionSheet.present();

                    case 8:
                      _context6.next = 14;
                      break;

                    case 10:
                      _context6.prev = 10;
                      _context6.t0 = _context6["catch"](0);
                      obj = {
                        fileName: this.fileName,
                        functionName: 'filterOption()',
                        error: _context6.t0
                      };
                      this.commonService.systemException(obj);

                    case 14:
                    case "end":
                      return _context6.stop();
                  }
                }
              }, _callee6, this, [[0, 10]]);
            }));
          }
        }, {
          key: "toggleSort",
          value: function toggleSort() {}
        }, {
          key: "activeSuspend",
          value: function activeSuspend(list) {
            try {
              if (list.tag_status === 'Active') {
                this.simpleConfirm2('Are You Sure?', 'This will change state to Suspend', list);
              } //  else {
              //   this.simpleConfirm2('Are You Sure?', 'This will be change state to Suspend', list);
              // }

            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'activeSuspend(list)',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "simpleConfirm1",
          value: function simpleConfirm1(headerVal, messageVal, list) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
              var alert, obj;
              return regeneratorRuntime.wrap(function _callee7$(_context7) {
                while (1) {
                  switch (_context7.prev = _context7.next) {
                    case 0:
                      _context7.prev = 0;
                      _context7.next = 3;
                      return this.alert.create({
                        cssClass: 'my-custom-class',
                        mode: 'ios',
                        header: headerVal,
                        message: messageVal,
                        buttons: [{
                          text: 'Yes!',
                          handler: function handler() {
                            list.btnState = "Active";
                          }
                        }, {
                          text: 'Cancel',
                          handler: function handler() {
                            list.btnState = "Suspend";
                          }
                        }]
                      });

                    case 3:
                      alert = _context7.sent;
                      _context7.next = 6;
                      return alert.present();

                    case 6:
                      _context7.next = 12;
                      break;

                    case 8:
                      _context7.prev = 8;
                      _context7.t0 = _context7["catch"](0);
                      obj = {
                        fileName: this.fileName,
                        functionName: 'simpleConfirm1(headerVal: string, messageVal: string, list)',
                        error: _context7.t0
                      };
                      this.commonService.systemException(obj);

                    case 12:
                    case "end":
                      return _context7.stop();
                  }
                }
              }, _callee7, this, [[0, 8]]);
            }));
          } // Open Modal for filter option

        }, {
          key: "openModel",
          value: function openModel() {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
              var _this5 = this;

              var modal, obj;
              return regeneratorRuntime.wrap(function _callee8$(_context8) {
                while (1) {
                  switch (_context8.prev = _context8.next) {
                    case 0:
                      _context8.prev = 0;
                      _context8.next = 3;
                      return this.modalController.create({
                        component: _vehicle_filter_vehicle_filter_component__WEBPACK_IMPORTED_MODULE_10__["VehicleFilterComponent"],
                        componentProps: {// _id: this.uqueryID,
                          // _query:this.uqueryVal,
                          // _acct:this.acct,
                          // _module:"wallet"
                        }
                      });

                    case 3:
                      modal = _context8.sent;
                      modal.onDidDismiss().then(function (data) {
                        _this5.commonService.log(data); // if (data.data.userOption === 'confirm') {
                        // this._commonService.simpleAlert('Saved','You have successfully raised a new Support Request. Your request ID is T202107C1000105');
                        // }

                      });
                      _context8.next = 7;
                      return modal.present();

                    case 7:
                      return _context8.abrupt("return", _context8.sent);

                    case 10:
                      _context8.prev = 10;
                      _context8.t0 = _context8["catch"](0);
                      obj = {
                        fileName: this.fileName,
                        functionName: 'openModel()',
                        error: _context8.t0
                      };
                      this.commonService.systemException(obj);

                    case 14:
                    case "end":
                      return _context8.stop();
                  }
                }
              }, _callee8, this, [[0, 10]]);
            }));
          }
        }, {
          key: "getScrollPos",
          value: function getScrollPos(pos) {
            try {
              if (pos > 100) {
                this.backToTop = true;
              } else {
                this.backToTop = false;
              }
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'getScrollPos(pos: number)',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "gotToTop",
          value: function gotToTop() {
            try {
              this.content.scrollToTop(1000);
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'gotToTop()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "simpleConfirm2",
          value: function simpleConfirm2(headerVal, messageVal, list) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
              var _this6 = this;

              var alert, obj;
              return regeneratorRuntime.wrap(function _callee11$(_context11) {
                while (1) {
                  switch (_context11.prev = _context11.next) {
                    case 0:
                      _context11.prev = 0;
                      _context11.next = 3;
                      return this.alert.create({
                        cssClass: 'my-custom-class',
                        mode: 'ios',
                        header: headerVal,
                        message: messageVal,
                        buttons: [{
                          text: 'Yes!',
                          handler: function handler() {
                            // list.btnState = "Suspend";
                            //list.btnState = "Active";
                            _this6.vehicleService.suspendVehicle(list).subscribe(function (resp) {
                              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this6, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
                                var _this7 = this;

                                return regeneratorRuntime.wrap(function _callee9$(_context9) {
                                  while (1) {
                                    switch (_context9.prev = _context9.next) {
                                      case 0:
                                        _context9.next = 2;
                                        return this.commonService.showLoader();

                                      case 2:
                                        if (!resp.status) {
                                          _context9.next = 10;
                                          break;
                                        }

                                        _context9.next = 5;
                                        return this.vehicleService.getAllVehicle(0).subscribe(function (res) {
                                          _this7.commonService.log({
                                            Vehicle: res
                                          });

                                          if (res.status === true) {
                                            var col = res.columns;
                                            var data = res.data;

                                            _this7.vehicleService.log({
                                              Columns: col,
                                              Data: data
                                            });

                                            var vehicleList = _this7.vehicleService.mapColData(col, data);

                                            var vehicleNumberList = {};

                                            var _iterator = _createForOfIteratorHelper(vehicleList),
                                                _step;

                                            try {
                                              for (_iterator.s(); !(_step = _iterator.n()).done;) {
                                                var vnum = _step.value;
                                                vehicleNumberList[vnum.vrn] = vnum;
                                              }
                                            } catch (err) {
                                              _iterator.e(err);
                                            } finally {
                                              _iterator.f();
                                            }

                                            localStorage.setItem("vehicleList", JSON.stringify(vehicleNumberList));
                                          }
                                        });

                                      case 5:
                                        this.doRefresh();
                                        _context9.next = 8;
                                        return this.commonService.hideLoader();

                                      case 8:
                                        _context9.next = 14;
                                        break;

                                      case 10:
                                        this.resError = resp.message;
                                        _context9.next = 13;
                                        return this.commonService.hideLoader();

                                      case 13:
                                        this.commonService.errorToast(this.resError);

                                      case 14:
                                      case "end":
                                        return _context9.stop();
                                    }
                                  }
                                }, _callee9, this);
                              }));
                            }, function (error) {
                              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this6, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
                                return regeneratorRuntime.wrap(function _callee10$(_context10) {
                                  while (1) {
                                    switch (_context10.prev = _context10.next) {
                                      case 0:
                                        this.resError = error.message;
                                        _context10.next = 3;
                                        return this.commonService.hideLoader();

                                      case 3:
                                        this.commonService.errorToast(this.resError);

                                      case 4:
                                      case "end":
                                        return _context10.stop();
                                    }
                                  }
                                }, _callee10, this);
                              }));
                            });
                          }
                        }, {
                          text: 'Cancel',
                          handler: function handler() {}
                        }]
                      });

                    case 3:
                      alert = _context11.sent;
                      _context11.next = 6;
                      return alert.present();

                    case 6:
                      _context11.next = 12;
                      break;

                    case 8:
                      _context11.prev = 8;
                      _context11.t0 = _context11["catch"](0);
                      obj = {
                        fileName: this.fileName,
                        functionName: 'simpleConfirm2(headerVal: string, messageVal: string, list)',
                        error: _context11.t0
                      };
                      this.commonService.systemException(obj);

                    case 12:
                    case "end":
                      return _context11.stop();
                  }
                }
              }, _callee11, this, [[0, 8]]);
            }));
          }
        }, {
          key: "doRefresh",
          value: function doRefresh() {
            var _this8 = this;

            try {
              setTimeout(function () {
                return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this8, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
                  return regeneratorRuntime.wrap(function _callee12$(_context12) {
                    while (1) {
                      switch (_context12.prev = _context12.next) {
                        case 0:
                          _context12.next = 2;
                          return this.ngOnInit();

                        case 2:
                        case "end":
                          return _context12.stop();
                      }
                    }
                  }, _callee12, this);
                }));
              }, 500);
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'doRefresh()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "copyText",
          value: function copyText(list) {
            var _a;

            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
              var obj;
              return regeneratorRuntime.wrap(function _callee13$(_context13) {
                while (1) {
                  switch (_context13.prev = _context13.next) {
                    case 0:
                      try {
                        this.commonService.copyText((_a = list === null || list === void 0 ? void 0 : list.value) === null || _a === void 0 ? void 0 : _a.barcode);
                      } catch (error) {
                        obj = {
                          fileName: this.fileName,
                          functionName: 'copyText(list)',
                          error: error
                        };
                        this.commonService.systemException(obj);
                      }

                    case 1:
                    case "end":
                      return _context13.stop();
                  }
                }
              }, _callee13, this);
            }));
          }
        }, {
          key: "reload",
          value: function reload() {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
              var _this9 = this;

              var obj;
              return regeneratorRuntime.wrap(function _callee14$(_context14) {
                while (1) {
                  switch (_context14.prev = _context14.next) {
                    case 0:
                      _context14.prev = 0;
                      _context14.next = 3;
                      return this.commonService.showLoader();

                    case 3:
                      this.vehicleService.getAllVehicle(0).subscribe(function (res) {
                        if (res.status === true) {
                          _this9.vehicleUpdateTime = _this9.commonService.getLocalvehicleUpdateTime();
                          var col = res.columns;
                          var data = res.data;

                          _this9.vehicleService.log({
                            Columns: col,
                            Data: data
                          });

                          var vehicleList = _this9.vehicleService.mapColData(col, data);

                          var vehicleNumberList = {};

                          var _iterator2 = _createForOfIteratorHelper(vehicleList),
                              _step2;

                          try {
                            for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
                              var vnum = _step2.value;
                              vehicleNumberList[vnum.vrn] = vnum;
                            }
                          } catch (err) {
                            _iterator2.e(err);
                          } finally {
                            _iterator2.f();
                          }

                          localStorage.setItem("vehicleList", JSON.stringify(vehicleNumberList));
                        }
                      });
                      _context14.next = 6;
                      return this.commonService.hideLoader();

                    case 6:
                      _context14.next = 12;
                      break;

                    case 8:
                      _context14.prev = 8;
                      _context14.t0 = _context14["catch"](0);
                      obj = {
                        fileName: this.fileName,
                        functionName: 'reload()',
                        error: _context14.t0
                      };
                      this.commonService.systemException(obj);

                    case 12:
                    case "end":
                      return _context14.stop();
                  }
                }
              }, _callee14, this, [[0, 8]]);
            }));
          } // Open Modal for attachment option

        }, {
          key: "openAttachmentModel",
          value: function openAttachmentModel(list) {
            return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
              var _this10 = this;

              var modal, obj;
              return regeneratorRuntime.wrap(function _callee17$(_context17) {
                while (1) {
                  switch (_context17.prev = _context17.next) {
                    case 0:
                      _context17.prev = 0;
                      _context17.next = 3;
                      return this.modalController.create({
                        component: src_models_vehicle_attachment_vehicle_attachment_component__WEBPACK_IMPORTED_MODULE_16__["VehicleAttachmentComponent"],
                        componentProps: {// _startDate: this.startDate,
                          // _endDate: this.endDate,
                          // _searchTerm: this.searchTerm
                        }
                      });

                    case 3:
                      modal = _context17.sent;
                      modal.onDidDismiss().then(function (data) {
                        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this10, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
                          var _this11 = this;

                          var _a, _b, _c, _d, obj;

                          return regeneratorRuntime.wrap(function _callee16$(_context16) {
                            while (1) {
                              switch (_context16.prev = _context16.next) {
                                case 0:
                                  if (!(((_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.userOption) === 'confirm')) {
                                    _context16.next = 5;
                                    break;
                                  }

                                  _context16.next = 3;
                                  return this.commonService.showLoader();

                                case 3:
                                  obj = {
                                    file: (_b = data === null || data === void 0 ? void 0 : data.data) === null || _b === void 0 ? void 0 : _b.file,
                                    vrn: (_c = list === null || list === void 0 ? void 0 : list.value) === null || _c === void 0 ? void 0 : _c.vrn,
                                    docKey: (_d = data === null || data === void 0 ? void 0 : data.data) === null || _d === void 0 ? void 0 : _d.docKey
                                  };
                                  this.vehicleService.uploadVehicleDoc(obj).subscribe(function (res) {
                                    return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(_this11, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
                                      return regeneratorRuntime.wrap(function _callee15$(_context15) {
                                        while (1) {
                                          switch (_context15.prev = _context15.next) {
                                            case 0:
                                              if (!(res.status === true)) {
                                                _context15.next = 6;
                                                break;
                                              }

                                              this.commonService.simpleAlert("Success", "Document Uploaded Successfully");
                                              _context15.next = 4;
                                              return this.commonService.hideLoader();

                                            case 4:
                                              _context15.next = 9;
                                              break;

                                            case 6:
                                              this.commonService.simpleToast(res === null || res === void 0 ? void 0 : res.message);
                                              _context15.next = 9;
                                              return this.commonService.hideLoader();

                                            case 9:
                                            case "end":
                                              return _context15.stop();
                                          }
                                        }
                                      }, _callee15, this);
                                    }));
                                  });

                                case 5:
                                case "end":
                                  return _context16.stop();
                              }
                            }
                          }, _callee16, this);
                        }));
                      });
                      _context17.next = 7;
                      return modal.present();

                    case 7:
                      return _context17.abrupt("return", _context17.sent);

                    case 10:
                      _context17.prev = 10;
                      _context17.t0 = _context17["catch"](0);
                      obj = {
                        fileName: this.fileName,
                        functionName: 'openAttachmentModel()',
                        error: _context17.t0
                      };
                      this.commonService.systemException(obj);

                    case 14:
                    case "end":
                      return _context17.stop();
                  }
                }
              }, _callee17, this, [[0, 10]]);
            }));
          }
        }, {
          key: "vehicleAdd",
          value: function vehicleAdd() {
            try {
              //this.route.navigate(['./add-vehicle-form']);
              this.navCtrl.navigateBack('/add-vehicle-form');
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'addvehicles()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "openAttachmentsList",
          value: function openAttachmentsList(list) {
            console.log({
              list: list
            });

            try {
              this.commonService.routeToPage('attachment-lists', {
                id: list.key,
                op: 'vehicles'
              });
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'openAttachmentsList()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }]);

        return VehicleListPage;
      }();

      VehicleListPage.ctorParameters = function () {
        return [{
          type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]
        }, {
          type: _ngx_translate_core__WEBPACK_IMPORTED_MODULE_5__["TranslateService"]
        }, {
          type: _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["ActionSheetController"]
        }, {
          type: _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["ModalController"]
        }, {
          type: _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["AlertController"]
        }, {
          type: src_services_common_service__WEBPACK_IMPORTED_MODULE_7__["CommonService"]
        }, {
          type: src_services_vehicle_service__WEBPACK_IMPORTED_MODULE_8__["VehicleService"]
        }, {
          type: _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["NavController"]
        }, {
          type: _ionic_native_file_opener_ngx__WEBPACK_IMPORTED_MODULE_14__["FileOpener"]
        }, {
          type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]
        }];
      };

      VehicleListPage.propDecorators = {
        content: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ViewChild"],
          args: [_ionic_angular__WEBPACK_IMPORTED_MODULE_6__["IonContent"], {
            read: _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["IonContent"],
            "static": false
          }]
        }]
      };
      VehicleListPage = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
        selector: 'app-vehicle-list',
        template: _raw_loader_vehicle_list_page_html__WEBPACK_IMPORTED_MODULE_1__["default"],
        styles: [_vehicle_list_page_scss__WEBPACK_IMPORTED_MODULE_2__["default"]]
      }), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"], _ngx_translate_core__WEBPACK_IMPORTED_MODULE_5__["TranslateService"], _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["ActionSheetController"], _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["ModalController"], _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["AlertController"], src_services_common_service__WEBPACK_IMPORTED_MODULE_7__["CommonService"], src_services_vehicle_service__WEBPACK_IMPORTED_MODULE_8__["VehicleService"], _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["NavController"], _ionic_native_file_opener_ngx__WEBPACK_IMPORTED_MODULE_14__["FileOpener"], _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]])], VehicleListPage);
      /***/
    },

    /***/
    "hyMn":
    /*!*************************************************************!*\
      !*** ./src/app/vehicle-list/vehicle-list-routing.module.ts ***!
      \*************************************************************/

    /*! exports provided: VehicleListPageRoutingModule */

    /***/
    function hyMn(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VehicleListPageRoutingModule", function () {
        return VehicleListPageRoutingModule;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @angular/router */
      "tyNb");
      /* harmony import */


      var _vehicle_list_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! ./vehicle-list.page */
      "7e/F");

      var routes = [{
        path: '',
        component: _vehicle_list_page__WEBPACK_IMPORTED_MODULE_3__["VehicleListPage"]
      }];

      var VehicleListPageRoutingModule = function VehicleListPageRoutingModule() {
        _classCallCheck(this, VehicleListPageRoutingModule);
      };

      VehicleListPageRoutingModule = Object(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"]]
      })], VehicleListPageRoutingModule);
      /***/
    },

    /***/
    "lMcH":
    /*!*****************************************!*\
      !*** ./src/services/vehicle.service.ts ***!
      \*****************************************/

    /*! exports provided: VehicleService */

    /***/
    function lMcH(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VehicleService", function () {
        return VehicleService;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/common/http */
      "tk/3");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /* harmony import */


      var _base_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! ./base-service */
      "4YT6");
      /* harmony import */


      var _common_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! ./common.service */
      "FBGF");
      /* harmony import */


      var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./constants */
      "k8oS");

      var VehicleService = /*#__PURE__*/function (_base_service__WEBPAC) {
        _inherits(VehicleService, _base_service__WEBPAC);

        var _super = _createSuper(VehicleService);

        function VehicleService(commonService, httpClient) {
          var _this12;

          _classCallCheck(this, VehicleService);

          _this12 = _super.call(this);
          _this12.commonService = commonService;
          _this12.httpClient = httpClient;
          _this12.fileName = 'vehicle.service.ts';
          _this12.paramName = "customervehicle";
          _this12.columnArray = _constants__WEBPACK_IMPORTED_MODULE_6__["COLUMNS"];
          return _this12;
        }

        _createClass(VehicleService, [{
          key: "getAllVehicle",
          value: function getAllVehicle(offset) {
            var _this13 = this;

            try {
              var dataObj = {
                offset: offset,
                method: 'post',
                api_url: this.getLocalapiBaseURL() + _constants__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].VEHICLE_LISTING_API,
                local_json_file: 'local-vehicle-list',
                param_data: {
                  "name": this.paramName
                },
                mapcol: true
              };
              var res = this.commonService.fetchData(dataObj);
              res.subscribe(function (data) {
                if (data.status) localStorage.setItem("vehicleUpdateTime", _this13.commonService.getTimestamp());
              });
              return res;
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'getAllVehicle(offset)',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "suspendVehicle",
          value: function suspendVehicle(list) {
            try {
              var data = {};
              var url = this.getLocalapiBaseURL() + _constants__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].VEHICLE_SUSPEND_API + (list === null || list === void 0 ? void 0 : list.tag_id);
              return this.httpClient.post(url, data).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(function (resp) {
                return resp;
              }));
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'suspendVehicle(list)',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "generatePdf",
          value: function generatePdf(obj) {
            try {
              var dataObj = {
                offset: 0,
                method: 'get',
                api_url: this.getLocalapiBaseURL() + _constants__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].VEHICLE_GENERATE_CHALLAN_PDF_API + '/' + obj.key,
                local_json_file: '',
                mapcol: false
              };
              return this.commonService.fetchData(dataObj);
            } catch (error) {
              var _obj = {
                fileName: this.fileName,
                functionName: 'generatePdf(obj)',
                error: error
              };
              this.commonService.systemException(_obj);
            }
          }
        }, {
          key: "downloadPdf",
          value: function downloadPdf(obj) {
            try {
              var filename = encodeURIComponent(obj.data).replace(/\./g, '%2E');
              var dataObj = {
                offset: 0,
                method: 'get',
                api_url: this.getLocalapiBaseURL() + _constants__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].VEHICLE_DOWNLOAD_CHALLAN_PDF_API + '/' + filename,
                local_json_file: '',
                mapcol: false
              };
              return this.httpClient.get(this.getLocalapiBaseURL() + _constants__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].VEHICLE_DOWNLOAD_CHALLAN_PDF_API + '/' + filename + '/', {
                responseType: 'blob',
                reportProgress: true,
                observe: 'events'
              });
            } catch (error) {
              var _obj2 = {
                fileName: this.fileName,
                functionName: 'downloadPdf(obj)',
                error: error
              };
              this.commonService.systemException(_obj2);
            }
          }
        }, {
          key: "getVehicleDocList",
          value: function getVehicleDocList() {
            try {
              var dataObj = {
                offset: 0,
                method: 'get',
                api_url: this.getLocalapiBaseURL() + _constants__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].VEHICLE_DOC_TYPE_API,
                local_json_file: '',
                param_data: {},
                mapcol: false
              };
              return this.commonService.fetchData(dataObj);
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'getVehicleDocList()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "uploadVehicleDoc",
          value: function uploadVehicleDoc(obj) {
            try {
              var formData = new FormData();
              formData.append('file', obj.file);
              formData.append('customer_id', this.getLocalUserId());
              formData.append('vrn', obj.vrn);
              formData.append('doc_type', obj.docKey);
              var dataObj = {
                offset: 0,
                method: 'post',
                api_url: this.getLocalapiBaseURL() + _constants__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].VEHICLE_DOC_UPLOAD_API + obj.vrn + '/' + obj.docKey,
                local_json_file: '',
                param_data: {
                  file: formData
                },
                mapcol: false
              };
              return this.commonService.fetchData(dataObj);
            } catch (error) {
              var _obj3 = {
                fileName: this.fileName,
                functionName: 'uploadVehicleDoc(obj)',
                error: error
              };
              this.commonService.systemException(_obj3);
            }
          }
        }, {
          key: "addVehicle",
          value: function addVehicle(obj) {
            try {
              var dataObj;
              dataObj = {
                offset: 0,
                method: 'post',
                api_url: this.getLocalapiBaseURL() + _constants__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ADD_VEHICLE_API,
                local_json_file: '',
                param_data: {
                  vehicle_num: obj.vehicle_num,
                  vehicle_commercial: obj.vehicle_commercial,
                  vehicle_class: obj.vehicle_class
                },
                mapcol: false
              };
              console.log({
                dataObj: dataObj
              });
              return this.commonService.fetchData(dataObj);
            } catch (error) {
              var _obj4 = {
                fileName: this.fileName,
                functionName: 'addvehicle(obj)',
                error: error
              };
              this.commonService.systemException(_obj4);
            }
          }
        }, {
          key: "attachment",
          value: function attachment(id) {
            try {
              var dataObj = {
                offset: 0,
                method: 'get',
                //api_url: this.getLocalapiBaseURL() + Enums.CONSTANTS.ATTACHMENT_LISTS_API,
                api_url: this.getLocalapiBaseURL() + _constants__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].VEHICLE_ATTACHMENT_LISTS_API + id,
                local_json_file: '',
                data: {},
                mapcol: false
              };
              return this.commonService.fetchData(dataObj);
            } catch (error) {
              var obj = {
                fileName: this.fileName,
                functionName: 'attachment()',
                error: error
              };
              this.commonService.systemException(obj);
            }
          }
        }, {
          key: "downloadAttachment",
          value: function downloadAttachment(obj) {
            try {
              //let filename = encodeURIComponent(obj.data).replace(/\./g, '%2E');
              var dataObj = {
                offset: 0,
                method: 'get',
                api_url: this.getLocalapiBaseURL() + _constants__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].VEHICLE_DOC_DOWNLOAD_API + obj.vrn + '/' + obj.docType,
                local_json_file: '',
                mapcol: false
              };
              return this.httpClient.get(this.getLocalapiBaseURL() + _constants__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].VEHICLE_DOC_DOWNLOAD_API + obj.vrn + '/' + obj.docType, {
                responseType: 'blob',
                reportProgress: true,
                observe: 'events'
              });
            } catch (error) {
              var _obj5 = {
                fileName: this.fileName,
                functionName: 'downloadAttachment(obj)',
                error: error
              };
              this.commonService.systemException(_obj5);
            }
          }
        }]);

        return VehicleService;
      }(_base_service__WEBPACK_IMPORTED_MODULE_4__["BaseService"]);

      VehicleService.ctorParameters = function () {
        return [{
          type: _common_service__WEBPACK_IMPORTED_MODULE_5__["CommonService"]
        }, {
          type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]
        }];
      };

      VehicleService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])({
        providedIn: 'root'
      }), Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:paramtypes", [_common_service__WEBPACK_IMPORTED_MODULE_5__["CommonService"], _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]])], VehicleService);
      /***/
    },

    /***/
    "p45I":
    /*!*****************************************************!*\
      !*** ./src/app/vehicle-list/vehicle-list.module.ts ***!
      \*****************************************************/

    /*! exports provided: VehicleListPageModule */

    /***/
    function p45I(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "VehicleListPageModule", function () {
        return VehicleListPageModule;
      });
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! tslib */
      "mrSG");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");
      /* harmony import */


      var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @angular/forms */
      "3Pt+");
      /* harmony import */


      var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! @ngx-translate/core */
      "sYmb");
      /* harmony import */


      var _ionic_angular__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! @ionic/angular */
      "TEn/");
      /* harmony import */


      var _vehicle_list_routing_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! ./vehicle-list-routing.module */
      "hyMn");
      /* harmony import */


      var _vehicle_list_page__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
      /*! ./vehicle-list.page */
      "7e/F");
      /* harmony import */


      var src_pipes_shared_module__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
      /*! src/pipes/shared.module */
      "hFmk");
      /* harmony import */


      var ng2_search_filter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
      /*! ng2-search-filter */
      "cZdB");

      var VehicleListPageModule = function VehicleListPageModule() {
        _classCallCheck(this, VehicleListPageModule);
      };

      VehicleListPageModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormsModule"], _ionic_angular__WEBPACK_IMPORTED_MODULE_5__["IonicModule"], _ngx_translate_core__WEBPACK_IMPORTED_MODULE_4__["TranslateModule"], _vehicle_list_routing_module__WEBPACK_IMPORTED_MODULE_6__["VehicleListPageRoutingModule"], src_pipes_shared_module__WEBPACK_IMPORTED_MODULE_8__["SharedModule"], ng2_search_filter__WEBPACK_IMPORTED_MODULE_9__["Ng2SearchPipeModule"]],
        declarations: [_vehicle_list_page__WEBPACK_IMPORTED_MODULE_7__["VehicleListPage"]]
      })], VehicleListPageModule);
      /***/
    }
  }]);
})();
//# sourceMappingURL=vehicle-list-vehicle-list-module-es5.js.map