(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([["src_app_pages_woman-list_woman-list_module_ts"],{

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WomanListPageRoutingModule: () => (/* binding */ WomanListPageRoutingModule)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ 95072);
/* harmony import */ var _woman_list_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./woman-list.page */ 66957);




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


/***/ }),

/***/ 53082:
/*!*******************************************************!*\
  !*** ./src/app/pages/woman-list/woman-list.module.ts ***!
  \*******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WomanListPageModule: () => (/* binding */ WomanListPageModule)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var src_app_components_shared_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/components/shared.module */ 47774);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ 60316);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ionic/angular */ 21507);
/* harmony import */ var _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/cdk/scrolling */ 2356);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/forms */ 34456);
/* harmony import */ var _woman_list_routing_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./woman-list-routing.module */ 69019);
/* harmony import */ var _woman_list_page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./woman-list.page */ 66957);









let WomanListPageModule = class WomanListPageModule {};
WomanListPageModule = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_4__.NgModule)({
  imports: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.CommonModule, src_app_components_shared_module__WEBPACK_IMPORTED_MODULE_0__.SharedModule, _ionic_angular__WEBPACK_IMPORTED_MODULE_6__.IonicModule, _woman_list_routing_module__WEBPACK_IMPORTED_MODULE_1__.WomanListPageRoutingModule, _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_7__.ScrollingModule, _angular_forms__WEBPACK_IMPORTED_MODULE_8__.FormsModule],
  declarations: [_woman_list_page__WEBPACK_IMPORTED_MODULE_2__.WomanListPage]
})], WomanListPageModule);


/***/ }),

/***/ 66957:
/*!*****************************************************!*\
  !*** ./src/app/pages/woman-list/woman-list.page.ts ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   WomanListPage: () => (/* binding */ WomanListPage)
/* harmony export */ });
/* harmony import */ var _workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 89204);
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _woman_list_page_html_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./woman-list.page.html?ngResource */ 46887);
/* harmony import */ var _woman_list_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./woman-list.page.scss?ngResource */ 53327);
/* harmony import */ var _woman_list_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woman_list_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/router */ 95072);
/* harmony import */ var _services_woman_api_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../services/woman_api.service */ 11975);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var src_app_util_baseHelper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/util/baseHelper */ 76434);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/forms */ 34456);
/* harmony import */ var src_app_services_permission_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/services/permission.service */ 7773);
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/platform-browser */ 80436);
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/environments/environment */ 45312);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @ionic/angular */ 21507);
/* harmony import */ var _components_report_modal_report_modal_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/report-modal/report-modal.component */ 69843);
/* harmony import */ var src_app_services_survey_form_api_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/services/survey_form_api.service */ 55856);
/* harmony import */ var _capacitor_mlkit_barcode_scanning__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @capacitor-mlkit/barcode-scanning */ 89265);

var _WomanListPage;















