(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([["src_app_pages_plw-transfer-out-create_plw-transfer-out-create_module_ts"],{

/***/ 77179:
/*!*****************************************************************************************!*\
  !*** ./src/app/pages/plw-transfer-out-create/plw-transfer-out-create-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 */   PlwTransferOutCreatePageRoutingModule: () => (/* binding */ PlwTransferOutCreatePageRoutingModule)
/* 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 _plw_transfer_out_create_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./plw-transfer-out-create.page */ 66093);




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


/***/ }),

/***/ 71770:
/*!*********************************************************************************!*\
  !*** ./src/app/pages/plw-transfer-out-create/plw-transfer-out-create.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 */   PlwTransferOutCreatePageModule: () => (/* binding */ PlwTransferOutCreatePageModule)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ 60316);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ 34456);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ionic/angular */ 21507);
/* harmony import */ var _plw_transfer_out_create_routing_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./plw-transfer-out-create-routing.module */ 77179);
/* harmony import */ var _plw_transfer_out_create_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./plw-transfer-out-create.page */ 66093);







let PlwTransferOutCreatePageModule = class PlwTransferOutCreatePageModule {};
PlwTransferOutCreatePageModule = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_3__.NgModule)({
  imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__.CommonModule, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.FormsModule, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.ReactiveFormsModule, _ionic_angular__WEBPACK_IMPORTED_MODULE_6__.IonicModule, _plw_transfer_out_create_routing_module__WEBPACK_IMPORTED_MODULE_0__.PlwTransferOutCreatePageRoutingModule],
  declarations: [_plw_transfer_out_create_page__WEBPACK_IMPORTED_MODULE_1__.PlwTransferOutCreatePage]
})], PlwTransferOutCreatePageModule);


/***/ }),

/***/ 66093:
/*!*******************************************************************************!*\
  !*** ./src/app/pages/plw-transfer-out-create/plw-transfer-out-create.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 */   PlwTransferOutCreatePage: () => (/* binding */ PlwTransferOutCreatePage)
/* 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 _plw_transfer_out_create_page_html_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./plw-transfer-out-create.page.html?ngResource */ 96319);
/* harmony import */ var _plw_transfer_out_create_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./plw-transfer-out-create.page.scss?ngResource */ 81131);
/* harmony import */ var _plw_transfer_out_create_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_plw_transfer_out_create_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ 34456);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ 95072);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ionic/angular */ 21507);
/* harmony import */ var src_app_services_plw_transfer_out_api_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/services/plw_transfer_out_api.service */ 58455);
/* harmony import */ var src_app_util_baseHelper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/util/baseHelper */ 76434);

var _PlwTransferOutCreatePage;



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






