(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([["src_app_pages_location-update-woman_location-update-woman_module_ts"],{

/***/ 66703:
/*!*************************************************************************************!*\
  !*** ./src/app/pages/location-update-woman/location-update-woman-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 */   LocationUpdateWomanPageRoutingModule: () => (/* binding */ LocationUpdateWomanPageRoutingModule)
/* 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 _location_update_woman_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./location-update-woman.page */ 47137);




const routes = [{
  path: '',
  component: _location_update_woman_page__WEBPACK_IMPORTED_MODULE_0__.LocationUpdateWomanPage
}];
let LocationUpdateWomanPageRoutingModule = class LocationUpdateWomanPageRoutingModule {};
LocationUpdateWomanPageRoutingModule = (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]
})], LocationUpdateWomanPageRoutingModule);


/***/ }),

/***/ 5118:
/*!*****************************************************************************!*\
  !*** ./src/app/pages/location-update-woman/location-update-woman.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 */   LocationUpdateWomanPageModule: () => (/* binding */ LocationUpdateWomanPageModule)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ 24398);
/* 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 _angular_forms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/forms */ 34456);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ionic/angular */ 21507);
/* harmony import */ var _location_update_woman_routing_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./location-update-woman-routing.module */ 66703);
/* harmony import */ var _location_update_woman_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./location-update-woman.page */ 47137);
/* harmony import */ var src_app_components_shared_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/components/shared.module */ 47774);








let LocationUpdateWomanPageModule = class LocationUpdateWomanPageModule {};
LocationUpdateWomanPageModule = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_4__.NgModule)({
  imports: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.CommonModule, _angular_forms__WEBPACK_IMPORTED_MODULE_6__.FormsModule, _angular_forms__WEBPACK_IMPORTED_MODULE_6__.ReactiveFormsModule, _ionic_angular__WEBPACK_IMPORTED_MODULE_7__.IonicModule, _location_update_woman_routing_module__WEBPACK_IMPORTED_MODULE_0__.LocationUpdateWomanPageRoutingModule, src_app_components_shared_module__WEBPACK_IMPORTED_MODULE_2__.SharedModule],
  declarations: [_location_update_woman_page__WEBPACK_IMPORTED_MODULE_1__.LocationUpdateWomanPage]
})], LocationUpdateWomanPageModule);


/***/ }),

/***/ 47137:
/*!***************************************************************************!*\
  !*** ./src/app/pages/location-update-woman/location-update-woman.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 */   LocationUpdateWomanPage: () => (/* binding */ LocationUpdateWomanPage)
/* 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_9__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _location_update_woman_page_html_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./location-update-woman.page.html?ngResource */ 56675);
/* harmony import */ var _location_update_woman_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./location-update-woman.page.scss?ngResource */ 28263);
/* harmony import */ var _location_update_woman_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_location_update_woman_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var src_app_util_baseHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/util/baseHelper */ 76434);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/forms */ 34456);
/* harmony import */ var _services_location_api_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../services/location_api.service */ 89478);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/router */ 95072);
/* harmony import */ var src_app_util_utility__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/util/utility */ 89999);

var _LocationUpdateWomanPage;



/* eslint-disable max-len */
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable eqeqeq */