let WomanListPage = (_WomanListPage = class WomanListPage {
  constructor(api, b, router, permissionService, sanitizer, modalCtrl, surveyApi) {
    this.api = api;
    this.b = b;
    this.router = router;
    this.permissionService = permissionService;
    this.sanitizer = sanitizer;
    this.modalCtrl = modalCtrl;
    this.surveyApi = surveyApi;
    this.womanList = null;
    this.searchTerm = '';
    this.searching = false;
    this.showIframe = false;
    this.selectedReport = '';
    this.loadingReport = false;
    this.iframeLoaded = false;
    this.currentDate = new Date();
    this.isLoading = false;
    // Filter properties
    this.blocks = [];
    this.subBlocks = [];
    this.allSubBlocks = [];
    this.selectedBlock = null;
    this.selectedSubBlocks = [];
    this.selectedStatus = null;
    this.selectedMotherSupportStatus = null;
    this.selectedNextVisitDate = null;
    this.selectedHasDisability = null;
    this.selectedVerified = null;
    this.selectedSurveyForm = null;
    this.surveyForms = [];
    // Pagination properties
    this.currentPage = 1;
    this.pageSize = 25;
    this.totalItems = 0;
    this.totalPages = 0;
    this.hasMoreData = true;
    // Toggle filter section
    this.isFilterCollapsed = true;
    this.Math = Math;
    this.user = this.b.getCurrentUser();
    this.searchControl = new _angular_forms__WEBPACK_IMPORTED_MODULE_10__.FormControl();
  }
  hasPermission(permissionTitle) {
    var _userObj$user;
    if (!this.user) {
      return false;
    }
    // Handle both UserApiResponse and User types
    const userObj = this.user;
    const roles = userObj.roles || ((_userObj$user = userObj.user) === null || _userObj$user === void 0 ? void 0 : _userObj$user.roles);
    if (!roles) {
      return false;
    }
    // Iterate through all roles and their permissions
    for (const role of roles) {
      if (role.permissions) {
        const hasPermission = role.permissions.some(permission => permission.title === permissionTitle);
        if (hasPermission) {
          return true;
        }
      }
    }
    return false;
  }
  ngOnInit() {
    var _this = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        yield _this.loadLocationData();
        yield _this.loadSurveyForms();
        yield _this.loadFiltersFromStorage();
        yield _this.load();
      } catch (error) {
        _this.womanList = [];
        _this.isLoading = false;
      }
    })();
  }
  showReport(type) {
    var _this2 = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      var _user$profile;
      const token = localStorage.getItem('token');
      const userJson = localStorage.getItem('user');
      const user = JSON.parse(userJson);
      const inf_id = user === null || user === void 0 || (_user$profile = user.profile) === null || _user$profile === void 0 || (_user$profile = _user$profile.default_inf) === null || _user$profile === void 0 ? void 0 : _user$profile.id;
      if (!token) return;
      const fullUrl = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_6__.hostLocal}/plw-register/${type}inf_id=${inf_id}&api_token=${token}`;
      const modal = yield _this2.modalCtrl.create({
        component: _components_report_modal_report_modal_component__WEBPACK_IMPORTED_MODULE_7__.ReportModalComponent,
        componentProps: {
          url: fullUrl,
          title: 'Mother Register'
        }
      });
      yield modal.present();
    })();
  }
  load(_x) {
    var _this3 = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (event, append = false) {
      try {
        var _this3$selectedBlock, _this3$selectedSurvey;
        if (!append) {
          _this3.isLoading = true;
        }
        // Extract sub-block IDs from selected sub-blocks
        const subBlockIds = _this3.selectedSubBlocks.length > 0 ? _this3.selectedSubBlocks.map(sb => sb.id) : null;
        const response = yield _this3.api.allWomanWithPagination(_this3.currentPage, _this3.pageSize, _this3.searchTerm, (_this3$selectedBlock = _this3.selectedBlock) === null || _this3$selectedBlock === void 0 ? void 0 : _this3$selectedBlock.id, subBlockIds, _this3.selectedStatus, _this3.selectedMotherSupportStatus, _this3.selectedNextVisitDate, _this3.selectedHasDisability, _this3.selectedVerified, (_this3$selectedSurvey = _this3.selectedSurveyForm) === null || _this3$selectedSurvey === void 0 ? void 0 : _this3$selectedSurvey.id);
        if (append) {
          // Append new data to existing list
          _this3.womanList = [..._this3.womanList, ...response.data.data];
          _this3.filteredList = _this3.womanList;
        } else {
          // Replace data (for initial load and filters)
          _this3.womanList = response.data.data;
          _this3.filteredList = _this3.womanList;
        }
        _this3.totalItems = response.data.total;
        _this3.currentPage = response.data.current_page;
        _this3.totalPages = response.data.last_page;
        // Check if more data is available
        _this3.hasMoreData = _this3.currentPage < _this3.totalPages;
      } catch (error) {
        if (!append) {
          _this3.womanList = [];
          _this3.filteredList = [];
        }
        _this3.b.errorToast('Failed to load mothers list');
      } finally {
        _this3.isLoading = false;
        if (event) {
          setTimeout(() => {
            event.target.complete();
          }, 100);
        }
      }
    }).apply(this, arguments);
  }
  loadLocationData() {
    var _this4 = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        const response = yield _this4.surveyApi.getLocationData();
        if (response.success) {
          _this4.blocks = response.data.blocks || [];
          _this4.allSubBlocks = response.data.sub_blocks || [];
          _this4.subBlocks = [];
        }
      } catch (error) {
        _this4.b.errorToast('Failed to load location data');
      }
    })();
  }
  loadSurveyForms() {
    var _this5 = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        const response = yield _this5.surveyApi.getAssessmentForms('plw,followup', 'all');
        if (response.success) {
          _this5.surveyForms = response.data;
        }
      } catch (error) {
        _this5.b.errorToast('Failed to load survey forms');
      }
    })();
  }
  toggleFilterSection() {
    this.isFilterCollapsed = !this.isFilterCollapsed;
  }
  onBlockChange() {
    this.selectedSubBlocks = [];
    if (this.selectedBlock) {
      this.subBlocks = this.allSubBlocks.filter(sb => sb.block_id === this.selectedBlock.block_id);
    } else {
      this.subBlocks = [];
    }
  }
  applyFilters() {
    this.currentPage = 1;
    this.hasMoreData = true;
    this.saveFiltersToStorage();
    this.load();
  }
  clearFilters() {
    this.selectedBlock = null;
    this.selectedSubBlocks = [];
    this.selectedStatus = null;
    this.selectedMotherSupportStatus = null;
    this.selectedNextVisitDate = null;
    this.selectedHasDisability = null;
    this.selectedVerified = null;
    this.selectedSurveyForm = null;
    this.searchTerm = '';
    this.subBlocks = [];
    this.currentPage = 1;
    this.hasMoreData = true;
    localStorage.removeItem('womanListFilters');
    this.load();
  }
  loadMore(event) {
    var _this6 = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      if (_this6.hasMoreData) {
        _this6.currentPage++;
        yield _this6.load(event, true);
      } else {
        event.target.complete();
      }
    })();
  }
  delete(id) {
    var _this7 = this;
    this.b.loadAlert('Delete Woman', 'Are you sure you want to delete?', /*#__PURE__*/(0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const result = yield _this7.api.deleteWoman(id);
      _this7.b.responseToast(result);
      if (result.success) {
        _this7.load();
      }
    }));
  }
  ionViewDidEnter() {
    if (this.router.snapshot.queryParamMap.get('reload')) {
      this.load();
    }
  }
  trackByWomenId(index, women) {
    return women.id;
  }
  saveFiltersToStorage() {
    var _this$selectedBlock, _this$selectedSurveyF;
    const filters = {
      selectedBlockId: (_this$selectedBlock = this.selectedBlock) === null || _this$selectedBlock === void 0 ? void 0 : _this$selectedBlock.id,
      selectedSubBlockIds: this.selectedSubBlocks.map(sb => sb.id),
      selectedStatus: this.selectedStatus,
      selectedMotherSupportStatus: this.selectedMotherSupportStatus,
      selectedNextVisitDate: this.selectedNextVisitDate,
      selectedHasDisability: this.selectedHasDisability,
      selectedVerified: this.selectedVerified,
      selectedSurveyFormId: (_this$selectedSurveyF = this.selectedSurveyForm) === null || _this$selectedSurveyF === void 0 ? void 0 : _this$selectedSurveyF.id,
      searchTerm: this.searchTerm,
      pageSize: this.pageSize
    };
    localStorage.setItem('womanListFilters', JSON.stringify(filters));
  }
  loadFiltersFromStorage() {
    var _this8 = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const savedFilters = localStorage.getItem('womanListFilters');
      if (savedFilters) {
        const filters = JSON.parse(savedFilters);
        // Restore block by ID
        if (filters.selectedBlockId) {
          _this8.selectedBlock = _this8.blocks.find(b => b.id === filters.selectedBlockId) || null;
        } else {
          _this8.selectedBlock = null;
        }
        // Update sub-blocks based on selected block
        if (_this8.selectedBlock && _this8.allSubBlocks.length > 0) {
          _this8.subBlocks = _this8.allSubBlocks.filter(sb => sb.block_id === _this8.selectedBlock.block_id);
          // Restore selected sub-blocks by IDs
          if (filters.selectedSubBlockIds && filters.selectedSubBlockIds.length > 0) {
            _this8.selectedSubBlocks = _this8.subBlocks.filter(sb => filters.selectedSubBlockIds.includes(sb.id));
          } else {
            _this8.selectedSubBlocks = [];
          }
        } else {
          _this8.subBlocks = [];
          _this8.selectedSubBlocks = [];
        }
        // Restore survey form by ID
        if (filters.selectedSurveyFormId) {
          _this8.selectedSurveyForm = _this8.surveyForms.find(f => f.id === filters.selectedSurveyFormId) || null;
        } else {
          _this8.selectedSurveyForm = null;
        }
        _this8.selectedStatus = filters.selectedStatus || null;
        _this8.selectedMotherSupportStatus = filters.selectedMotherSupportStatus || null;
        _this8.selectedNextVisitDate = filters.selectedNextVisitDate || null;
        _this8.selectedHasDisability = filters.selectedHasDisability || null;
        _this8.selectedVerified = filters.selectedVerified || null;
        _this8.searchTerm = filters.searchTerm || '';
        _this8.pageSize = filters.pageSize || 25;
      }
    })();
  }
  scanQRCode() {
    var _this9 = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        // Check current permission status first
        const permissionStatus = yield _capacitor_mlkit_barcode_scanning__WEBPACK_IMPORTED_MODULE_9__.BarcodeScanner.checkPermissions();
        if (permissionStatus.camera === 'denied') {
          // Show alert explaining why permission is needed
          _this9.b.loadAlert('Camera Permission Required', 'Camera access is needed to scan QR codes. Please grant camera permission in your device settings to use this feature.', /*#__PURE__*/(0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
            // Request permissions
            const {
              camera
            } = yield _capacitor_mlkit_barcode_scanning__WEBPACK_IMPORTED_MODULE_9__.BarcodeScanner.requestPermissions();
            if (camera === 'granted' || camera === 'limited') {
              yield _this9.performScan();
            } else {
              _this9.b.toast('Camera permission is required to scan QR codes');
            }
          }));
          return;
        }
        // If permission not determined yet, request it
        if (permissionStatus.camera === 'prompt' || permissionStatus.camera === 'prompt-with-rationale') {
          const {
            camera
          } = yield _capacitor_mlkit_barcode_scanning__WEBPACK_IMPORTED_MODULE_9__.BarcodeScanner.requestPermissions();
          if (camera !== 'granted' && camera !== 'limited') {
            _this9.b.toast('Camera permission is required to scan QR codes');
            return;
          }
        }
        // If we have permission, proceed with scanning
        if (permissionStatus.camera === 'granted' || permissionStatus.camera === 'limited') {
          yield _this9.performScan();
        }
      } catch (error) {
        _this9.b.errorToast('Failed to scan QR code. Please try again.');
      }
    })();
  }
  performScan() {
    var _this0 = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        // Configure scanner with optimized settings for better angle tolerance
        const result = yield _capacitor_mlkit_barcode_scanning__WEBPACK_IMPORTED_MODULE_9__.BarcodeScanner.scan({
          formats: [] // Scan all formats, but we'll validate the result
        });
        if (result.barcodes && result.barcodes.length > 0) {
          const barcode = result.barcodes[0];
          const scannedValue = barcode.rawValue;
          // Validate scanned value before using it
          if (!scannedValue || scannedValue.trim() === '') {
            _this0.b.toast('Invalid barcode data. Please scan again at a proper angle.');
            return;
          }
          // Trim whitespace that might come from angle-based misreads
          const cleanValue = scannedValue.trim();
          // FCN-specific validation: Must be exactly 6 digits
          const fcnPattern = /^\d{6}$/;
          if (!fcnPattern.test(cleanValue)) {
            _this0.b.toast('Invalid FCN format. Please scan a 6-digit numeric code.');
            return;
          }
          // Check if barcode was severely distorted (optional advanced check)
          if (barcode.cornerPoints && barcode.cornerPoints.length === 4) {
            const isDistorted = _this0.checkBarcodeDistortion(barcode.cornerPoints);
            if (isDistorted) {
              _this0.b.toast('Barcode appears distorted. Please scan at a better angle.');
              return;
            }
          }
          // Set the scanned value as search term (FCN validated)
          _this0.searchTerm = cleanValue;
          // Trigger search
          _this0.currentPage = 1;
          _this0.load();
          _this0.b.toast(`FCN ${cleanValue} scanned successfully`);
        } else {
          _this0.b.toast('No QR code detected. Please try again.');
        }
      } catch (error) {
        _this0.b.errorToast('Failed to scan QR code');
      }
    })();
  }
  /**
   * Check if barcode appears heavily distorted based on corner points
   * Returns true if the barcode should be rejected due to poor angle
   */
  checkBarcodeDistortion(cornerPoints) {
    if (!cornerPoints || cornerPoints.length !== 4) return false;
    // Calculate the angles of the four corners
    // A properly scanned QR code should be roughly square-shaped
    const [tl, tr, br, bl] = cornerPoints;
    // Calculate distances between corners
    const topWidth = Math.sqrt(Math.pow(tr.x - tl.x, 2) + Math.pow(tr.y - tl.y, 2));
    const bottomWidth = Math.sqrt(Math.pow(br.x - bl.x, 2) + Math.pow(br.y - bl.y, 2));
    const leftHeight = Math.sqrt(Math.pow(bl.x - tl.x, 2) + Math.pow(bl.y - tl.y, 2));
    const rightHeight = Math.sqrt(Math.pow(br.x - tr.x, 2) + Math.pow(br.y - tr.y, 2));
    // Check aspect ratio distortion
    // If top/bottom widths differ by more than 40%, it's too skewed
    const widthRatio = Math.min(topWidth, bottomWidth) / Math.max(topWidth, bottomWidth);
    const heightRatio = Math.min(leftHeight, rightHeight) / Math.max(leftHeight, rightHeight);
    // Reject if heavily distorted (less than 60% similarity)
    if (widthRatio < 0.6 || heightRatio < 0.6) {
      return true;
    }
    // Check if shape is roughly rectangular (width vs height should be similar for QR codes)
    const avgWidth = (topWidth + bottomWidth) / 2;
    const avgHeight = (leftHeight + rightHeight) / 2;
    const aspectRatio = Math.min(avgWidth, avgHeight) / Math.max(avgWidth, avgHeight);
    // For QR codes, aspect ratio should be close to 1:1
    // Allow some tolerance but reject if too stretched
    if (aspectRatio < 0.5) {
      return true;
    }
    return false;
  }
}, _WomanListPage.ctorParameters = () => [{
  type: _services_woman_api_service__WEBPACK_IMPORTED_MODULE_3__.WomanAPIService
}, {
  type: src_app_util_baseHelper__WEBPACK_IMPORTED_MODULE_4__.BaseHelper
}, {
  type: _angular_router__WEBPACK_IMPORTED_MODULE_11__.ActivatedRoute
}, {
  type: src_app_services_permission_service__WEBPACK_IMPORTED_MODULE_5__.PermissionService
}, {
  type: _angular_platform_browser__WEBPACK_IMPORTED_MODULE_12__.DomSanitizer
}, {
  type: _ionic_angular__WEBPACK_IMPORTED_MODULE_13__.ModalController
}, {
  type: src_app_services_survey_form_api_service__WEBPACK_IMPORTED_MODULE_8__.SurveyFormAPIService
}], _WomanListPage);
WomanListPage = (0,tslib__WEBPACK_IMPORTED_MODULE_14__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_15__.Component)({
  selector: 'app-woman-list',
  template: _woman_list_page_html_ngResource__WEBPACK_IMPORTED_MODULE_1__,
  styles: [(_woman_list_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2___default())]
})], WomanListPage);


/***/ }),

/***/ 53327:
/*!******************************************************************!*\
  !*** ./src/app/pages/woman-list/woman-list.page.scss?ngResource ***!
  \******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Imports
var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 53142);
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ 35950);
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);
// Module
___CSS_LOADER_EXPORT___.push([module.id, `.viewport {
  height: 1100px; /* or any value appropriate for your needs */
  width: 100%;
  overflow: auto; /* Make sure scrolling works */
}