let PlwTransferOutCreatePage = (_PlwTransferOutCreatePage = class PlwTransferOutCreatePage {
  constructor(fb, api, activatedRoute, b, change, router, alertController) {
    this.fb = fb;
    this.api = api;
    this.activatedRoute = activatedRoute;
    this.b = b;
    this.change = change;
    this.router = router;
    this.alertController = alertController;
    this.isEditMode = false;
    this.availableInfs = [];
    this.filteredInfs = [];
    this.infSearchTerm = '';
    this.showFilteredOptions = false;
    this.plwId = this.activatedRoute.snapshot.paramMap.get('plwId');
    this.setupForm();
  }
  ngOnInit() {
    this.load();
  }
  setupForm() {
    this.transferOutForm = this.fb.group({
      plw_id: [this.plwId, [_angular_forms__WEBPACK_IMPORTED_MODULE_5__.Validators.required]],
      to_inf: ['', [_angular_forms__WEBPACK_IMPORTED_MODULE_5__.Validators.required]],
      comment: [''],
      transfer_out_id: ['']
    });
  }
  load() {
    var _this = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        const response = yield _this.api.getTransferOutPreqData(_this.plwId);
        if (response.success) {
          _this.transferOutPreqData = response.data;
          _this.plw_info = response.data.plw_info;
          _this.availableInfs = response.data.available_infs;
          _this.existingTransfer = response.data.existing_transfer;
          // If there's an existing unsynced transfer, populate the form for editing
          if (_this.existingTransfer) {
            _this.isEditMode = true;
            _this.transferOutForm.patchValue({
              to_inf: _this.existingTransfer.to_inf,
              comment: _this.existingTransfer.comment,
              transfer_out_id: _this.existingTransfer.id
            });
            // Set the INF name in the search field for display
            const selectedInf = _this.availableInfs.find(inf => inf.id === _this.existingTransfer.to_inf);
            if (selectedInf) {
              _this.infSearchTerm = selectedInf.title;
            } else if (_this.existingTransfer.transferInTo || _this.existingTransfer.transfer_in_to) {
              var _this$existingTransfe, _this$existingTransfe2;
              // If INF not in available list, use the relationship data
              _this.infSearchTerm = ((_this$existingTransfe = _this.existingTransfer.transferInTo) === null || _this$existingTransfe === void 0 ? void 0 : _this$existingTransfe.title) || ((_this$existingTransfe2 = _this.existingTransfer.transfer_in_to) === null || _this$existingTransfe2 === void 0 ? void 0 : _this$existingTransfe2.title) || '';
            }
          }
          _this.change.markForCheck();
        }
      } catch (error) {
        _this.b.errorToast('Failed to load prerequisite data');
      }
    })();
  }
  onSubmit() {
    var _this2 = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      if (_this2.transferOutForm.valid) {
        try {
          const formValue = {
            ..._this2.transferOutForm.value
          };
          const result = yield _this2.api.transferOutStore(formValue);
          _this2.b.responseToast(result);
          if (result.success) {
            _this2.router.navigate(['/woman-detail', _this2.plwId], {
              queryParams: {
                reload: true
              }
            });
          }
        } catch (error) {
          _this2.b.errorToast(`Error ${_this2.isEditMode ? 'updating' : 'creating'} PLW transfer out`);
        }
      } else {
        _this2.b.errorToast('Please fill all required fields');
      }
    })();
  }
  getAge(dateOfBirth) {
    if (!dateOfBirth) {
      return 'N/A';
    }
    const dob = new Date(dateOfBirth);
    const today = new Date();
    let years = today.getFullYear() - dob.getFullYear();
    let months = today.getMonth() - dob.getMonth();
    if (months < 0) {
      years--;
      months += 12;
    }
    let result = '';
    if (years > 0) {
      result += `${years} Years`;
    }
    if (months > 0) {
      if (result.length > 0) {
        result += ' ';
      }
      result += `${months} Months`;
    }
    return result || '0 Months';
  }
  isFieldInvalid(fieldName) {
    const field = this.transferOutForm.get(fieldName);
    return field && field.invalid && (field.dirty || field.touched);
  }
  getInfTitle(infId) {
    const inf = this.availableInfs.find(i => i.id === infId);
    return inf ? inf.title : '';
  }
  calculateAgeInMonths(dateOfBirth) {
    if (!dateOfBirth) {
      return 0;
    }
    const today = new Date();
    const birthDate = new Date(dateOfBirth);
    const months = (today.getFullYear() - birthDate.getFullYear()) * 12 + (today.getMonth() - birthDate.getMonth());
    return months;
  }
  filterInfs(event) {
    var _event$detail;
    const searchTerm = ((_event$detail = event.detail) === null || _event$detail === void 0 || (_event$detail = _event$detail.value) === null || _event$detail === void 0 ? void 0 : _event$detail.toLowerCase()) || '';
    this.infSearchTerm = searchTerm;
    if (!searchTerm) {
      this.filteredInfs = [...this.availableInfs];
    } else {
      this.filteredInfs = this.availableInfs.filter(inf => inf.title.toLowerCase().includes(searchTerm));
    }
  }
  onSearchFocus() {
    this.showFilteredOptions = true;
    if (!this.infSearchTerm) {
      this.filteredInfs = [...this.availableInfs];
    }
  }
  onSearchBlur() {
    setTimeout(() => {
      this.showFilteredOptions = false;
    }, 200);
  }
  selectInf(inf) {
    this.transferOutForm.patchValue({
      to_inf: inf.id
    });
    this.infSearchTerm = inf.title;
    this.showFilteredOptions = false;
    this.change.markForCheck();
  }
  trackByInfId(index, inf) {
    return inf.id;
  }
}, _PlwTransferOutCreatePage.ctorParameters = () => [{
  type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__.FormBuilder
}, {
  type: src_app_services_plw_transfer_out_api_service__WEBPACK_IMPORTED_MODULE_3__.PlwTransferOutAPIService
}, {
  type: _angular_router__WEBPACK_IMPORTED_MODULE_6__.ActivatedRoute
}, {
  type: src_app_util_baseHelper__WEBPACK_IMPORTED_MODULE_4__.BaseHelper
}, {
  type: _angular_core__WEBPACK_IMPORTED_MODULE_7__.ChangeDetectorRef
}, {
  type: _angular_router__WEBPACK_IMPORTED_MODULE_6__.Router
}, {
  type: _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.AlertController
}], _PlwTransferOutCreatePage);
PlwTransferOutCreatePage = (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_7__.Component)({
  selector: 'app-plw-transfer-out-create',
  template: _plw_transfer_out_create_page_html_ngResource__WEBPACK_IMPORTED_MODULE_1__,
  styles: [(_plw_transfer_out_create_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2___default())]
})], PlwTransferOutCreatePage);


/***/ }),

/***/ 70014:
/*!**********************************************!*\
  !*** ./src/app/services/api_base.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 */   APIBaseService: () => (/* binding */ APIBaseService)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _ngrx_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ngrx/store */ 81383);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ 46443);
/* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./global */ 99328);
/* harmony import */ var _util_baseHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/baseHelper */ 76434);
var _APIBaseService;

/* eslint-disable eqeqeq */

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