let LocationUpdateWomanPage = (_LocationUpdateWomanPage = class LocationUpdateWomanPage {
  constructor(api, activatedRoute, fb, b, change) {
    this.api = api;
    this.activatedRoute = activatedRoute;
    this.fb = fb;
    this.b = b;
    this.change = change;
    this.setUpForm();
    this.id = this.activatedRoute.snapshot.paramMap.get('id');
  }
  ngOnInit() {
    this.load();
  }
  setUpForm() {
    var _this$b$getCurrentUse;
    this.locationUpdateFrom = this.fb.group({
      hh_no: ['', [_angular_forms__WEBPACK_IMPORTED_MODULE_6__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_6__.Validators.pattern(src_app_util_utility__WEBPACK_IMPORTED_MODULE_5__.requiredPattern)]],
      modify_by: [((_this$b$getCurrentUse = this.b.getCurrentUser()) === null || _this$b$getCurrentUse === void 0 || (_this$b$getCurrentUse = _this$b$getCurrentUse.user) === null || _this$b$getCurrentUse === void 0 ? void 0 : _this$b$getCurrentUse.id) || ''],
      // Set to current user ID automatically
      block_id: ['', [_angular_forms__WEBPACK_IMPORTED_MODULE_6__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_6__.Validators.pattern(src_app_util_utility__WEBPACK_IMPORTED_MODULE_5__.numberIdPattern)]],
      sub_block_id: ['', [_angular_forms__WEBPACK_IMPORTED_MODULE_6__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_6__.Validators.pattern(src_app_util_utility__WEBPACK_IMPORTED_MODULE_5__.numberIdPattern)]]
    });
  }
  load() {
    var _this = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        var _this$locationPrerequ, _this$b$getCurrentUse3;
        const response = yield _this.api.womanLocationData(_this.id);
        _this.locationPrerequisiteData = response.data;
        // Handle case where woman has no current location
        if (!_this.locationPrerequisiteData.current_location) {
          var _this$b$getCurrentUse2;
          // Set modify_by to current user for new locations
          _this.locationUpdateFrom.patchValue({
            modify_by: ((_this$b$getCurrentUse2 = _this.b.getCurrentUser()) === null || _this$b$getCurrentUse2 === void 0 || (_this$b$getCurrentUse2 = _this$b$getCurrentUse2.user) === null || _this$b$getCurrentUse2 === void 0 ? void 0 : _this$b$getCurrentUse2.id) || ''
          });
          _this.change.markForCheck();
          return;
        }
        // For form population, convert block.id to block_majhi.id
        const currentBlockId = _this.locationPrerequisiteData.current_location.block_id;
        let blockMajhiId = null;
        if (currentBlockId && (_this$locationPrerequ = _this.locationPrerequisiteData.location) !== null && _this$locationPrerequ !== void 0 && _this$locationPrerequ.block_majhi) {
          const blockMajhi = _this.locationPrerequisiteData.location.block_majhi.find(bm => {
            var _bm$block;
            return ((_bm$block = bm.block) === null || _bm$block === void 0 ? void 0 : _bm$block.id) === currentBlockId;
          });
          blockMajhiId = blockMajhi ? blockMajhi.id : null;
        }
        const formData = {
          block_id: blockMajhiId,
          sub_block_id: _this.locationPrerequisiteData.current_location.sub_block_id || null,
          hh_no: _this.locationPrerequisiteData.current_location.hh_no || null,
          modify_by: ((_this$b$getCurrentUse3 = _this.b.getCurrentUser()) === null || _this$b$getCurrentUse3 === void 0 || (_this$b$getCurrentUse3 = _this$b$getCurrentUse3.user) === null || _this$b$getCurrentUse3 === void 0 ? void 0 : _this$b$getCurrentUse3.id) || '' // Always set to current user
        };
        // Populate form with converted data
        _this.locationUpdateFrom.patchValue(formData);
        _this.change.markForCheck();
      } catch (error) {
        _this.b.errorToast('Error loading location data');
      }
    })();
  }
  update(form) {
    var _this2 = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      if (form.valid) {
        // Additional validation checks
        if (!_this2.validateRequiredFields(form)) {
          return;
        }
        try {
          const response = yield _this2.api.updateWomanLocation(form.value, _this2.id);
          _this2.b.toast(response.message);
          _this2.b.navigateWithParam(_this2.b.routesConfig.plwDetail + _this2.id, {
            reload: true
          });
        } catch (error) {
          _this2.b.errorToast('Error updating location');
        }
      } else {
        _this2.markFormGroupTouched();
        _this2.b.errorToast('Please fill all required fields correctly');
      }
    })();
  }
  validateRequiredFields(form) {
    var _form$get, _form$get2, _form$get3;
    if (!((_form$get = form.get('block_id')) !== null && _form$get !== void 0 && _form$get.value)) {
      this.b.errorToast('Please select a block');
      return false;
    }
    if (!((_form$get2 = form.get('sub_block_id')) !== null && _form$get2 !== void 0 && _form$get2.value)) {
      this.b.errorToast('Please select a sub-block');
      return false;
    }
    if (!((_form$get3 = form.get('hh_no')) !== null && _form$get3 !== void 0 && _form$get3.value)) {
      this.b.errorToast('Please enter house hold number');
      return false;
    }
    return true;
  }
  markFormGroupTouched() {
    Object.keys(this.locationUpdateFrom.controls).forEach(key => {
      const control = this.locationUpdateFrom.get(key);
      control === null || control === void 0 || control.markAsTouched();
    });
    this.change.markForCheck();
  }
  // Helper method for back navigation
  getBackUrl() {
    return this.b.routesConfig.plwDetail + this.id;
  }
  // Location filtering methods for Block and SubBlock
  getBlocks() {
    var _this$locationPrerequ2;
    if (!((_this$locationPrerequ2 = this.locationPrerequisiteData) !== null && _this$locationPrerequ2 !== void 0 && (_this$locationPrerequ2 = _this$locationPrerequ2.location) !== null && _this$locationPrerequ2 !== void 0 && _this$locationPrerequ2.block_majhi)) return [];
    // Return block_majhi data directly - use block_majhi.id as the value, not block.id
    return this.locationPrerequisiteData.location.block_majhi.map(item => ({
      id: item.id,
      // Use block_majhi.id instead of item.block_id
      title: item.block.title
    }));
  }
  getSubBlock() {
    var _this$locationPrerequ3;
    if (!((_this$locationPrerequ3 = this.locationPrerequisiteData) !== null && _this$locationPrerequ3 !== void 0 && (_this$locationPrerequ3 = _this$locationPrerequ3.location) !== null && _this$locationPrerequ3 !== void 0 && _this$locationPrerequ3.sub_block_sub_majhi)) return [];
    const selectedBlockMajhiId = this.getFormFieldValue('block_id');
    if (!selectedBlockMajhiId) return [];
    // Find the corresponding block.id from the selected block_majhi.id
    const selectedBlockMajhi = this.locationPrerequisiteData.location.block_majhi.find(item => item.id === selectedBlockMajhiId);
    if (!selectedBlockMajhi) return [];
    const actualBlockId = selectedBlockMajhi.block.id;
    return this.locationPrerequisiteData.location.sub_block_sub_majhi.filter(item => item.block_id === actualBlockId).map(item => ({
      id: item.id,
      title: item.sub_block_title
    }));
  }
  // Event handlers for cascading dropdowns
  onBlockSelected() {
    this.resetFormFieldValue('sub_block_id');
  }
  onSubBlockSelected() {
    // No dependencies to reset for sub block
  }
  // Form utility methods
  getFormFieldValue(key) {
    var _this$locationUpdateF;
    return (_this$locationUpdateF = this.locationUpdateFrom.get(key)) === null || _this$locationUpdateF === void 0 ? void 0 : _this$locationUpdateF.value;
  }
  resetFormFieldValue(key) {
    var _this$locationUpdateF2;
    (_this$locationUpdateF2 = this.locationUpdateFrom.get(key)) === null || _this$locationUpdateF2 === void 0 || _this$locationUpdateF2.setValue(null);
  }
  // Confirmation and update
  confirmAndUpdate() {
    var _this3 = this;
    if (!this.locationUpdateFrom.valid) {
      this.markFormGroupTouched();
      this.b.errorToast('Please fill all required fields correctly');
      return;
    }
    this.b.loadAlert('Update Location', 'Are you sure you want to update the location information?', /*#__PURE__*/(0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      yield _this3.update(_this3.locationUpdateFrom);
    }));
  }
}, _LocationUpdateWomanPage.ctorParameters = () => [{
  type: _services_location_api_service__WEBPACK_IMPORTED_MODULE_4__.LocationAPIService
}, {
  type: _angular_router__WEBPACK_IMPORTED_MODULE_7__.ActivatedRoute
}, {
  type: _angular_forms__WEBPACK_IMPORTED_MODULE_6__.FormBuilder
}, {
  type: src_app_util_baseHelper__WEBPACK_IMPORTED_MODULE_3__.BaseHelper
}, {
  type: _angular_core__WEBPACK_IMPORTED_MODULE_8__.ChangeDetectorRef
}], _LocationUpdateWomanPage);
LocationUpdateWomanPage = (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_8__.Component)({
  selector: 'app-location-update-woman',
  template: _location_update_woman_page_html_ngResource__WEBPACK_IMPORTED_MODULE_1__,
  changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_8__.ChangeDetectionStrategy.OnPush,
  styles: [(_location_update_woman_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2___default())]
})], LocationUpdateWomanPage);