:host {
  --ion-background-color: #f8f9fa;
  --ion-color-light: #f8f9fa;
  --ion-color-primary: #3880ff;
  --ion-color-secondary: #1eb0c4;
  --ion-color-tertiary: #7854e4;
  --ion-color-warning: #ffce00;
  --ion-color-danger: #f04141;
  --ion-color-dark: #222428;
  --ion-color-purple: #8836ca;
  --card-border-radius: 16px;
  --card-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

ion-toolbar {
  --background: #ffffff;
  --border-style: none;
}

.search-container {
  margin-top: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.search-container ion-searchbar {
  flex: 1;
}
.search-container .qr-scan-button {
  --padding-start: 12px;
  --padding-end: 12px;
  height: 44px;
}
.search-container .qr-scan-button ion-icon {
  font-size: 24px;
}
.search-container .scan-hint {
  position: absolute;
  right: 8px;
  bottom: -18px;
  font-size: 10px;
  color: var(--ion-color-medium);
  font-style: italic;
}

ion-searchbar {
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --border-radius: 12px;
  --background: #ffffff;
  --color: var(--ion-color-dark);
  --placeholder-color: var(--ion-color-medium);
  --icon-color: var(--ion-color-primary);
  padding: 0;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.list-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--ion-color-dark);
  margin: 0;
}

.plw-viewport {
  height: calc(100vh - 180px);
  width: 100%;
}

.plw-card {
  margin-bottom: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  overflow: hidden;
}

.card-header {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.plw-name-container {
  display: flex;
  align-items: center;
}

.plw-name {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  margin-right: 10px;
}

.plw-name.verified-name {
  font-weight: 700;
  color: #28a745;
}

.camp-info {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--ion-color-medium);
}

.camp-info ion-icon {
  margin-right: 4px;
}

.identifiers {
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background-color: rgba(var(--ion-color-light-rgb), 0.5);
}

.id-item {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
}

.id-label {
  font-size: 11px;
  color: var(--ion-color-medium);
  margin-bottom: 2px;
}

.id-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--ion-color-dark);
}