let APIBaseService = (_APIBaseService = class APIBaseService {
  constructor(http, g, b, store) {
    this.http = http;
    this.g = g;
    this.b = b;
    this.store = store;
  }
  getHeader(params = {}) {
    // Get token from current user if g.jws is not available
    let token = this.g.jws;
    if (!token) {
      const currentUser = this.b.getCurrentUser();
      token = currentUser === null || currentUser === void 0 ? void 0 : currentUser.token;
    }
    return {
      headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__.HttpHeaders({
        Authorization: token
      }),
      params
    };
  }
  errorHandle(err) {
    let message = '';
    let detailedErrors = null;
    // Extract error details from response
    if (err !== null && err !== void 0 && err.error) {
      // Backend error format: {success: false, message: string, data?: object|string}
      message = err.error.message || err.message;
      detailedErrors = err.error.data;
    } else {
      message = err.message;
    }
    // Handle specific HTTP status codes
    switch (err.status) {
      case 0:
        // Network error
        message = 'Failed reaching server!!! Make sure you are connected to internet or camp site network.';
        this.b.errorToast(message);
        break;
      case 400:
        // Bad Request
        message = message || 'Bad request. Please check your input.';
        this.b.errorToast(this.formatErrorMessage(message, detailedErrors));
        break;
      case 401:
        // Unauthorized - token expired
        message = message || 'Session expired. Please login again.';
        this.b.errorToast(message);
        setTimeout(() => {
          this.b.logout('token_expired');
        }, 3000);
        break;
      case 403:
        // Forbidden
        message = message || 'Access denied. You do not have permission to perform this action.';
        this.b.errorToast(message);
        break;
      case 404:
        // Not Found
        message = message || 'Resource not found.';
        this.b.errorToast(this.formatErrorMessage(message, detailedErrors));
        break;
      case 422:
        // Validation Error (Unprocessable Entity)
        message = message || 'Validation failed. Please check your input.';
        this.b.errorToast(this.formatErrorMessage(message, detailedErrors));
        break;
      case 500:
        // Internal Server Error
        message = message || 'Internal server error. Please try again later.';
        this.b.errorToast(message);
        break;
      case 503:
        // Service Unavailable
        message = message || 'Service unavailable. Please try again later.';
        this.b.errorToast(message);
        break;
      default:
        // Other errors
        message = message || 'Unknown error occurred. Make sure you are connected and retry.';
        this.b.errorToast(this.formatErrorMessage(message, detailedErrors));
        break;
    }
    return Promise.resolve({
      message: this.formatErrorMessage(message, detailedErrors),
      success: false,
      data: detailedErrors
    });
  }
  /**
   * Format error message with detailed validation errors or data
   */
  formatErrorMessage(mainMessage, detailedErrors) {
    if (!detailedErrors) {
      return mainMessage;
    }
    // If detailedErrors is a string (like the data field from backend)
    if (typeof detailedErrors === 'string') {
      return `${mainMessage} - ${detailedErrors}`;
    }
    // If detailedErrors is an object with field-specific errors (validation errors)
    if (typeof detailedErrors === 'object' && !Array.isArray(detailedErrors)) {
      const errorMessages = [mainMessage];
      Object.keys(detailedErrors).forEach(field => {
        const fieldErrors = detailedErrors[field];
        if (Array.isArray(fieldErrors)) {
          fieldErrors.forEach(error => errorMessages.push(`• ${error}`));
        } else if (typeof fieldErrors === 'string') {
          errorMessages.push(`• ${fieldErrors}`);
        }
      });
      return errorMessages.join('\n');
    }
    return mainMessage;
  }
}, _APIBaseService.ctorParameters = () => [{
  type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__.HttpClient
}, {
  type: _global__WEBPACK_IMPORTED_MODULE_0__.GlobalProvider
}, {
  type: _util_baseHelper__WEBPACK_IMPORTED_MODULE_1__.BaseHelper
}, {
  type: _ngrx_store__WEBPACK_IMPORTED_MODULE_3__.Store
}], _APIBaseService);
APIBaseService = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.Injectable)({
  providedIn: 'root'
})], APIBaseService);


/***/ }),

/***/ 58455:
/*!**********************************************************!*\
  !*** ./src/app/services/plw_transfer_out_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 */   PlwTransferOutAPIService: () => (/* binding */ PlwTransferOutAPIService)
/* 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 max-len */
/* eslint-disable @typescript-eslint/naming-convention */




let PlwTransferOutAPIService = class PlwTransferOutAPIService extends _api_base_service__WEBPACK_IMPORTED_MODULE_0__.APIBaseService {
  constructor() {
    super(...arguments);
    this.namespace = '/plw-transfer-out';
  }
  /**
   * Get prerequisite data for creating/editing a transfer out
   * Returns existing unsynced transfer if exists
   */
  getTransferOutPreqData(plwId) {
    const url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}${this.namespace}-create/${plwId}`;
    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();
  }
  /**
   * Create or update a transfer out request
   */
  transferOutStore(body) {
    const url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}${this.namespace}/store`;
    return this.http.post(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();
  }
  /**
   * Get list of all transfer outs from current INF
   * Supports filtering by status, sync_status, direction, and pagination
   */
  getTransferOutList(filters) {
    let url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}${this.namespace}`;
    const params = [];
    if (filters) {
      if (filters.status) {
        params.push(`status=${filters.status}`);
      }
      if (filters.sync_status) {
        params.push(`sync_status=${filters.sync_status}`);
      }
      if (filters.direction) {
        params.push(`direction=${filters.direction}`);
      }
      if (filters.page) {
        params.push(`page=${filters.page}`);
      }
      if (filters.per_page) {
        params.push(`per_page=${filters.per_page}`);
      }
    }
    if (params.length > 0) {
      url += `?${params.join('&')}`;
    }
    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();
  }
  /**
   * Delete a transfer out request
   */
  deleteTransferOut(id) {
    const url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}${this.namespace}/${id}`;
    return this.http.delete(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();
  }
};
PlwTransferOutAPIService = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.Injectable)({
  providedIn: 'root'
})], PlwTransferOutAPIService);


/***/ }),