/***/ }),

/***/ 89478:
/*!**************************************************!*\
  !*** ./src/app/services/location_api.service.ts ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LocationAPIService: () => (/* binding */ LocationAPIService)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _api_base_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./api_base.service */ 70014);
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/environments/environment */ 45312);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ 70271);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ 61318);

/* eslint-disable @typescript-eslint/naming-convention */




let LocationAPIService = class LocationAPIService extends _api_base_service__WEBPACK_IMPORTED_MODULE_0__.APIBaseService {
  constructor() {
    super(...arguments);
    this.namespace_children = '/children-location';
    this.namespace_woman = '/woman-location';
  }
  childLocationData(id) {
    const url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}${this.namespace_children}/${id}/edit`;
    return this.http.get(url).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.map)(results => results), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.catchError)(error => this.errorHandle(error))).toPromise();
  }
  updateChildLocation(body, id) {
    const url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}${this.namespace_children}/${id}`;
    return this.http.put(url, body).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.map)(results => results), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.catchError)(error => this.errorHandle(error))).toPromise();
  }
  womanLocationData(id) {
    const url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}${this.namespace_woman}/${id}/edit`;
    return this.http.get(url).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.map)(results => results), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.catchError)(error => this.errorHandle(error))).toPromise();
  }
  updateWomanLocation(body, id) {
    const url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}${this.namespace_woman}/${id}`;
    return this.http.put(url, body).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.map)(results => results), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.catchError)(error => this.errorHandle(error))).toPromise();
  }
};
LocationAPIService = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.Injectable)({
  providedIn: 'root'
})], LocationAPIService);