.card-actions {
  display: flex;
  padding: 6px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  overflow-x: auto;
}

.card-actions ion-button {
  flex: 1;
  font-size: 12px;
  --padding-start: 6px;
  --padding-end: 6px;
  height: 34px;
}

.card-actions ion-button ion-icon {
  margin-right: 4px;
}

/* Tablet view - ensure filters display like desktop */
@media (min-width: 577px) and (max-width: 991px) {
  .filters-card ion-row ion-col[size="12"] {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}
/* Responsive adjustments */
@media (max-width: 576px) {
  .id-item {
    min-width: 100px;
  }
  .card-actions ion-button {
    font-size: 11px;
  }
}
/* Scrollbar styling */
.plw-viewport::-webkit-scrollbar {
  width: 8px;
}

.plw-viewport::-webkit-scrollbar-track {
  background: transparent;
}

.plw-viewport::-webkit-scrollbar-thumb {
  background-color: rgba(var(--ion-color-medium-rgb), 0.3);
  border-radius: 4px;
}

/* Filters Card */
.filters-card {
  margin-bottom: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filters-card ion-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
}

.filters-card ion-card-subtitle {
  margin-top: 0.5rem;
  color: var(--ion-color-medium);
  font-size: 0.9rem;
}

.form-item {
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.form-item ion-label {
  font-weight: 500;
  color: var(--ion-color-dark);
}
.form-item ion-note {
  font-size: 12px;
  margin-top: 4px;
}
.form-item ion-note[slot=helper] {
  color: var(--ion-color-medium);
}
.form-item ion-note[slot=error] {
  color: var(--ion-color-danger);
}
.form-item ion-select {
  width: 100%;
}

.beneficiary-search {
  --background: rgba(var(--ion-color-dark-rgb), 0.08);
  --border-radius: 8px;
  --box-shadow: 0 2px 4px rgba(0,0,0,0.12);
  --color: var(--ion-color-dark);
  --placeholder-color: var(--ion-color-medium);
  --icon-color: var(--ion-color-medium);
  margin: 0;
  font-size: 0.9rem;
  border: 1px solid rgba(var(--ion-color-dark-rgb), 0.1);
}
.beneficiary-search.searchbar-has-value {
  --background: var(--ion-color-primary-tint);
  --color: var(--ion-color-primary-contrast);
  --placeholder-color: rgba(var(--ion-color-primary-contrast-rgb), 0.6);
  --icon-color: var(--ion-color-primary-contrast);
}

.action-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
}
.action-buttons ion-button {
  flex: 1;
}
.action-buttons ion-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Pagination Styles */
.pagination-card {
  margin-top: 20px;
  margin-bottom: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px;
}

.page-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0 12px;
}

.page-info span {
  font-size: 14px;
  font-weight: 600;
  color: var(--ion-color-dark);
}

.page-info ion-select {
  font-size: 12px;
  max-width: 150px;
}