/***/ 81131:
/*!********************************************************************************************!*\
  !*** ./src/app/pages/plw-transfer-out-create/plw-transfer-out-create.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, `.transfer-container {
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 20px;
}

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

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

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

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

.transfer-form .form-section {
  margin-bottom: 32px;
}
.transfer-form .form-section:last-child {
  margin-bottom: 0;
}
.transfer-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);
}
.transfer-form .section-subtitle ion-icon {
  font-size: 20px;
}
.transfer-form .form-item {
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.transfer-form .form-item ion-label {
  font-weight: 500;
  color: var(--ion-color-dark);
}
.transfer-form .form-item ion-note {
  font-size: 12px;
  margin-top: 4px;
}
.transfer-form .form-item ion-note[slot=helper] {
  color: var(--ion-color-medium);
}
.transfer-form .form-item ion-note[slot=error] {
  color: var(--ion-color-danger);
}
.transfer-form .status-info {
  margin-top: 16px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
}
.transfer-form .status-info .small-text {
  font-size: 12px;
  color: var(--ion-color-medium);
  margin-top: 4px;
}

.plw-info-card {
  margin: 16px 0;
}
.plw-info-card .plw-card {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.children-info-card {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.children-info-card .table-container {
  overflow-x: auto;
  margin-bottom: 16px;
}
.children-info-card .children-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.children-info-card .children-table thead {
  background: rgba(var(--ion-color-tertiary-rgb), 0.1);
}
.children-info-card .children-table thead tr th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: var(--ion-color-dark);
  border-bottom: 2px solid rgba(var(--ion-color-tertiary-rgb), 0.3);
  white-space: nowrap;
}
.children-info-card .children-table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background 0.2s ease;
}
.children-info-card .children-table tbody tr:hover {
  background: rgba(var(--ion-color-tertiary-rgb), 0.05);
}
.children-info-card .children-table tbody tr:last-child {
  border-bottom: none;
}
.children-info-card .children-table tbody tr td {
  padding: 12px 8px;
  vertical-align: middle;
  color: var(--ion-color-dark);
}
.children-info-card .children-table .gender-badge,
.children-info-card .children-table .status-badge {
  font-size: 11px;
  padding: 4px 8px;
}
.children-info-card .children-table .actions-cell {
  text-align: center;
  width: 80px;
}
.children-info-card .children-table .actions-cell ion-button {
  margin: 0;
  --padding-start: 8px;
  --padding-end: 8px;
}
.children-info-card .children-table .actions-cell ion-button ion-icon {
  font-size: 18px;
}
.children-info-card .transfer-note {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px;
  background: rgba(var(--ion-color-warning-rgb), 0.1);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}
.children-info-card .transfer-note ion-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.profile-content {
  padding: 20px;
}

.content-grid {
  padding: 0;
  margin: 0;
}
.content-grid ion-row {
  margin: 0;
}
.content-grid ion-col {
  padding: 0 6px;
  display: flex;
  flex-direction: column;
}
.content-grid ion-col:first-child {
  padding-left: 0;
  padding-right: 8px;
}
.content-grid ion-col:last-child {
  padding-right: 0;
  padding-left: 8px;
}

.plw-info-card .info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}
.plw-info-card .info-item:last-child {
  margin-bottom: 0;
}
.plw-info-card .info-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-info-card .info-item ion-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2px;
}

.plw-info-card .item-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
  text-align: left;
}
.plw-info-card .item-content .label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ion-color-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin: 0;
  text-align: left;
}
.plw-info-card .item-content .value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ion-color-dark);
  line-height: 1.4;
  word-wrap: break-word;
  word-break: break-word;
  margin: 0;
  text-align: left;
}
.plw-info-card .item-content .value:empty::after {
  content: "-";
  color: var(--ion-color-medium);
  font-style: italic;
}

.inf-search-container {
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px;
  margin-bottom: 16px;
  background: var(--ion-color-light);
}
.inf-search-container .inf-label {
  font-weight: 600;
  color: var(--ion-color-dark);
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
}
.inf-search-container .inf-search-wrapper {
  position: relative;
}
.inf-search-container .inf-search-wrapper .inf-searchbar {
  --background: white;
  --border-radius: 8px;
  --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0;
}
.inf-search-container .inf-search-wrapper .inf-options-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: 4px;
}
.inf-search-container .inf-search-wrapper .inf-options-list ion-item {
  --min-height: 44px;
  cursor: pointer;
}
.inf-search-container .inf-search-wrapper .inf-options-list ion-item:hover {
  --background: rgba(var(--ion-color-primary-rgb), 0.05);
}
.inf-search-container .inf-search-wrapper .inf-options-list ion-item.selected {
  --background: rgba(var(--ion-color-primary-rgb), 0.1);
  font-weight: 600;
}
.inf-search-container .inf-search-wrapper .no-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 16px;
  margin-top: 4px;
  text-align: center;
  z-index: 1000;
}
.inf-search-container .inf-search-wrapper .no-results p {
  margin: 0;
  color: var(--ion-color-medium);
  font-size: 14px;
}
.inf-search-container .error-note {
  display: block;
  color: var(--ion-color-danger);
  font-size: 12px;
  margin-top: 8px;
  padding-left: 4px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.form-actions .submit-btn {
  min-width: 180px;
}
.form-actions .submit-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.loading-container ion-spinner {
  margin-bottom: 16px;
  width: 32px;
  height: 32px;
}
.loading-container p {
  margin: 0;
  color: var(--ion-color-medium);
  font-size: 14px;
}

ion-input, ion-textarea {
  --padding-start: 8px;
  --padding-end: 8px;
}

ion-select {
  --padding-start: 8px;
  --padding-end: 8px;
}

:host ::ng-deep .assessment-error-alert .alert-message {
  text-align: left;
  line-height: 1.6;
  padding: 8px 0;
}
:host ::ng-deep .assessment-error-alert .alert-message strong {
  color: var(--ion-color-danger);
}
:host ::ng-deep .assessment-error-alert .alert-button-confirm {
  font-weight: 600;
}

@media (max-width: 767px) {
  .section-title {
    font-size: 18px;
  }
  .section-title ion-icon {
    font-size: 22px;
  }
  .section-subtitle {
    font-size: 14px;
  }
  .section-subtitle ion-icon {
    font-size: 18px;
  }
  .form-actions {
    flex-direction: column;
    margin-top: 20px;
  }
  .form-actions .submit-btn {
    width: 100%;
    min-width: auto;
  }
  .plw-info-card {
    margin: 12px 0;
  }
  .plw-info-card .profile-content {
    padding: 16px;
  }
  .plw-info-card .content-grid ion-col {
    padding: 0 3px;
  }
  .plw-info-card .content-grid ion-col:first-child {
    padding-left: 0;
    padding-right: 5px;
  }
  .plw-info-card .content-grid ion-col:last-child {
    padding-right: 0;
    padding-left: 5px;
  }
  .plw-info-card .info-item {
    padding: 10px 6px;
    gap: 10px;
    margin-bottom: 6px;
  }
  .plw-info-card .info-item ion-icon {
    font-size: 16px;
    width: 18px;
  }
  .plw-info-card .item-content .label {
    font-size: 10px;
    letter-spacing: 0.3px;
  }
  .plw-info-card .item-content .value {
    font-size: 13px;
  }
}`, "",{"version":3,"sources":["webpack://./src/app/pages/plw-transfer-out-create/plw-transfer-out-create.page.scss"],"names":[],"mappings":"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","sourcesContent":["// PLW Transfer Out Create Form Styles - Following Measurement Create Design Patterns\n\n// Container styling\n.transfer-container {\n  max-width: 1200px;\n  margin: 0 auto;\n  margin-top: 20px;\n}\n\n.card-container {\n  max-width: 1200px;\n  margin: 0 auto;\n  margin-top: 20px;\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;\n}\n\n// Section header\n.section-header {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-bottom: 16px;\n  padding: 0 4px;\n}\n\n.section-title {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  font-size: 20px;\n  font-weight: 600;\n  margin: 0;\n  color: var(--ion-color-dark);\n\n  ion-icon {\n    font-size: 24px;\n  }\n}\n\n// Form styling\n.transfer-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\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\n  .status-info {\n    margin-top: 16px;\n    background: rgba(255, 193, 7, 0.1);\n    border: 1px solid rgba(255, 193, 7, 0.3);\n    border-radius: 8px;\n\n    .small-text {\n      font-size: 12px;\n      color: var(--ion-color-medium);\n      margin-top: 4px;\n    }\n  }\n}\n\n// PLW Information Card styling\n.plw-info-card {\n  margin: 16px 0;\n\n  .plw-card {\n    border-radius: 12px;\n    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n    overflow: hidden;\n    margin: 0;\n    border: 1px solid rgba(0, 0, 0, 0.08);\n  }\n}\n\n// Children Information Card styling\n.children-info-card {\n  border-radius: 12px;\n  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n  overflow: hidden;\n  margin: 16px 0;\n  border: 1px solid rgba(0, 0, 0, 0.08);\n\n  .table-container {\n    overflow-x: auto;\n    margin-bottom: 16px;\n  }\n\n  .children-table {\n    width: 100%;\n    border-collapse: collapse;\n    font-size: 14px;\n\n    thead {\n      background: rgba(var(--ion-color-tertiary-rgb), 0.1);\n\n      tr th {\n        padding: 12px 8px;\n        text-align: left;\n        font-weight: 600;\n        color: var(--ion-color-dark);\n        border-bottom: 2px solid rgba(var(--ion-color-tertiary-rgb), 0.3);\n        white-space: nowrap;\n      }\n    }\n\n    tbody {\n      tr {\n        border-bottom: 1px solid rgba(0, 0, 0, 0.05);\n        transition: background 0.2s ease;\n\n        &:hover {\n          background: rgba(var(--ion-color-tertiary-rgb), 0.05);\n        }\n\n        &:last-child {\n          border-bottom: none;\n        }\n\n        td {\n          padding: 12px 8px;\n          vertical-align: middle;\n          color: var(--ion-color-dark);\n        }\n      }\n    }\n\n    .gender-badge,\n    .status-badge {\n      font-size: 11px;\n      padding: 4px 8px;\n    }\n\n    .actions-cell {\n      text-align: center;\n      width: 80px;\n\n      ion-button {\n        margin: 0;\n        --padding-start: 8px;\n        --padding-end: 8px;\n\n        ion-icon {\n          font-size: 18px;\n        }\n      }\n    }\n  }\n\n  .transfer-note {\n    display: flex;\n    align-items: center;\n    gap: 6px;\n    padding: 12px;\n    background: rgba(var(--ion-color-warning-rgb), 0.1);\n    border-radius: 8px;\n    font-size: 13px;\n    line-height: 1.4;\n\n    ion-icon {\n      font-size: 18px;\n      flex-shrink: 0;\n    }\n  }\n}\n\n.profile-content {\n  padding: 20px;\n}\n\n.content-grid {\n  padding: 0;\n  margin: 0;\n\n  ion-row {\n    margin: 0;\n  }\n\n  ion-col {\n    padding: 0 6px;\n    display: flex;\n    flex-direction: column;\n\n    &:first-child {\n      padding-left: 0;\n      padding-right: 8px;\n    }\n\n    &:last-child {\n      padding-right: 0;\n      padding-left: 8px;\n    }\n  }\n}\n\n.plw-info-card .info-item {\n  display: flex;\n  align-items: flex-start;\n  gap: 12px;\n  padding: 12px 8px;\n  background: rgba(255, 255, 255, 0.8);\n  border-radius: 6px;\n  border: 1px solid rgba(0, 0, 0, 0.06);\n  margin-bottom: 8px;\n  transition: all 0.2s ease;\n\n  &:last-child {\n    margin-bottom: 0;\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  ion-icon {\n    font-size: 18px;\n    flex-shrink: 0;\n    width: 20px;\n    height: 20px;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    margin-top: 2px;\n  }\n}\n\n.plw-info-card .item-content {\n  display: flex;\n  flex-direction: column;\n  gap: 3px;\n  flex: 1;\n  min-width: 0;\n  text-align: left;\n\n  .label {\n    font-size: 11px;\n    font-weight: 600;\n    color: var(--ion-color-medium);\n    text-transform: uppercase;\n    letter-spacing: 0.5px;\n    line-height: 1.2;\n    margin: 0;\n    text-align: left;\n  }\n\n  .value {\n    font-size: 14px;\n    font-weight: 600;\n    color: var(--ion-color-dark);\n    line-height: 1.4;\n    word-wrap: break-word;\n    word-break: break-word;\n    margin: 0;\n    text-align: left;\n\n    &:empty::after {\n      content: '-';\n      color: var(--ion-color-medium);\n      font-style: italic;\n    }\n  }\n}\n\n// INF Search Container Styling\n.inf-search-container {\n  border-radius: 8px;\n  border: 1px solid rgba(0, 0, 0, 0.08);\n  padding: 12px;\n  margin-bottom: 16px;\n  background: var(--ion-color-light);\n\n  .inf-label {\n    font-weight: 600;\n    color: var(--ion-color-dark);\n    font-size: 14px;\n    display: block;\n    margin-bottom: 8px;\n  }\n\n  .inf-search-wrapper {\n    position: relative;\n\n    .inf-searchbar {\n      --background: white;\n      --border-radius: 8px;\n      --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n      padding: 0;\n    }\n\n    .inf-options-list {\n      position: absolute;\n      top: 100%;\n      left: 0;\n      right: 0;\n      max-height: 300px;\n      overflow-y: auto;\n      background: white;\n      border-radius: 8px;\n      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n      z-index: 1000;\n      margin-top: 4px;\n\n      ion-item {\n        --min-height: 44px;\n        cursor: pointer;\n\n        &:hover {\n          --background: rgba(var(--ion-color-primary-rgb), 0.05);\n        }\n\n        &.selected {\n          --background: rgba(var(--ion-color-primary-rgb), 0.1);\n          font-weight: 600;\n        }\n      }\n    }\n\n    .no-results {\n      position: absolute;\n      top: 100%;\n      left: 0;\n      right: 0;\n      background: white;\n      border-radius: 8px;\n      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n      padding: 16px;\n      margin-top: 4px;\n      text-align: center;\n      z-index: 1000;\n\n      p {\n        margin: 0;\n        color: var(--ion-color-medium);\n        font-size: 14px;\n      }\n    }\n  }\n\n  .error-note {\n    display: block;\n    color: var(--ion-color-danger);\n    font-size: 12px;\n    margin-top: 8px;\n    padding-left: 4px;\n  }\n}\n\n// Action buttons\n.form-actions {\n  display: flex;\n  gap: 12px;\n  margin-top: 24px;\n  justify-content: flex-end;\n  flex-wrap: wrap;\n\n  .submit-btn {\n    min-width: 180px;\n\n    &[disabled] {\n      opacity: 0.5;\n      cursor: not-allowed;\n    }\n  }\n}\n\n// Loading container\n.loading-container {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 60px 20px;\n  text-align: center;\n\n  ion-spinner {\n    margin-bottom: 16px;\n    width: 32px;\n    height: 32px;\n  }\n\n  p {\n    margin: 0;\n    color: var(--ion-color-medium);\n    font-size: 14px;\n  }\n}\n\n// Input field enhancements\nion-input, ion-textarea {\n  --padding-start: 8px;\n  --padding-end: 8px;\n}\n\nion-select {\n  --padding-start: 8px;\n  --padding-end: 8px;\n}\n\n// Assessment error alert styling\n:host ::ng-deep .assessment-error-alert {\n  .alert-message {\n    text-align: left;\n    line-height: 1.6;\n    padding: 8px 0;\n\n    strong {\n      color: var(--ion-color-danger);\n    }\n  }\n\n  .alert-button-confirm {\n    font-weight: 600;\n  }\n}\n\n// Mobile responsive design\n@media (max-width: 767px) {\n  .section-title {\n    font-size: 18px;\n\n    ion-icon {\n      font-size: 22px;\n    }\n  }\n\n  .section-subtitle {\n    font-size: 14px;\n\n    ion-icon {\n      font-size: 18px;\n    }\n  }\n\n  .form-actions {\n    flex-direction: column;\n    margin-top: 20px;\n\n    .submit-btn {\n      width: 100%;\n      min-width: auto;\n    }\n  }\n\n  .plw-info-card {\n    margin: 12px 0;\n\n    .profile-content {\n      padding: 16px;\n    }\n\n    .content-grid {\n      ion-col {\n        padding: 0 3px;\n\n        &:first-child {\n          padding-left: 0;\n          padding-right: 5px;\n        }\n\n        &:last-child {\n          padding-right: 0;\n          padding-left: 5px;\n        }\n      }\n    }\n\n    .info-item {\n      padding: 10px 6px;\n      gap: 10px;\n      margin-bottom: 6px;\n\n      ion-icon {\n        font-size: 16px;\n        width: 18px;\n      }\n    }\n\n    .item-content {\n      .label {\n        font-size: 10px;\n        letter-spacing: 0.3px;\n      }\n\n      .value {\n        font-size: 13px;\n      }\n    }\n  }\n}\n"],"sourceRoot":""}]);
// Exports
module.exports = ___CSS_LOADER_EXPORT___.toString();


/***/ }),