/***/ }),

/***/ 28263:
/*!****************************************************************************************!*\
  !*** ./src/app/pages/location-update-woman/location-update-woman.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, `ion-content {
  --padding-start: 16px;
  --padding-end: 16px;
  --padding-top: 20px;
  --padding-bottom: 20px;
}

.plw-container {
  max-width: 800px;
  margin: 0 auto;
  margin-top: 20px;
}

.card-container {
  max-width: 800px;
  margin: 0 auto 20px auto;
}

ion-card {
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin: 0 0 16px 0;
}

.section-header {
  max-width: 800px;
  margin: 0 auto 24px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 4px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--ion-color-dark);
}
.section-title ion-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.plw-form .form-section {
  margin-bottom: 32px;
}
.plw-form .form-section:last-child {
  margin-bottom: 0;
}
.plw-form .section-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--ion-color-dark);
  padding: 8px 0;
  border-bottom: 2px solid rgba(73, 144, 226, 0.1);
}
.plw-form .section-subtitle ion-icon {
  font-size: 20px;
}
.plw-form .form-item {
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}
.plw-form .form-item ion-label {
  font-weight: 500;
  color: var(--ion-color-medium);
  margin-bottom: 4px;
  font-size: 14px;
}
.plw-form .form-item ion-label::after {
  content: "";
}
.plw-form .form-item ion-icon[slot=start] {
  margin-right: 8px;
  font-size: 18px;
  flex-shrink: 0;
}
.plw-form .form-item ion-select,
.plw-form .form-item ion-input {
  color: var(--ion-color-dark);
  font-weight: 500;
}
.plw-form .form-item:hover {
  background: rgba(73, 144, 226, 0.04);
  border-color: rgba(73, 144, 226, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.plw-form .form-item.item-has-focus {
  border-color: var(--ion-color-primary);
  box-shadow: 0 0 0 2px rgba(73, 144, 226, 0.1);
}

ion-note {
  font-size: 12px;
  margin-top: 4px;
}
ion-note[slot=helper] {
  color: var(--ion-color-medium);
  padding-left: 4px;
}
ion-note[slot=error] {
  color: var(--ion-color-danger);
  font-weight: 500;
  padding-left: 4px;
}

.submit-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.submit-button {
  --background: var(--ion-color-primary);
  --background-activated: var(--ion-color-primary-shade);
  --color: white;
  --border-radius: 12px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  height: 48px;
  font-weight: 600;
  font-size: 16px;
  text-transform: none;
  transition: all 0.3s ease;
}
.submit-button:hover {
  transform: translateY(-2px);
  --box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.submit-button:active {
  transform: translateY(0);
}
.submit-button:disabled {
  --background: var(--ion-color-medium);
  --color: var(--ion-color-medium-contrast);
  opacity: 0.6;
}
.submit-button ion-icon {
  font-size: 20px;
  margin-right: 8px;
}

@media (max-width: 768px) {
  ion-content {
    --padding-start: 12px;
    --padding-end: 12px;
    --padding-top: 16px;
    --padding-bottom: 16px;
  }
  .plw-container,
  .card-container {
    margin-top: 0;
  }
  .section-header {
    margin-bottom: 20px;
  }
  .section-title {
    font-size: 20px;
  }
  .section-title ion-icon {
    font-size: 24px;
  }
  .card-container {
    margin-bottom: 16px;
  }
}
@media (max-width: 480px) {
  ion-content {
    --padding-start: 8px;
    --padding-end: 8px;
    --padding-top: 12px;
    --padding-bottom: 12px;
  }
  .section-header {
    margin-bottom: 16px;
  }
  .section-title {
    font-size: 18px;
  }
  .section-title ion-icon {
    font-size: 22px;
  }
  .card-container {
    margin-bottom: 12px;
  }
}
.form-section {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
app-skeleton {
  margin: 20px;
}`, "",{"version":3,"sources":["webpack://./src/app/pages/location-update-woman/location-update-woman.page.scss"],"names":[],"mappings":"AAGA;EACE,qBAAA;EACA,mBAAA;EACA,mBAAA;EACA,sBAAA;AAFF;;AAMA;EACE,gBAAA;EACA,cAAA;EACA,gBAAA;AAHF;;AAMA;EACE,gBAAA;EACA,wBAAA;AAHF;;AAOA;EACE,mBAAA;EACA,2CAAA;EACA,gBAAA;EACA,kBAAA;AAJF;;AAQA;EACE,gBAAA;EACA,wBAAA;EACA,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,SAAA;EACA,cAAA;AALF;;AAQA;EACE,aAAA;EACA,mBAAA;EACA,SAAA;EACA,eAAA;EACA,gBAAA;EACA,SAAA;EACA,4BAAA;AALF;AAOE;EACE,eAAA;EACA,cAAA;AALJ;;AAWE;EACE,mBAAA;AARJ;AAUI;EACE,gBAAA;AARN;AAYE;EACE,aAAA;EACA,mBAAA;EACA,QAAA;EACA,eAAA;EACA,gBAAA;EACA,kBAAA;EACA,4BAAA;EACA,cAAA;EACA,gDAAA;AAVJ;AAYI;EACE,eAAA;AAVN;AAcE;EACE,mBAAA;EACA,kBAAA;EACA,qCAAA;EACA,oCAAA;EACA,yBAAA;AAZJ;AAcI;EACE,gBAAA;EACA,8BAAA;EACA,kBAAA;EACA,eAAA;AAZN;AAcM;EACE,WAAA;AAZR;AAgBI;EACE,iBAAA;EACA,eAAA;EACA,cAAA;AAdN;AAiBI;;EAEE,4BAAA;EACA,gBAAA;AAfN;AAkBI;EACE,oCAAA;EACA,qCAAA;EACA,2BAAA;EACA,yCAAA;AAhBN;AAmBI;EACE,sCAAA;EACA,6CAAA;AAjBN;;AAuBA;EACE,eAAA;EACA,eAAA;AApBF;AAsBE;EACE,8BAAA;EACA,iBAAA;AApBJ;AAuBE;EACE,8BAAA;EACA,gBAAA;EACA,iBAAA;AArBJ;;AA0BA;EACE,gBAAA;EACA,iBAAA;EACA,yCAAA;AAvBF;;AA0BA;EACE,sCAAA;EACA,sDAAA;EACA,cAAA;EACA,qBAAA;EACA,4CAAA;EACA,YAAA;EACA,gBAAA;EACA,eAAA;EACA,oBAAA;EACA,yBAAA;AAvBF;AAyBE;EACE,2BAAA;EACA,4CAAA;AAvBJ;AA0BE;EACE,wBAAA;AAxBJ;AA2BE;EACE,qCAAA;EACA,yCAAA;EACA,YAAA;AAzBJ;AA4BE;EACE,eAAA;EACA,iBAAA;AA1BJ;;AA+BA;EACE;IACE,qBAAA;IACA,mBAAA;IACA,mBAAA;IACA,sBAAA;EA5BF;EA+BA;;IAEE,aAAA;EA7BF;EAgCA;IACE,mBAAA;EA9BF;EAiCA;IACE,eAAA;EA/BF;EAiCE;IACE,eAAA;EA/BJ;EAmCA;IACE,mBAAA;EAjCF;AACF;AAoCA;EACE;IACE,oBAAA;IACA,kBAAA;IACA,mBAAA;IACA,sBAAA;EAlCF;EAqCA;IACE,mBAAA;EAnCF;EAsCA;IACE,eAAA;EApCF;EAsCE;IACE,eAAA;EApCJ;EAwCA;IACE,mBAAA;EAtCF;AACF;AA0CA;EACE,iCAAA;AAxCF;;AA2CA;EACE;IACE,UAAA;IACA,2BAAA;EAxCF;EA0CA;IACE,UAAA;IACA,wBAAA;EAxCF;AACF;AA4CA;EACE,YAAA;AA1CF","sourcesContent":["// PLW Location Update Styles - Following Woman Detail Design Patterns\n\n// Main content\nion-content {\n  --padding-start: 16px;\n  --padding-end: 16px;\n  --padding-top: 20px;\n  --padding-bottom: 20px;\n}\n\n// Container styling\n.plw-container {\n  max-width: 800px;\n  margin: 0 auto;\n  margin-top: 20px;\n}\n\n.card-container {\n  max-width: 800px;\n  margin: 0 auto 20px auto;\n}\n\n// Card styling\nion-card {\n  border-radius: 16px;\n  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);\n  overflow: hidden;\n  margin: 0 0 16px 0;\n}\n\n// Section header\n.section-header {\n  max-width: 800px;\n  margin: 0 auto 24px auto;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 16px;\n  padding: 0 4px;\n}\n\n.section-title {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  font-size: 24px;\n  font-weight: 700;\n  margin: 0;\n  color: var(--ion-color-dark);\n\n  ion-icon {\n    font-size: 28px;\n    flex-shrink: 0;\n  }\n}\n\n// Form styling\n.plw-form {\n  .form-section {\n    margin-bottom: 32px;\n    \n    &:last-child {\n      margin-bottom: 0;\n    }\n  }\n  \n  .section-subtitle {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    font-size: 16px;\n    font-weight: 600;\n    margin: 0 0 16px 0;\n    color: var(--ion-color-dark);\n    padding: 8px 0;\n    border-bottom: 2px solid rgba(73, 144, 226, 0.1);\n    \n    ion-icon {\n      font-size: 20px;\n    }\n  }\n  \n  .form-item {\n    margin-bottom: 16px;\n    border-radius: 8px;\n    border: 1px solid rgba(0, 0, 0, 0.08);\n    background: rgba(255, 255, 255, 0.8);\n    transition: all 0.2s ease;\n\n    ion-label {\n      font-weight: 500;\n      color: var(--ion-color-medium);\n      margin-bottom: 4px;\n      font-size: 14px;\n\n      &::after {\n        content: '';\n      }\n    }\n\n    ion-icon[slot=\"start\"] {\n      margin-right: 8px;\n      font-size: 18px;\n      flex-shrink: 0;\n    }\n\n    ion-select,\n    ion-input {\n      color: var(--ion-color-dark);\n      font-weight: 500;\n    }\n\n    &:hover {\n      background: rgba(73, 144, 226, 0.04);\n      border-color: rgba(73, 144, 226, 0.2);\n      transform: translateY(-1px);\n      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n    }\n\n    &.item-has-focus {\n      border-color: var(--ion-color-primary);\n      box-shadow: 0 0 0 2px rgba(73, 144, 226, 0.1);\n    }\n  }\n}\n\n// Note styling\nion-note {\n  font-size: 12px;\n  margin-top: 4px;\n\n  &[slot=\"helper\"] {\n    color: var(--ion-color-medium);\n    padding-left: 4px;\n  }\n\n  &[slot=\"error\"] {\n    color: var(--ion-color-danger);\n    font-weight: 500;\n    padding-left: 4px;\n  }\n}\n\n// Submit section\n.submit-section {\n  margin-top: 32px;\n  padding-top: 24px;\n  border-top: 1px solid rgba(0, 0, 0, 0.08);\n}\n\n.submit-button {\n  --background: var(--ion-color-primary);\n  --background-activated: var(--ion-color-primary-shade);\n  --color: white;\n  --border-radius: 12px;\n  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);\n  height: 48px;\n  font-weight: 600;\n  font-size: 16px;\n  text-transform: none;\n  transition: all 0.3s ease;\n\n  &:hover {\n    transform: translateY(-2px);\n    --box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);\n  }\n\n  &:active {\n    transform: translateY(0);\n  }\n\n  &:disabled {\n    --background: var(--ion-color-medium);\n    --color: var(--ion-color-medium-contrast);\n    opacity: 0.6;\n  }\n\n  ion-icon {\n    font-size: 20px;\n    margin-right: 8px;\n  }\n}\n\n// Responsive design\n@media (max-width: 768px) {\n  ion-content {\n    --padding-start: 12px;\n    --padding-end: 12px;\n    --padding-top: 16px;\n    --padding-bottom: 16px;\n  }\n\n  .plw-container,\n  .card-container {\n    margin-top: 0;\n  }\n\n  .section-header {\n    margin-bottom: 20px;\n  }\n\n  .section-title {\n    font-size: 20px;\n\n    ion-icon {\n      font-size: 24px;\n    }\n  }\n\n  .card-container {\n    margin-bottom: 16px;\n  }\n}\n\n@media (max-width: 480px) {\n  ion-content {\n    --padding-start: 8px;\n    --padding-end: 8px;\n    --padding-top: 12px;\n    --padding-bottom: 12px;\n  }\n\n  .section-header {\n    margin-bottom: 16px;\n  }\n\n  .section-title {\n    font-size: 18px;\n\n    ion-icon {\n      font-size: 22px;\n    }\n  }\n\n  .card-container {\n    margin-bottom: 12px;\n  }\n}\n\n// Animation for form transitions\n.form-section {\n  animation: fadeInUp 0.3s ease-out;\n}\n\n@keyframes fadeInUp {\n  from {\n    opacity: 0;\n    transform: translateY(20px);\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n\n// Loading state\napp-skeleton {\n  margin: 20px;\n}"],"sourceRoot":""}]);
// Exports
module.exports = ___CSS_LOADER_EXPORT___.toString();


/***/ }),

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