.pagination-info {
  text-align: center;
  font-size: 13px;
  color: var(--ion-color-medium);
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.women-list {
  margin-bottom: 20px;
}

/* Responsive pagination */
@media (max-width: 576px) {
  .pagination-controls {
    flex-wrap: wrap;
  }
  .page-info {
    flex-direction: row;
    gap: 8px;
  }
}`, "",{"version":3,"sources":["webpack://./src/app/pages/woman-list/woman-list.page.scss"],"names":[],"mappings":"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","sourcesContent":[".viewport {\n  height: 1100px; /* or any value appropriate for your needs */\n  width: 100%;\n  overflow: auto; /* Make sure scrolling works */\n}\n\n:host {\n  --ion-background-color: #f8f9fa;\n  --ion-color-light: #f8f9fa;\n  --ion-color-primary: #3880ff;\n  --ion-color-secondary: #1eb0c4;\n  --ion-color-tertiary: #7854e4;\n  --ion-color-warning: #ffce00;\n  --ion-color-danger: #f04141;\n  --ion-color-dark: #222428;\n  --ion-color-purple: #8836ca;\n  --card-border-radius: 16px;\n  --card-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n}\n\nion-toolbar {\n  --background: #ffffff;\n  --border-style: none;\n}\n\n.search-container {\n  margin-top: 10px;\n  margin-bottom: 20px;\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  position: relative;\n\n  ion-searchbar {\n    flex: 1;\n  }\n\n  .qr-scan-button {\n    --padding-start: 12px;\n    --padding-end: 12px;\n    height: 44px;\n\n    ion-icon {\n      font-size: 24px;\n    }\n  }\n\n  .scan-hint {\n    position: absolute;\n    right: 8px;\n    bottom: -18px;\n    font-size: 10px;\n    color: var(--ion-color-medium);\n    font-style: italic;\n  }\n}\n\nion-searchbar {\n  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);\n  --border-radius: 12px;\n  --background: #ffffff;\n  --color: var(--ion-color-dark);\n  --placeholder-color: var(--ion-color-medium);\n  --icon-color: var(--ion-color-primary);\n  padding: 0;\n}\n\n.list-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 16px;\n}\n\n.list-header h2 {\n  font-size: 20px;\n  font-weight: 600;\n  color: var(--ion-color-dark);\n  margin: 0;\n}\n\n.plw-viewport {\n  height: calc(100vh - 180px);\n  width: 100%;\n}\n\n.plw-card {\n  margin-bottom: 16px;\n  border-radius: 12px;\n  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);\n  background-color: #ffffff;\n  overflow: hidden;\n}\n\n.card-header {\n  padding: 12px;\n  display: flex;\n  justify-content: space-between;\n  align-items: flex-start;\n  border-bottom: 1px solid rgba(0, 0, 0, 0.05);\n}\n\n.plw-name-container {\n  display: flex;\n  align-items: center;\n}\n\n.plw-name {\n  margin: 0;\n  font-size: 18px;\n  font-weight: 600;\n  margin-right: 10px;\n}\n\n.plw-name.verified-name {\n  font-weight: 700;\n  color: #28a745;\n}\n\n.camp-info {\n  display: flex;\n  align-items: center;\n  font-size: 14px;\n  color: var(--ion-color-medium);\n}\n\n.camp-info ion-icon {\n  margin-right: 4px;\n}\n\n.identifiers {\n  padding: 12px;\n  display: flex;\n  flex-wrap: wrap;\n  gap: 10px;\n  background-color: rgba(var(--ion-color-light-rgb), 0.5);\n}\n\n.id-item {\n  flex: 1;\n  min-width: 120px;\n  display: flex;\n  flex-direction: column;\n}\n\n.id-label {\n  font-size: 11px;\n  color: var(--ion-color-medium);\n  margin-bottom: 2px;\n}\n\n.id-value {\n  font-size: 13px;\n  font-weight: 600;\n  color: var(--ion-color-dark);\n}\n\n.card-actions {\n  display: flex;\n  padding: 6px;\n  border-top: 1px solid rgba(0, 0, 0, 0.05);\n  overflow-x: auto;\n}\n\n.card-actions ion-button {\n  flex: 1;\n  font-size: 12px;\n  --padding-start: 6px;\n  --padding-end: 6px;\n  height: 34px;\n}\n\n.card-actions ion-button ion-icon {\n  margin-right: 4px;\n}\n\n/* Tablet view - ensure filters display like desktop */\n@media (min-width: 577px) and (max-width: 991px) {\n  .filters-card {\n    ion-row {\n      ion-col {\n        // Override any single column layout\n        &[size=\"12\"] {\n          flex: 0 0 50% !important;\n          max-width: 50% !important;\n        }\n      }\n    }\n  }\n}\n\n/* Responsive adjustments */\n@media (max-width: 576px) {\n  .id-item {\n    min-width: 100px;\n  }\n\n  .card-actions ion-button {\n    font-size: 11px;\n  }\n}\n\n/* Scrollbar styling */\n.plw-viewport::-webkit-scrollbar {\n  width: 8px;\n}\n\n.plw-viewport::-webkit-scrollbar-track {\n  background: transparent;\n}\n\n.plw-viewport::-webkit-scrollbar-thumb {\n  background-color: rgba(var(--ion-color-medium-rgb), 0.3);\n  border-radius: 4px;\n}\n\n/* Filters Card */\n.filters-card {\n  margin-bottom: 20px;\n  border-radius: 12px;\n  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);\n}\n\n.filters-card ion-card-title {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  font-size: 18px;\n  font-weight: 600;\n}\n\n.filters-card ion-card-subtitle {\n  margin-top: 0.5rem;\n  color: var(--ion-color-medium);\n  font-size: 0.9rem;\n}\n\n.form-item {\n  margin-bottom: 16px;\n  border-radius: 8px;\n  border: 1px solid rgba(0, 0, 0, 0.08);\n\n  ion-label {\n    font-weight: 500;\n    color: var(--ion-color-dark);\n  }\n\n  ion-note {\n    font-size: 12px;\n    margin-top: 4px;\n\n    &[slot=\"helper\"] {\n      color: var(--ion-color-medium);\n    }\n\n    &[slot=\"error\"] {\n      color: var(--ion-color-danger);\n    }\n  }\n\n  ion-select {\n    width: 100%;\n  }\n}\n\n.beneficiary-search {\n  --background: rgba(var(--ion-color-dark-rgb), 0.08);\n  --border-radius: 8px;\n  --box-shadow: 0 2px 4px rgba(0,0,0,0.12);\n  --color: var(--ion-color-dark);\n  --placeholder-color: var(--ion-color-medium);\n  --icon-color: var(--ion-color-medium);\n  margin: 0;\n  font-size: 0.9rem;\n  border: 1px solid rgba(var(--ion-color-dark-rgb), 0.1);\n\n  &.searchbar-has-value {\n    --background: var(--ion-color-primary-tint);\n    --color: var(--ion-color-primary-contrast);\n    --placeholder-color: rgba(var(--ion-color-primary-contrast-rgb), 0.6);\n    --icon-color: var(--ion-color-primary-contrast);\n  }\n}\n\n.action-buttons {\n  margin-top: 1.5rem;\n  display: flex;\n  gap: 0.5rem;\n\n  ion-button {\n    flex: 1;\n  }\n\n  ion-button[disabled] {\n    opacity: 0.5;\n    cursor: not-allowed;\n  }\n}\n\n/* Pagination Styles */\n.pagination-card {\n  margin-top: 20px;\n  margin-bottom: 20px;\n  border-radius: 12px;\n  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);\n}\n\n.pagination-controls {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  gap: 8px;\n  padding: 12px;\n}\n\n.page-info {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 4px;\n  margin: 0 12px;\n}\n\n.page-info span {\n  font-size: 14px;\n  font-weight: 600;\n  color: var(--ion-color-dark);\n}\n\n.page-info ion-select {\n  font-size: 12px;\n  max-width: 150px;\n}\n\n.pagination-info {\n  text-align: center;\n  font-size: 13px;\n  color: var(--ion-color-medium);\n  padding-top: 8px;\n  border-top: 1px solid rgba(0, 0, 0, 0.05);\n}\n\n.women-list {\n  margin-bottom: 20px;\n}\n\n/* Responsive pagination */\n@media (max-width: 576px) {\n  .pagination-controls {\n    flex-wrap: wrap;\n  }\n\n  .page-info {\n    flex-direction: row;\n    gap: 8px;\n  }\n}\n"],"sourceRoot":""}]);
// Exports
module.exports = ___CSS_LOADER_EXPORT___.toString();


/***/ }),

/***/ 46887:
/*!******************************************************************!*\
  !*** ./src/app/pages/woman-list/woman-list.page.html?ngResource ***!
  \******************************************************************/
/***/ ((module) => {

"use strict";
module.exports = "<ion-header class=\"ion-no-border\">\n  <ion-toolbar>\n    <ion-buttons slot=\"start\">\n      <ion-menu-button></ion-menu-button>\n    </ion-buttons>\n    <ion-title>Mother</ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<!-- Mother Register Section - Moved to unified register page -->\n<!-- <ion-card class=\"ion-padding\">\n  <ion-card-header>\n    <ion-card-title>Mother Register</ion-card-title>\n  </ion-card-header>\n  <ion-card-content>\n    <ion-row>\n      <ion-col size=\"3\">\n        <ion-button color=\"success\" expand=\"block\" (click)=\"showReport('bsfp?is_pregnant=no&')\">BSFP LW</ion-button>\n      </ion-col>\n      <ion-col size=\"3\">\n        <ion-button color=\"primary\" expand=\"block\" (click)=\"showReport('bsfp?is_pregnant=yes&')\">BSFP PW</ion-button>\n      </ion-col>\n      <ion-col size=\"3\">\n        <ion-button color=\"warning\" expand=\"block\" (click)=\"showReport('tsfp?')\">TSFP</ion-button>\n      </ion-col>\n      <ion-col size=\"3\">\n        <ion-button color=\"purple\" expand=\"block\" (click)=\"showReport('iycf?')\">IYCF</ion-button>\n      </ion-col>\n    </ion-row>\n  </ion-card-content>\n</ion-card> -->\n\n<ion-content class=\"ion-padding-horizontal\">\n  <ion-refresher slot=\"fixed\" (ionRefresh)=\"load($event)\">\n    <ion-refresher-content></ion-refresher-content>\n  </ion-refresher>\n\n  <ng-container *ngIf=\"womanList; else skeleton\">\n    <!-- Filters Section -->\n    <ion-card class=\"filters-card\">\n      <ion-card-header (click)=\"toggleFilterSection()\" style=\"cursor: pointer;\">\n        <ion-card-title style=\"display: flex; align-items: center; justify-content: space-between;\">\n          <div style=\"display: flex; align-items: center; gap: 8px;\">\n            <ion-icon name=\"filter-outline\" color=\"primary\"></ion-icon>\n            <span>Filters</span>\n          </div>\n          <ion-icon [name]=\"isFilterCollapsed ? 'chevron-down-outline' : 'chevron-up-outline'\" color=\"medium\"></ion-icon>\n        </ion-card-title>\n        <ion-card-subtitle>Filter mothers by location and status</ion-card-subtitle>\n      </ion-card-header>\n      <ion-card-content *ngIf=\"!isFilterCollapsed\">\n        <ion-row>\n          <!-- Next Visit Date -->\n          <ion-col size=\"12\" size-md=\"6\">\n            <ion-item class=\"form-item\">\n              <ion-icon slot=\"start\" name=\"time-outline\" color=\"primary\"></ion-icon>\n              <ion-label position=\"stacked\">Planned Visit Date</ion-label>\n              <ion-input\n                type=\"date\"\n                [(ngModel)]=\"selectedNextVisitDate\"\n                placeholder=\"Select date\">\n              </ion-input>\n              <ion-button slot=\"end\" fill=\"clear\" size=\"small\" (click)=\"selectedNextVisitDate = null\" *ngIf=\"selectedNextVisitDate\">\n                <ion-icon name=\"close-circle\" color=\"medium\"></ion-icon>\n              </ion-button>\n            </ion-item>\n          </ion-col>\n\n          <!-- Follow Up Service -->\n          <ion-col size=\"12\" size-md=\"6\">\n            <ion-item class=\"form-item\">\n              <ion-icon slot=\"start\" name=\"document-text-outline\" color=\"primary\"></ion-icon>\n              <ion-label position=\"stacked\">Follow Up Service</ion-label>\n              <ion-select interface=\"action-sheet\" [(ngModel)]=\"selectedSurveyForm\" placeholder=\"Select follow up service\">\n                <ion-select-option [value]=\"null\">All</ion-select-option>\n                <ion-select-option *ngFor=\"let form of surveyForms\" [value]=\"form\">\n                  {{ form.title }}\n                </ion-select-option>\n              </ion-select>\n              <ion-note slot=\"helper\">\n                Filter mothers with active follow-up visits\n              </ion-note>\n            </ion-item>\n          </ion-col>\n        </ion-row>\n\n        <ion-row>\n          <!-- Verified Status -->\n          <ion-col size=\"12\" size-md=\"6\">\n            <ion-item class=\"form-item\">\n              <ion-icon slot=\"start\" name=\"checkmark-circle-outline\" color=\"primary\"></ion-icon>\n              <ion-label position=\"stacked\">Verified Status</ion-label>\n              <ion-select interface=\"action-sheet\" [(ngModel)]=\"selectedVerified\" placeholder=\"Select verified status\">\n                <ion-select-option [value]=\"null\">All</ion-select-option>\n                <ion-select-option value=\"true\">Verified</ion-select-option>\n                <ion-select-option value=\"false\">Not Verified</ion-select-option>\n              </ion-select>\n            </ion-item>\n          </ion-col>\n\n          <!-- Has Disability -->\n          <ion-col size=\"12\" size-md=\"6\">\n            <ion-item class=\"form-item\">\n              <ion-icon slot=\"start\" name=\"accessibility-outline\" color=\"primary\"></ion-icon>\n              <ion-label position=\"stacked\">Has Disability</ion-label>\n              <ion-select interface=\"action-sheet\" [(ngModel)]=\"selectedHasDisability\" placeholder=\"Select disability status\">\n                <ion-select-option [value]=\"null\">All</ion-select-option>\n                <ion-select-option value=\"Yes\">Yes</ion-select-option>\n                <ion-select-option value=\"No\">No</ion-select-option>\n              </ion-select>\n            </ion-item>\n          </ion-col>\n        </ion-row>\n\n        <ion-row>\n          <!-- Block Selection -->\n          <ion-col size=\"12\" size-md=\"6\">\n            <ion-item class=\"form-item\">\n              <ion-icon slot=\"start\" name=\"location-outline\" color=\"primary\"></ion-icon>\n              <ion-label position=\"stacked\">Block</ion-label>\n              <ion-select interface=\"action-sheet\" [(ngModel)]=\"selectedBlock\" (ionChange)=\"onBlockChange()\" placeholder=\"Select block\">\n                <ion-select-option [value]=\"null\">All Blocks</ion-select-option>\n                <ion-select-option *ngFor=\"let block of blocks\" [value]=\"block\">\n                  {{ block.title }}\n                </ion-select-option>\n              </ion-select>\n            </ion-item>\n          </ion-col>\n\n          <!-- Sub-Block Selection (Multi-select) -->\n          <ion-col size=\"12\" size-md=\"6\">\n            <ion-item class=\"form-item\">\n              <ion-icon slot=\"start\" name=\"grid-outline\" color=\"primary\"></ion-icon>\n              <ion-label position=\"stacked\">Sub-Blocks</ion-label>\n              <ion-select interface=\"action-sheet\" [(ngModel)]=\"selectedSubBlocks\" multiple=\"true\" [disabled]=\"!selectedBlock\" placeholder=\"Select sub-blocks\">\n                <ion-select-option *ngFor=\"let subBlock of subBlocks\" [value]=\"subBlock\">\n                  {{ subBlock.title }}\n                </ion-select-option>\n              </ion-select>\n              <ion-note slot=\"helper\" *ngIf=\"selectedBlock\">\n                Select multiple sub-blocks or leave empty for all\n              </ion-note>\n            </ion-item>\n          </ion-col>\n        </ion-row>\n\n        <ion-row>\n          <!-- Status Selection -->\n          <ion-col size=\"12\" size-md=\"6\">\n            <ion-item class=\"form-item\">\n              <ion-icon slot=\"start\" name=\"heart-outline\" color=\"primary\"></ion-icon>\n              <ion-label position=\"stacked\">Status</ion-label>\n              <ion-select interface=\"action-sheet\" [(ngModel)]=\"selectedStatus\" placeholder=\"Select status\">\n                <ion-select-option [value]=\"null\">All Status</ion-select-option>\n                <ion-select-option value=\"pregnant\">Pregnant</ion-select-option>\n                <ion-select-option value=\"lactating\">Lactating</ion-select-option>\n                <ion-select-option value=\"both\">Both (P & L)</ion-select-option>\n                <ion-select-option value=\"none\">None</ion-select-option>\n              </ion-select>\n            </ion-item>\n          </ion-col>\n\n          <!-- Mother Support Status -->\n          <ion-col size=\"12\" size-md=\"6\">\n            <ion-item class=\"form-item\">\n              <ion-icon slot=\"start\" name=\"shield-checkmark-outline\" color=\"primary\"></ion-icon>\n              <ion-label position=\"stacked\">Mother Support Status</ion-label>\n              <ion-select interface=\"action-sheet\" [(ngModel)]=\"selectedMotherSupportStatus\" placeholder=\"Select support status\">\n                <ion-select-option [value]=\"null\">All</ion-select-option>\n                <ion-select-option value=\"yes\">Has Support</ion-select-option>\n                <ion-select-option value=\"no\">No Support</ion-select-option>\n              </ion-select>\n            </ion-item>\n          </ion-col>\n        </ion-row>\n      </ion-card-content>\n\n      <!-- Search Input -->\n      <div class=\"search-container\">\n        <ion-searchbar\n          [(ngModel)]=\"searchTerm\"\n          placeholder=\"Search by name, ID or FCN...\"\n          show-clear-button=\"focus\"\n          class=\"beneficiary-search\">\n        </ion-searchbar>\n        <ion-button fill=\"clear\" (click)=\"scanQRCode()\" class=\"qr-scan-button\">\n          <ion-icon slot=\"icon-only\" name=\"qr-code-outline\"></ion-icon>\n        </ion-button>\n        <ion-note class=\"scan-hint\">Hold camera straight</ion-note>\n      </div>\n\n      <div class=\"action-buttons\">\n        <ion-button expand=\"block\" fill=\"clear\" (click)=\"clearFilters()\">\n          <ion-icon name=\"close-circle-outline\" slot=\"start\"></ion-icon>\n          Clear Filters\n        </ion-button>\n        <ion-button expand=\"block\" color=\"primary\" (click)=\"applyFilters()\">\n          <ion-icon name=\"search-outline\" slot=\"start\"></ion-icon>\n          Apply Filters\n        </ion-button>\n      </div>\n    </ion-card>\n\n    <!-- Results Header -->\n    <ion-card *ngIf=\"filteredList?.length > 0\">\n      <ion-card-header>\n        <div style=\"display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;\">\n          <div>\n            <ion-card-title>\n              <ion-icon name=\"people-outline\" color=\"tertiary\"></ion-icon>\n              Mother List ({{ totalItems }})\n            </ion-card-title>\n            <ion-card-subtitle>\n              Showing {{ ((currentPage - 1) * pageSize) + 1 }} to {{ Math.min(currentPage * pageSize, totalItems) }} of {{ totalItems }} mothers\n            </ion-card-subtitle>\n          </div>\n          <ion-button [routerLink]=\"b.routesConfig.plwAdd\" *ngIf=\"hasPermission('app-woman-add')\" color=\"primary\">\n            <ion-icon slot=\"start\" name=\"add-circle\"></ion-icon>\n            Add Mother\n          </ion-button>\n        </div>\n      </ion-card-header>\n    </ion-card>\n\n    <div class=\"women-list\">\n      <ion-card *ngFor=\"let woman of filteredList; trackBy: trackByWomenId\" class=\"plw-card\">\n        <div class=\"card-header\">\n          <div class=\"plw-name-container\">\n            <div style=\"display: flex; gap: 6px; align-items: center; flex-wrap: wrap;\">\n              <h2 class=\"plw-name\" style=\"margin: 0;\">{{woman.name}}</h2>\n              <ion-badge *ngIf=\"woman?.verified === 1\" color=\"success\" style=\"padding: 6px 12px; font-size: 12px; display: flex; align-items: center; gap: 4px;\">\n                <ion-icon name=\"shield-checkmark-outline\" style=\"font-size: 14px;\"></ion-icon>\n                Verified\n              </ion-badge>\n              <ion-badge color=\"tertiary\" *ngIf=\"woman?.is_pregnant == 'Yes'\" style=\"padding: 6px 12px; font-size: 12px; display: flex; align-items: center; gap: 4px;\">\n                <ion-icon name=\"woman-outline\" style=\"font-size: 14px;\"></ion-icon>\n                Pregnant\n              </ion-badge>\n              <ion-badge color=\"warning\" *ngIf=\"woman?.is_lactating == 'Yes'\" style=\"padding: 6px 12px; font-size: 12px; display: flex; align-items: center; gap: 4px;\">\n                <ion-icon name=\"nutrition-outline\" style=\"font-size: 14px;\"></ion-icon>\n                Lactating\n              </ion-badge>\n              <ion-badge\n                *ngFor=\"let programme of woman.ongoing_programme\"\n                [color]=\"programme === 'TSFP' ? 'warning' : programme === 'BSFP' ? 'success' : 'medium'\"\n                style=\"padding: 6px 12px; font-size: 12px; display: flex; align-items: center; gap: 4px;\">\n                <ion-icon name=\"fitness-outline\" style=\"font-size: 14px;\"></ion-icon>\n                {{programme}}\n              </ion-badge>\n              <ion-badge *ngIf=\"woman.has_disability === 'Yes'\" color=\"secondary\" style=\"padding: 6px 12px; font-size: 12px; display: flex; align-items: center; gap: 4px;\">\n                <ion-icon name=\"accessibility-outline\" style=\"font-size: 14px;\"></ion-icon>\n                Special Need\n              </ion-badge>\n            </div>\n          </div>\n        </div>\n\n        <div class=\"identifiers\">\n          <div class=\"id-item\">\n            <span class=\"id-label\">Progress ID</span>\n            <span class=\"id-value\">{{woman?.progress_id || 'N/A'}}</span>\n          </div>\n          <div class=\"id-item\">\n            <span class=\"id-label\">FCN</span>\n            <span class=\"id-value\">{{woman?.fcn || 'N/A'}}</span>\n          </div>\n          <div class=\"id-item\">\n            <span class=\"id-label\">MOHA ID</span>\n            <span class=\"id-value\">{{woman?.moha_id || 'N/A'}}</span>\n          </div>\n          <div class=\"id-item\">\n            <span class=\"id-label\">Scope ID</span>\n            <span class=\"id-value\">{{woman?.scope_no || 'N/A'}}</span>\n          </div>\n        </div>\n\n        <div class=\"card-actions\">\n          <ion-button fill=\"clear\" color=\"success\" [routerLink]=\"b.routesConfig.plwDetail + woman?.id\">\n            <ion-icon name=\"person-circle-outline\"></ion-icon>\n            <span>Profile</span>\n          </ion-button>\n\n          <ion-button fill=\"clear\" color=\"primary\" [routerLink]=\"['/plw-measurement-create', woman?.id]\" *ngIf=\"hasPermission('app-pbw-measurement-add')\">\n            <ion-icon name=\"fitness-outline\"></ion-icon>\n            <span>Measurement</span>\n          </ion-button>\n\n          <ion-button fill=\"clear\" color=\"tertiary\" [routerLink]=\"b.routesConfig.beneficiaryAssessment + woman?.id + '/plw'\" *ngIf=\"hasPermission('app-pbw-assessment-add')\">\n            <ion-icon name=\"list\"></ion-icon>\n            <span>Service</span>\n          </ion-button>\n\n          <ion-button fill=\"clear\" color=\"secondary\" [routerLink]=\"['/plw-distribution-create', woman?.id]\" *ngIf=\"hasPermission('app-pbw-distribution-add')\">\n            <ion-icon name=\"cube-outline\"></ion-icon>\n            <span>Distribution</span>\n          </ion-button>\n        </div>\n      </ion-card>\n    </div>\n\n    <!-- Infinite Scroll -->\n    <ion-infinite-scroll threshold=\"100px\" (ionInfinite)=\"loadMore($event)\" [disabled]=\"!hasMoreData\">\n      <ion-infinite-scroll-content\n        loadingSpinner=\"bubbles\"\n        loadingText=\"Loading more mothers...\">\n      </ion-infinite-scroll-content>\n    </ion-infinite-scroll>\n\n    <!-- End of list message -->\n    <ion-card *ngIf=\"!hasMoreData && filteredList?.length > 0\" class=\"end-message\">\n      <ion-card-content class=\"ion-text-center\">\n        <ion-text color=\"medium\">\n          <p>You've reached the end of the list ({{ totalItems }} total mothers)</p>\n        </ion-text>\n      </ion-card-content>\n    </ion-card>\n  </ng-container>\n\n  <ng-template #skeleton>\n    <app-skeleton></app-skeleton>\n  </ng-template>\n\n  <!-- Floating Action Button for Add Mother -->\n  <ion-fab slot=\"fixed\" vertical=\"bottom\" horizontal=\"end\" *ngIf=\"hasPermission('app-woman-add')\">\n    <ion-fab-button [routerLink]=\"b.routesConfig.plwAdd\" color=\"primary\">\n      <ion-icon name=\"add\"></ion-icon>\n    </ion-fab-button>\n  </ion-fab>\n</ion-content>\n";

/***/ })

}]);
//# sourceMappingURL=src_app_pages_woman-list_woman-list_module_ts.js.map