/***/ 96319:
/*!********************************************************************************************!*\
  !*** ./src/app/pages/plw-transfer-out-create/plw-transfer-out-create.page.html?ngResource ***!
  \********************************************************************************************/
/***/ ((module) => {

"use strict";
module.exports = "<ion-header>\n  <ion-toolbar>\n    <ion-buttons slot=\"start\">\n      <ion-back-button [defaultHref]=\"'/woman-detail/' + plwId\"></ion-back-button>\n    </ion-buttons>\n    <ion-title>{{ isEditMode ? 'Edit Transfer Out' : 'Transfer Out' }}</ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n  <div *ngIf=\"transferOutPreqData && plw_info; else loading\" class=\"transfer-container\">\n    <!-- Header Section -->\n    <div class=\"section-header\">\n      <h2 class=\"section-title\">\n        <ion-icon name=\"swap-horizontal-outline\" color=\"primary\"></ion-icon>\n        {{ isEditMode ? 'Edit PLW Transfer Out Request' : 'Transfer Out PLW to Another INF' }}\n      </h2>\n    </div>\n\n    <!-- Form Card -->\n    <div class=\"card-container\">\n      <ion-card>\n        <ion-card-content>\n          <form [formGroup]=\"transferOutForm\" (ngSubmit)=\"onSubmit()\" class=\"transfer-form\">\n\n            <!-- PLW Information Section -->\n            <div class=\"form-section\">\n              <h3 class=\"section-subtitle\">\n                <ion-icon name=\"person-outline\" color=\"primary\"></ion-icon>\n                PLW Information\n              </h3>\n\n              <!-- PLW Information Card -->\n              <div class=\"plw-info-card\">\n                <ion-card class=\"plw-card\">\n                  <div class=\"profile-content\">\n                    <ion-grid class=\"content-grid\">\n                      <ion-row>\n                        <!-- Left Column -->\n                        <ion-col size=\"6\">\n                          <div class=\"info-item\">\n                            <ion-icon name=\"person-circle-outline\" color=\"primary\"></ion-icon>\n                            <div class=\"item-content\">\n                              <span class=\"label\">Name</span>\n                              <span class=\"value\">{{ plw_info?.name || '-' }}</span>\n                            </div>\n                          </div>\n\n                          <div class=\"info-item\">\n                            <ion-icon name=\"id-card-outline\" color=\"primary\"></ion-icon>\n                            <div class=\"item-content\">\n                              <span class=\"label\">FCN</span>\n                              <span class=\"value\">{{ plw_info?.fcn || '-' }}</span>\n                            </div>\n                          </div>\n\n                          <div class=\"info-item\">\n                            <ion-icon name=\"document-text-outline\" color=\"primary\"></ion-icon>\n                            <div class=\"item-content\">\n                              <span class=\"label\">Progress ID</span>\n                              <span class=\"value\">{{ plw_info?.progress_id || '-' }}</span>\n                            </div>\n                          </div>\n                        </ion-col>\n\n                        <!-- Right Column -->\n                        <ion-col size=\"6\">\n                          <div class=\"info-item\">\n                            <ion-icon name=\"calendar-outline\" color=\"secondary\"></ion-icon>\n                            <div class=\"item-content\">\n                              <span class=\"label\">Date of Birth</span>\n                              <span class=\"value\">{{ plw_info?.date_of_birth || '-' }}</span>\n                            </div>\n                          </div>\n\n                          <div class=\"info-item\">\n                            <ion-icon name=\"hourglass-outline\" color=\"secondary\"></ion-icon>\n                            <div class=\"item-content\">\n                              <span class=\"label\">Age</span>\n                              <span class=\"value\">{{ getAge(plw_info?.date_of_birth) }}</span>\n                            </div>\n                          </div>\n\n                          <div class=\"info-item\">\n                            <ion-icon name=\"business-outline\" color=\"secondary\"></ion-icon>\n                            <div class=\"item-content\">\n                              <span class=\"label\">Current INF</span>\n                              <span class=\"value\">{{ plw_info?.current_location?.inf?.title || '-' }}</span>\n                            </div>\n                          </div>\n                        </ion-col>\n                      </ion-row>\n                    </ion-grid>\n                  </div>\n                </ion-card>\n              </div>\n\n            </div>\n\n            <!-- Children Information Section -->\n            <div class=\"form-section\" *ngIf=\"plw_info?.my_child?.length > 0 || plw_info?.childrens?.length > 0\">\n              <h3 class=\"section-subtitle\">\n                <ion-icon name=\"people-outline\" color=\"tertiary\"></ion-icon>\n                Children to be Transferred ({{ (plw_info?.my_child || plw_info?.childrens)?.length }})\n              </h3>\n\n              <ion-card class=\"children-info-card\">\n                <ion-card-content>\n                  <div class=\"table-container\">\n                    <table class=\"children-table\">\n                      <thead>\n                        <tr>\n                          <th>Name</th>\n                          <th>Gender</th>\n                          <th>Age</th>\n                          <th>Progress ID</th>\n                          <th>Verified</th>\n                          <th>Actions</th>\n                        </tr>\n                      </thead>\n                      <tbody>\n                        <tr *ngFor=\"let child of (plw_info?.my_child || plw_info?.childrens)\">\n                          <td>{{ child.name }}</td>\n                          <td>\n                            <ion-badge [color]=\"child.gender === 'Male' ? 'primary' : 'secondary'\" class=\"gender-badge\">\n                              {{ child.gender }}\n                            </ion-badge>\n                          </td>\n                          <td>{{ calculateAgeInMonths(child.date_of_birth) }} mo</td>\n                          <td>{{ child.progress_id || '-' }}</td>\n                          <td>\n                            <ion-badge [color]=\"child.verified === 1 ? 'success' : 'warning'\" class=\"status-badge\">\n                              {{ child.verified === 1 ? 'Yes' : 'No' }}\n                            </ion-badge>\n                          </td>\n                          <td class=\"actions-cell\">\n                            <ion-button fill=\"clear\" size=\"small\" color=\"primary\" [routerLink]=\"'/child-detail/' + child.id\">\n                              <ion-icon name=\"eye-outline\"></ion-icon>\n                            </ion-button>\n                          </td>\n                        </tr>\n                      </tbody>\n                    </table>\n                  </div>\n                  <ion-note color=\"medium\" class=\"transfer-note\">\n                    <ion-icon name=\"information-circle-outline\"></ion-icon>\n                    All children listed above will be transferred along with the PLW.\n                  </ion-note>\n                </ion-card-content>\n              </ion-card>\n            </div>\n\n            <!-- Transfer Details Section -->\n            <div class=\"form-section\">\n              <h3 class=\"section-subtitle\">\n                <ion-icon name=\"swap-horizontal-outline\" color=\"primary\"></ion-icon>\n                Transfer Details\n              </h3>\n\n              <!-- INF selection with search functionality -->\n              <div class=\"form-item inf-search-container\">\n                <ion-label class=\"inf-label\">Transfer To INF *</ion-label>\n\n                <div class=\"inf-search-wrapper\" (click)=\"$event.stopPropagation()\">\n                  <ion-searchbar\n                    [(ngModel)]=\"infSearchTerm\"\n                    (ionInput)=\"filterInfs($event)\"\n                    (ionFocus)=\"onSearchFocus()\"\n                    (ionBlur)=\"onSearchBlur()\"\n                    placeholder=\"Search and select destination INF...\"\n                    [ngModelOptions]=\"{standalone: true}\"\n                    class=\"inf-searchbar\">\n                  </ion-searchbar>\n\n                  <!-- Hidden select for form integration -->\n                  <ion-select\n                    formControlName=\"to_inf\"\n                    interface=\"action-sheet\"\n                    style=\"display: none;\">\n                    <ion-select-option *ngFor=\"let inf of availableInfs\" [value]=\"inf.id\">\n                      {{ inf.title }}\n                    </ion-select-option>\n                  </ion-select>\n\n                  <!-- Options dropdown -->\n                  <ion-list *ngIf=\"showFilteredOptions && filteredInfs?.length > 0\" class=\"inf-options-list\">\n                    <ion-item\n                      button\n                      *ngFor=\"let inf of filteredInfs; trackBy: trackByInfId\"\n                      (click)=\"selectInf(inf)\"\n                      [class.selected]=\"transferOutForm.get('to_inf')?.value === inf.id\">\n                      <ion-label>{{ inf.title }}</ion-label>\n                      <ion-icon\n                        *ngIf=\"transferOutForm.get('to_inf')?.value === inf.id\"\n                        name=\"checkmark\"\n                        color=\"primary\"\n                        slot=\"end\">\n                      </ion-icon>\n                    </ion-item>\n                  </ion-list>\n\n                  <!-- No results -->\n                  <div *ngIf=\"showFilteredOptions && filteredInfs?.length === 0 && infSearchTerm\" class=\"no-results\">\n                    <p>No INFs found matching \"{{ infSearchTerm }}\"</p>\n                  </div>\n\n                  <div *ngIf=\"showFilteredOptions && filteredInfs?.length === 0 && !infSearchTerm\" class=\"no-results\">\n                    <p>No INF data available.</p>\n                  </div>\n                </div>\n\n                <ion-note class=\"error-note\"\n                  *ngIf=\"transferOutForm.get('to_inf')?.invalid && transferOutForm.get('to_inf')?.touched\">\n                  Please select destination INF\n                </ion-note>\n              </div>\n\n              <ion-item class=\"form-item\">\n                <ion-icon slot=\"start\" name=\"chatbox-outline\" color=\"primary\"></ion-icon>\n                <ion-label position=\"stacked\">Comment / Reason</ion-label>\n                <ion-textarea\n                  formControlName=\"comment\"\n                  rows=\"4\"\n                  placeholder=\"Enter reason for transfer or additional comments\">\n                </ion-textarea>\n              </ion-item>\n\n              <!-- Show sync status if editing -->\n              <ion-item *ngIf=\"isEditMode && existingTransfer\" lines=\"none\" class=\"status-info\">\n                <ion-icon slot=\"start\" name=\"information-circle-outline\" color=\"warning\"></ion-icon>\n                <ion-label>\n                  <p>Status: <strong>{{ existingTransfer.status }}</strong></p>\n                  <p class=\"small-text\">This transfer has not been synced yet. You can still edit it.</p>\n                </ion-label>\n              </ion-item>\n            </div>\n\n            <!-- Action Buttons -->\n            <div class=\"form-actions\">\n              <ion-button type=\"submit\" color=\"success\" class=\"submit-btn\" [disabled]=\"!transferOutForm.valid\">\n                <ion-icon name=\"send-outline\" slot=\"start\"></ion-icon>\n                {{ isEditMode ? 'Update Transfer Request' : 'Submit Transfer Request' }}\n              </ion-button>\n            </div>\n          </form>\n        </ion-card-content>\n      </ion-card>\n    </div>\n  </div>\n\n  <ng-template #loading>\n    <div class=\"loading-container\">\n      <ion-spinner name=\"crescent\"></ion-spinner>\n      <p>Loading...</p>\n    </div>\n  </ng-template>\n</ion-content>\n";

/***/ })

}]);
//# sourceMappingURL=src_app_pages_plw-transfer-out-create_plw-transfer-out-create_module_ts.js.map