"use strict";
module.exports = "<ion-header>\n  <ion-toolbar>\n    <ion-buttons slot=\"start\">\n      <ion-back-button [defaultHref]=\"getBackUrl()\"></ion-back-button>\n    </ion-buttons>\n    <ion-title>Update Location</ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content>\n  <div *ngIf=\"locationPrerequisiteData; else loading\" class=\"plw-container\">\n    <!-- Header Section -->\n    <div class=\"section-header\">\n      <h2 class=\"section-title\">\n        <ion-icon name=\"map-outline\" color=\"primary\"></ion-icon>\n        Update Location\n      </h2>\n    </div>\n\n    <!-- Form Card -->\n    <div class=\"card-container\">\n      <ion-card>\n        <ion-card-content>\n          <form [formGroup]=\"locationUpdateFrom\" (ngSubmit)=\"update(locationUpdateFrom)\" class=\"plw-form\">\n\n            <!-- Location Information Section -->\n            <div class=\"form-section\">\n              <h3 class=\"section-subtitle\">\n                <ion-icon name=\"location-outline\" color=\"primary\"></ion-icon>\n                Location Information\n              </h3>\n\n              <!-- Block Selection -->\n              <ion-item class=\"form-item\">\n                <ion-icon slot=\"start\" name=\"location-outline\" color=\"primary\"></ion-icon>\n                <ion-label position=\"stacked\">Select Block *</ion-label>\n                <ion-select interface=\"action-sheet\" formControlName=\"block_id\" (ionChange)=\"onBlockSelected()\" placeholder=\"Choose your block\">\n                  <ion-select-option *ngFor=\"let block of getBlocks()\" [value]=\"block.id\">\n                    {{block.title}}\n                  </ion-select-option>\n                </ion-select>\n                <ion-note slot=\"error\" *ngIf=\"locationUpdateFrom.get('block_id')?.invalid && locationUpdateFrom.get('block_id')?.touched\">\n                  This field is required\n                </ion-note>\n              </ion-item>\n\n              <!-- Sub-Block Selection -->\n              <ion-item class=\"form-item\">\n                <ion-icon slot=\"start\" name=\"grid-outline\" color=\"primary\"></ion-icon>\n                <ion-label position=\"stacked\">Sub-Block *</ion-label>\n                <ion-select interface=\"action-sheet\" formControlName=\"sub_block_id\" (ionChange)=\"onSubBlockSelected()\" placeholder=\"Choose sub-block\">\n                  <ion-select-option *ngFor=\"let sub_block of getSubBlock()\" [value]=\"sub_block.id\">\n                    {{sub_block.title}}\n                  </ion-select-option>\n                </ion-select>\n                <ion-note slot=\"error\" *ngIf=\"locationUpdateFrom.get('sub_block_id')?.invalid && locationUpdateFrom.get('sub_block_id')?.touched\">\n                  This field is required\n                </ion-note>\n                <ion-note slot=\"helper\" *ngIf=\"getFormFieldValue('block_id') && getSubBlock().length === 0\" color=\"medium\">\n                  No sub-blocks available for the selected block\n                </ion-note>\n              </ion-item>\n\n              <!-- House Hold Number -->\n              <ion-item class=\"form-item\">\n                <ion-icon slot=\"start\" name=\"home-outline\" color=\"primary\"></ion-icon>\n                <ion-label position=\"stacked\">House Hold Number *</ion-label>\n                <ion-input formControlName=\"hh_no\" type=\"text\" placeholder=\"Enter house number\"></ion-input>\n                <ion-note slot=\"error\" *ngIf=\"locationUpdateFrom.get('hh_no')?.invalid && locationUpdateFrom.get('hh_no')?.touched\">\n                  Please enter a valid house hold number\n                </ion-note>\n              </ion-item>\n            </div>\n\n            <!-- Submit Button -->\n            <div class=\"submit-section\">\n              <ion-button type=\"button\" expand=\"full\" size=\"large\" [disabled]=\"!locationUpdateFrom.valid\" class=\"submit-button\" (click)=\"confirmAndUpdate()\">\n                <ion-icon name=\"cloud-upload\" slot=\"start\"></ion-icon>\n                Update Location\n              </ion-button>\n            </div>\n          </form>\n        </ion-card-content>\n      </ion-card>\n    </div>\n  </div>\n\n  <ng-template #loading>\n    <app-skeleton></app-skeleton>\n  </ng-template>\n</ion-content>\n";

/***/ })

}]);
//# sourceMappingURL=src_app_pages_location-update-woman_location-update-woman_module_ts.js.map