(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([["src_app_pages_survey-view_survey-view_module_ts"],{

/***/ 46347:
/*!*****************************************************************!*\
  !*** ./src/app/pages/survey-view/survey-view-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 */   SurveyViewPageRoutingModule: () => (/* binding */ SurveyViewPageRoutingModule)
/* 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 _survey_view_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./survey-view.page */ 71805);




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


/***/ }),

/***/ 27626:
/*!*********************************************************!*\
  !*** ./src/app/pages/survey-view/survey-view.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 */   SurveyViewPageModule: () => (/* binding */ SurveyViewPageModule)
/* 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 _survey_view_routing_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./survey-view-routing.module */ 46347);
/* harmony import */ var _survey_view_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./survey-view.page */ 71805);
/* harmony import */ var src_app_components_shared_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/components/shared.module */ 47774);








let SurveyViewPageModule = class SurveyViewPageModule {};
SurveyViewPageModule = (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, _ionic_angular__WEBPACK_IMPORTED_MODULE_7__.IonicModule, _survey_view_routing_module__WEBPACK_IMPORTED_MODULE_0__.SurveyViewPageRoutingModule, src_app_components_shared_module__WEBPACK_IMPORTED_MODULE_2__.SharedModule],
  declarations: [_survey_view_page__WEBPACK_IMPORTED_MODULE_1__.SurveyViewPage]
})], SurveyViewPageModule);


/***/ }),

/***/ 71805:
/*!*******************************************************!*\
  !*** ./src/app/pages/survey-view/survey-view.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 */   SurveyViewPage: () => (/* binding */ SurveyViewPage)
/* 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_6__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _survey_view_page_html_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./survey-view.page.html?ngResource */ 54143);
/* harmony import */ var _survey_view_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./survey-view.page.scss?ngResource */ 25547);
/* harmony import */ var _survey_view_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_survey_view_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_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ 95072);
/* harmony import */ var src_app_services_survey_form_api_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/services/survey_form_api.service */ 55856);
/* harmony import */ var src_app_util_baseHelper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/util/baseHelper */ 76434);

var _SurveyViewPage;








let SurveyViewPage = (_SurveyViewPage = class SurveyViewPage {
  constructor(activatedRoute, api, b, router) {
    this.activatedRoute = activatedRoute;
    this.api = api;
    this.b = b;
    this.router = router;
  }
  ngOnInit() {
    this.id = this.activatedRoute.snapshot.paramMap.get('id');
    this.load(null);
  }
  load(event) {
    var _this = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        _this.response = (yield _this.api.viewForm(_this.id)).data;
        if (event) {
          setTimeout(() => {
            event.target.complete();
          }, 2000);
        }
      } catch (error) {}
    })();
  }
  getVisibleFields() {
    var _this$response;
    if (!((_this$response = this.response) !== null && _this$response !== void 0 && (_this$response = _this$response.survey_form) !== null && _this$response !== void 0 && _this$response.schema)) return [];
    return this.response.survey_form.schema.filter(field => {
      var _field$templateOption;
      return field.type !== 'template' && ((_field$templateOption = field.templateOptions) === null || _field$templateOption === void 0 ? void 0 : _field$templateOption.type) !== 'hidden' && field.key && this.response.response[field.key] !== undefined && this.response.response[field.key] !== null && this.response.response[field.key] !== '' && this.isFieldVisible(field);
    });
  }
  getTemplates() {
    var _this$response2;
    if (!((_this$response2 = this.response) !== null && _this$response2 !== void 0 && (_this$response2 = _this$response2.survey_form) !== null && _this$response2 !== void 0 && _this$response2.schema)) return [];
    return this.response.survey_form.schema.filter(field => field.type === 'template');
  }
  getCombinedSchemaWithAnswers() {
    var _this$response3;
    if (!((_this$response3 = this.response) !== null && _this$response3 !== void 0 && (_this$response3 = _this$response3.survey_form) !== null && _this$response3 !== void 0 && _this$response3.schema)) return [];
    return this.response.survey_form.schema.filter(field => {
      var _field$templateOption2;
      return ((_field$templateOption2 = field.templateOptions) === null || _field$templateOption2 === void 0 ? void 0 : _field$templateOption2.type) !== 'hidden';
    }).map(field => {
      if (field.type === 'template') {
        return field;
      }
      const hasAnswer = field.key && this.response.response[field.key] !== undefined && this.response.response[field.key] !== null && this.response.response[field.key] !== '' && this.isFieldVisible(field);
      return {
        ...field,
        hasAnswer,
        value: hasAnswer ? this.response.response[field.key] : null
      };
    });
  }
  isFieldVisible(field) {
    if (!field.hideExpression) return true;
    const model = this.response.response;
    try {
      if (typeof field.hideExpression === 'string') {
        let expression = field.hideExpression;
        // Replace model references with actual values
        Object.keys(model).forEach(key => {
          const value = model[key];
          if (Array.isArray(value)) {
            // Handle array values for multicheckbox fields
            expression = expression.replace(new RegExp(`model\\.${key}`, 'g'), JSON.stringify(value));
            expression = expression.replace(new RegExp(`model\\.${key}\\.indexOf\\('([^']+)'\\)`, 'g'), (match, searchValue) => {
              return value.indexOf(searchValue).toString();
            });
          } else {
            expression = expression.replace(new RegExp(`model\\.${key}`, 'g'), typeof value === 'string' ? `'${value}'` : String(value));
          }
        });
        return !eval(expression);
      }
      return true;
    } catch (e) {
      return true;
    }
  }
  getAnswerLabel(field, value) {
    var _field$templateOption4;
    if (value === null || value === undefined) return '';
    // Handle different field types
    switch (field.type) {
      case 'repeat':
        if (Array.isArray(value)) {
          return `${value.length} item${value.length !== 1 ? 's' : ''}`;
        }
        return '0 items';
      case 'multicheckbox':
        if (Array.isArray(value)) {
          var _field$templateOption3;
          const options = (_field$templateOption3 = field.templateOptions) === null || _field$templateOption3 === void 0 ? void 0 : _field$templateOption3.options;
          if (options && Array.isArray(options)) {
            return value.map(v => {
              const option = options.find(opt => opt.value === v);
              return option ? option.label : v;
            }).join(', ');
          }
          return value.join(', ');
        }
        break;
      case 'radio':
        const options = (_field$templateOption4 = field.templateOptions) === null || _field$templateOption4 === void 0 ? void 0 : _field$templateOption4.options;
        if (options && Array.isArray(options)) {
          const option = options.find(opt => opt.value === value);
          return option ? option.label : String(value);
        }
        break;
      case 'checkbox':
        return value === true ? 'Yes' : 'No';
      case 'input':
      case 'textarea':
      default:
        return String(value);
    }
    return String(value);
  }
  getAnswerStyleClass(field, value) {
    const tone = this.resolveAnswerTone(value);
    return `answer-pill--${tone}`;
  }
  getSyncStatusColor(status) {
    switch (status) {
      case 'created':
        return 'success';
      case 'synced':
        return 'primary';
      case 'pending':
        return 'warning';
      case 'failed':
        return 'danger';
      default:
        return 'medium';
    }
  }
  hasResponses() {
    var _this$response4, _this$response5;
    if (!((_this$response4 = this.response) !== null && _this$response4 !== void 0 && (_this$response4 = _this$response4.survey_form) !== null && _this$response4 !== void 0 && _this$response4.schema) || !((_this$response5 = this.response) !== null && _this$response5 !== void 0 && _this$response5.response)) return false;
    return this.response.survey_form.schema.some(field => {
      var _field$templateOption5;
      if (field.type === 'template' || ((_field$templateOption5 = field.templateOptions) === null || _field$templateOption5 === void 0 ? void 0 : _field$templateOption5.type) === 'hidden' || !field.key) {
        return false;
      }
      const value = this.response.response[field.key];
      return value !== undefined && value !== null && value !== '' && this.isFieldVisible(field);
    });
  }
  getRepeatFieldDetails(field, value) {
    var _field$fieldArray;
    if (!Array.isArray(value) || !((_field$fieldArray = field.fieldArray) !== null && _field$fieldArray !== void 0 && _field$fieldArray.fieldGroup)) return [];
    return value.map((item, index) => ({
      index: index + 1,
      item,
      fields: field.fieldArray.fieldGroup
    }));
  }
  formatRepeatFieldValue(fieldConfig, value) {
    var _fieldConfig$template, _fieldConfig$template2;
    if (value === null || value === undefined || value === '') return '-';
    switch (fieldConfig.type) {
      case 'input':
        if (((_fieldConfig$template = fieldConfig.templateOptions) === null || _fieldConfig$template === void 0 ? void 0 : _fieldConfig$template.type) === 'date') {
          return new Date(value).toLocaleDateString();
        }
        if (((_fieldConfig$template2 = fieldConfig.templateOptions) === null || _fieldConfig$template2 === void 0 ? void 0 : _fieldConfig$template2.type) === 'number') {
          return value.toString();
        }
        return value.toString();
      case 'textarea':
        return value.toString();
      default:
        return value.toString();
    }
  }
  getFinalizedAt() {
    if (!this.response) return null;
    return this.response.finalized_at || this.response.finalized_date || this.response.finalized_on || null;
  }
  resolveAnswerTone(value) {
    if (typeof value === 'boolean') {
      return value ? 'success' : 'neutral';
    }
    if (Array.isArray(value)) {
      return value.length > 0 ? 'info' : 'neutral';
    }
    if (typeof value === 'number') {
      return 'info';
    }
    if (typeof value === 'string') {
      const normalized = value.toLowerCase();
      if (['yes', 'true', 'well', 'completed', 'done'].includes(normalized)) {
        return 'success';
      }
      if (['no', 'pending', 'unknown'].includes(normalized)) {
        return 'warning';
      }
      if (['notwell', 'failed', 'critical'].includes(normalized)) {
        return 'danger';
      }
      if (normalized.trim().length > 0) {
        return 'info';
      }
    }
    return 'neutral';
  }
}, _SurveyViewPage.ctorParameters = () => [{
  type: _angular_router__WEBPACK_IMPORTED_MODULE_5__.ActivatedRoute
}, {
  type: src_app_services_survey_form_api_service__WEBPACK_IMPORTED_MODULE_3__.SurveyFormAPIService
}, {
  type: src_app_util_baseHelper__WEBPACK_IMPORTED_MODULE_4__.BaseHelper
}, {
  type: _angular_router__WEBPACK_IMPORTED_MODULE_5__.Router
}], _SurveyViewPage);
SurveyViewPage = (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_7__.Component)({
  selector: 'app-survey-view',
  template: _survey_view_page_html_ngResource__WEBPACK_IMPORTED_MODULE_1__,
  styles: [(_survey_view_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2___default())]
})], SurveyViewPage);


/***/ }),

/***/ 55856:
/*!*****************************************************!*\
  !*** ./src/app/services/survey_form_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 */   SurveyFormAPIService: () => (/* binding */ SurveyFormAPIService)
/* 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 SurveyFormAPIService = class SurveyFormAPIService extends _api_base_service__WEBPACK_IMPORTED_MODULE_0__.APIBaseService {
  constructor() {
    super(...arguments);
    this.namespace = '/survey-forms/responses';
    this.formsNamespace = '/survey-forms';
  }
  getSurveyResponseData(id, type) {
    const url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}${this.namespace}/${type}/${id}`;
    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();
  }
  displayForms(id, beneficiaryType, beneficiaryId) {
    let url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}${this.formsNamespace}/${id}`;
    // Add query parameters if provided
    const queryParams = [];
    if (beneficiaryType) {
      queryParams.push(`beneficiary_type=${encodeURIComponent(beneficiaryType)}`);
    }
    if (beneficiaryId) {
      queryParams.push(`beneficiary_id=${encodeURIComponent(beneficiaryId)}`);
    }
    if (queryParams.length > 0) {
      url += `?${queryParams.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();
  }
  storeSurvey(body) {
    const url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}${this.namespace}`;
    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();
  }
  viewForm(id) {
    const url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}${this.namespace}/${id}`;
    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();
  }
  deleteForm(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();
  }
  deleteSurvey(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();
  }
  // ===== OFFLINE ASSESSMENT APIs =====
  getAssessmentForms(tags, tagMatch = 'all') {
    let url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}/survey-forms/list`;
    const queryParams = [];
    if (tags) {
      queryParams.push(`tags=${encodeURIComponent(tags)}`);
    }
    queryParams.push(`tag_match=${encodeURIComponent(tagMatch)}`);
    if (queryParams.length > 0) {
      url += `?${queryParams.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();
  }
  getLocationData() {
    const url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}/offline-assessment/location-data`;
    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();
  }
  getBeneficiariesByLocation(blockCampId, subBlockIds, assessmentId) {
    let url = `${src_environments_environment__WEBPACK_IMPORTED_MODULE_1__.domain}/offline-assessment/beneficiaries?block_id=${blockCampId}&survey_form_id=${assessmentId}`;
    if (subBlockIds !== null && subBlockIds !== undefined) {
      if (Array.isArray(subBlockIds)) {
        const commaSeparatedIds = subBlockIds.join(',');
        url += `&sub_block_ids=${commaSeparatedIds}`;
      }
    }
    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();
  }
};
SurveyFormAPIService = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.Injectable)({
  providedIn: 'root'
})], SurveyFormAPIService);


/***/ }),

/***/ 25547:
/*!********************************************************************!*\
  !*** ./src/app/pages/survey-view/survey-view.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, `:root {
  --ion-color-primary: #4990E2;
  --ion-color-primary-rgb: 73, 144, 226;
  --ion-color-primary-contrast: #ffffff;
  --ion-color-secondary: #6D5AE6;
  --ion-color-secondary-rgb: 109, 90, 230;
  --ion-color-secondary-contrast: #ffffff;
  --ion-color-tertiary: #FF8A65;
  --ion-color-tertiary-rgb: 255, 138, 101;
  --ion-color-tertiary-contrast: #ffffff;
  --ion-color-success: #2dd36f;
  --ion-color-success-rgb: 45, 211, 111;
  --ion-color-danger: #eb445a;
  --ion-color-danger-rgb: 235, 68, 90;
  --ion-color-warning: #ffc409;
  --ion-color-warning-rgb: 255, 196, 9;
  --ion-color-light: #f4f5f8;
  --ion-color-medium: #92949c;
  --ion-color-dark: #222428;
}

ion-content {
  --padding-start: 16px;
  --padding-end: 16px;
  --padding-top: 20px;
  --padding-bottom: 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-main {
  max-width: 800px;
  margin: 0 auto 24px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
  flex-wrap: wrap;
}

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

.summary-stat--completed .stat-value {
  color: var(--ion-color-success);
}

.summary-stat--in-progress .stat-value {
  color: var(--ion-color-warning);
}

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

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

.summary-stat {
  background: var(--ion-color-light);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}
.summary-stat .stat-label {
  font-size: 12px;
  color: var(--ion-color-medium);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.summary-stat .stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--ion-color-primary);
  line-height: 1.3;
  word-break: break-word;
}

.description-block {
  margin-top: 12px;
  background: rgba(var(--ion-color-primary-rgb), 0.04);
  border-radius: 12px;
  padding: 16px;
}
.description-block .stat-label {
  display: block;
  font-size: 12px;
  color: var(--ion-color-medium);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.description-block .description-content {
  margin: 0;
  color: var(--ion-color-dark);
  font-size: 15px;
  line-height: 1.5;
}

.survey-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.template-section .template-content {
  background: rgba(var(--ion-color-tertiary-rgb), 0.08);
  border-left: 4px solid var(--ion-color-tertiary);
  border-radius: 12px;
  padding: 16px;
  color: var(--ion-color-dark);
  font-size: 14px;
  line-height: 1.5;
}
.template-section .template-content .alert {
  margin: 0;
  border-radius: 10px;
  padding: 14px;
}
.template-section .template-content .alert.alert-primary {
  background: rgba(var(--ion-color-primary-rgb), 0.12);
  color: var(--ion-color-primary-shade);
}
.template-section .template-content .alert.alert-info {
  background: rgba(var(--ion-color-tertiary-rgb), 0.12);
  color: var(--ion-color-tertiary-shade);
}

.question-item {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(var(--ion-color-primary-rgb), 0.12);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.question-item .question-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.question-item .question-row .question-text {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--ion-color-dark);
  line-height: 1.45;
}
.question-item .question-row .answer-pill {
  flex-shrink: 0;
  max-width: 55%;
  min-height: 32px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  background: rgba(146, 148, 156, 0.16);
  color: var(--ion-color-dark);
  border: 1px solid transparent;
  letter-spacing: 0.2px;
}
.question-item .repeat-details .table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--ion-color-light);
}
.question-item .repeat-details .repeat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #ffffff;
}
.question-item .repeat-details .repeat-table thead {
  background: rgba(var(--ion-color-primary-rgb), 0.12);
}
.question-item .repeat-details .repeat-table thead th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 700;
  color: var(--ion-color-primary);
  border-bottom: 2px solid rgba(var(--ion-color-primary-rgb), 0.2);
  font-size: 12px;
  text-transform: uppercase;
}
.question-item .repeat-details .repeat-table thead th:first-child {
  width: 48px;
  text-align: center;
}
.question-item .repeat-details .repeat-table tbody tr {
  border-bottom: 1px solid var(--ion-color-light);
  transition: background 0.2s ease;
}
.question-item .repeat-details .repeat-table tbody tr:nth-child(even) {
  background: rgba(var(--ion-color-primary-rgb), 0.04);
}
.question-item .repeat-details .repeat-table tbody tr:hover {
  background: rgba(var(--ion-color-primary-rgb), 0.08);
}
.question-item .repeat-details .repeat-table tbody tr td {
  padding: 10px 10px;
  vertical-align: top;
  color: var(--ion-color-dark);
  line-height: 1.4;
  word-break: break-word;
}
.question-item .repeat-details .repeat-table tbody tr td.row-number {
  text-align: center;
  font-weight: 700;
  color: var(--ion-color-primary);
}

.answer-pill--success {
  background: rgba(var(--ion-color-success-rgb), 0.16);
  color: var(--ion-color-success);
  border-color: rgba(var(--ion-color-success-rgb), 0.32);
}

.answer-pill--warning {
  background: rgba(var(--ion-color-warning-rgb), 0.18);
  color: var(--ion-color-warning-shade, #b88a00);
  border-color: rgba(var(--ion-color-warning-rgb), 0.36);
}

.answer-pill--danger {
  background: rgba(var(--ion-color-danger-rgb), 0.15);
  color: var(--ion-color-danger);
  border-color: rgba(var(--ion-color-danger-rgb), 0.28);
}

.answer-pill--info {
  background: rgba(var(--ion-color-tertiary-rgb), 0.16);
  color: var(--ion-color-tertiary);
  border-color: rgba(var(--ion-color-tertiary-rgb), 0.3);
}

.answer-pill--neutral {
  background: rgba(146, 148, 156, 0.18);
  color: var(--ion-color-medium);
  border-color: rgba(146, 148, 156, 0.28);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--ion-color-medium);
}
.empty-state ion-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.empty-state h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--ion-color-dark);
}
.empty-state p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  max-width: 320px;
}

@media (max-width: 768px) {
  ion-content {
    --padding-start: 12px;
    --padding-end: 12px;
    --padding-top: 16px;
    --padding-bottom: 16px;
  }
  .section-title-main {
    font-size: 20px;
  }
  .section-title-main ion-icon {
    font-size: 24px;
  }
  .section-header {
    padding: 0 12px;
  }
  .summary-stat .stat-value {
    font-size: 16px;
  }
  .question-item .question-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .question-item .question-row .answer-pill {
    max-width: 100%;
    width: 100%;
  }
  .question-item .repeat-details .repeat-table {
    font-size: 12px;
  }
  .question-item .repeat-details .repeat-table thead th,
  .question-item .repeat-details .repeat-table tbody td {
    padding: 8px 6px;
  }
}
@media (prefers-color-scheme: dark) {
  ion-card {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    background: #1c1c1d;
  }
  .summary-stat {
    background: rgba(255, 255, 255, 0.04);
  }
  .summary-stat .stat-value {
    color: var(--ion-color-primary-tint);
  }
  .description-block {
    background: rgba(255, 255, 255, 0.05);
  }
  .question-item {
    background: #1f1f20;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  }
  .question-item .answer-pill {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f4f5f8;
  }
  .template-section .template-content {
    background: rgba(var(--ion-color-tertiary-rgb), 0.16);
  }
  .repeat-details .table-container {
    border-color: rgba(255, 255, 255, 0.08);
  }
  .repeat-table {
    background: transparent;
  }
  .repeat-table thead {
    background: rgba(var(--ion-color-primary-rgb), 0.18);
  }
  .repeat-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .repeat-table tbody tr:nth-child(even) {
    background: rgba(var(--ion-color-primary-rgb), 0.08);
  }
  .repeat-table tbody tr:hover {
    background: rgba(var(--ion-color-primary-rgb), 0.18);
  }
  .answer-pill--success {
    background: rgba(var(--ion-color-success-rgb), 0.26);
    color: var(--ion-color-success);
  }
  .answer-pill--warning {
    background: rgba(var(--ion-color-warning-rgb), 0.28);
    color: var(--ion-color-warning);
  }
  .answer-pill--danger {
    background: rgba(var(--ion-color-danger-rgb), 0.24);
    color: var(--ion-color-danger);
  }
  .answer-pill--info {
    background: rgba(var(--ion-color-tertiary-rgb), 0.26);
    color: var(--ion-color-tertiary);
  }
  .answer-pill--neutral {
    background: rgba(146, 148, 156, 0.28);
    color: var(--ion-color-medium);
  }
}`, "",{"version":3,"sources":["webpack://./src/app/pages/survey-view/survey-view.page.scss"],"names":[],"mappings":"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","sourcesContent":[":root {\n  --ion-color-primary: #4990E2;\n  --ion-color-primary-rgb: 73, 144, 226;\n  --ion-color-primary-contrast: #ffffff;\n  --ion-color-secondary: #6D5AE6;\n  --ion-color-secondary-rgb: 109, 90, 230;\n  --ion-color-secondary-contrast: #ffffff;\n  --ion-color-tertiary: #FF8A65;\n  --ion-color-tertiary-rgb: 255, 138, 101;\n  --ion-color-tertiary-contrast: #ffffff;\n  --ion-color-success: #2dd36f;\n  --ion-color-success-rgb: 45, 211, 111;\n  --ion-color-danger: #eb445a;\n  --ion-color-danger-rgb: 235, 68, 90;\n  --ion-color-warning: #ffc409;\n  --ion-color-warning-rgb: 255, 196, 9;\n  --ion-color-light: #f4f5f8;\n  --ion-color-medium: #92949c;\n  --ion-color-dark: #222428;\n}\n\nion-content {\n  --padding-start: 16px;\n  --padding-end: 16px;\n  --padding-top: 20px;\n  --padding-bottom: 20px;\n}\n\n.card-container {\n  max-width: 800px;\n  margin: 0 auto 20px auto;\n}\n\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-main {\n  max-width: 800px;\n  margin: 0 auto 24px auto;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  padding: 0 4px;\n  flex-wrap: wrap;\n}\n\n.section-title-main {\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  flex: 1 1 auto;\n\n  ion-icon {\n    font-size: 28px;\n    flex-shrink: 0;\n  }\n}\n\n.summary-stat--completed {\n  .stat-value {\n    color: var(--ion-color-success);\n  }\n}\n\n.summary-stat--in-progress {\n  .stat-value {\n    color: var(--ion-color-warning);\n  }\n}\n\n.section-header {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-bottom: 16px;\n  padding: 0 16px;\n  gap: 16px;\n  flex-wrap: wrap;\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  flex: 1 1 auto;\n  min-width: 0;\n\n  ion-icon {\n    font-size: 24px;\n    flex-shrink: 0;\n  }\n}\n\n.summary-stat {\n  background: var(--ion-color-light);\n  border-radius: 12px;\n  padding: 16px;\n  display: flex;\n  flex-direction: column;\n  gap: 6px;\n  height: 100%;\n\n  .stat-label {\n    font-size: 12px;\n    color: var(--ion-color-medium);\n    font-weight: 600;\n    text-transform: uppercase;\n    letter-spacing: 0.6px;\n  }\n\n  .stat-value {\n    font-size: 18px;\n    font-weight: 700;\n    color: var(--ion-color-primary);\n    line-height: 1.3;\n    word-break: break-word;\n  }\n}\n\n.description-block {\n  margin-top: 12px;\n  background: rgba(var(--ion-color-primary-rgb), 0.04);\n  border-radius: 12px;\n  padding: 16px;\n\n  .stat-label {\n    display: block;\n    font-size: 12px;\n    color: var(--ion-color-medium);\n    font-weight: 600;\n    text-transform: uppercase;\n    letter-spacing: 0.6px;\n    margin-bottom: 8px;\n  }\n\n  .description-content {\n    margin: 0;\n    color: var(--ion-color-dark);\n    font-size: 15px;\n    line-height: 1.5;\n  }\n}\n\n.survey-content {\n  display: flex;\n  flex-direction: column;\n  gap: 18px;\n}\n\n.template-section {\n  .template-content {\n    background: rgba(var(--ion-color-tertiary-rgb), 0.08);\n    border-left: 4px solid var(--ion-color-tertiary);\n    border-radius: 12px;\n    padding: 16px;\n    color: var(--ion-color-dark);\n    font-size: 14px;\n    line-height: 1.5;\n\n    .alert {\n      margin: 0;\n      border-radius: 10px;\n      padding: 14px;\n\n      &.alert-primary {\n        background: rgba(var(--ion-color-primary-rgb), 0.12);\n        color: var(--ion-color-primary-shade);\n      }\n\n      &.alert-info {\n        background: rgba(var(--ion-color-tertiary-rgb), 0.12);\n        color: var(--ion-color-tertiary-shade);\n      }\n    }\n  }\n}\n\n.question-item {\n  padding: 16px;\n  border-radius: 14px;\n  border: 1px solid rgba(var(--ion-color-primary-rgb), 0.12);\n  background: #ffffff;\n  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n\n  .question-row {\n    display: flex;\n    align-items: flex-start;\n    justify-content: space-between;\n    gap: 16px;\n\n    .question-text {\n      flex: 1;\n      font-size: 15px;\n      font-weight: 600;\n      color: var(--ion-color-dark);\n      line-height: 1.45;\n    }\n\n    .answer-pill {\n      flex-shrink: 0;\n      max-width: 55%;\n      min-height: 32px;\n      padding: 7px 16px;\n      border-radius: 999px;\n      font-size: 13px;\n      font-weight: 600;\n      line-height: 1.35;\n      text-align: center;\n      white-space: normal;\n      background: rgba(146, 148, 156, 0.16);\n      color: var(--ion-color-dark);\n      border: 1px solid transparent;\n      letter-spacing: 0.2px;\n    }\n  }\n\n    .repeat-details {\n    .table-container {\n      overflow-x: auto;\n      border-radius: 12px;\n      border: 1px solid var(--ion-color-light);\n    }\n\n    .repeat-table {\n      width: 100%;\n      border-collapse: collapse;\n      font-size: 13px;\n      background: #ffffff;\n\n      thead {\n        background: rgba(var(--ion-color-primary-rgb), 0.12);\n\n        th {\n          padding: 12px 10px;\n          text-align: left;\n          font-weight: 700;\n          color: var(--ion-color-primary);\n          border-bottom: 2px solid rgba(var(--ion-color-primary-rgb), 0.2);\n          font-size: 12px;\n          text-transform: uppercase;\n\n          &:first-child {\n            width: 48px;\n            text-align: center;\n          }\n        }\n      }\n\n      tbody {\n        tr {\n          border-bottom: 1px solid var(--ion-color-light);\n          transition: background 0.2s ease;\n\n          &:nth-child(even) {\n            background: rgba(var(--ion-color-primary-rgb), 0.04);\n          }\n\n          &:hover {\n            background: rgba(var(--ion-color-primary-rgb), 0.08);\n          }\n\n          td {\n            padding: 10px 10px;\n            vertical-align: top;\n            color: var(--ion-color-dark);\n            line-height: 1.4;\n            word-break: break-word;\n\n            &.row-number {\n              text-align: center;\n              font-weight: 700;\n              color: var(--ion-color-primary);\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n.answer-pill--success {\n  background: rgba(var(--ion-color-success-rgb), 0.16);\n  color: var(--ion-color-success);\n  border-color: rgba(var(--ion-color-success-rgb), 0.32);\n}\n\n.answer-pill--warning {\n  background: rgba(var(--ion-color-warning-rgb), 0.18);\n  color: var(--ion-color-warning-shade, #b88a00);\n  border-color: rgba(var(--ion-color-warning-rgb), 0.36);\n}\n\n.answer-pill--danger {\n  background: rgba(var(--ion-color-danger-rgb), 0.15);\n  color: var(--ion-color-danger);\n  border-color: rgba(var(--ion-color-danger-rgb), 0.28);\n}\n\n.answer-pill--info {\n  background: rgba(var(--ion-color-tertiary-rgb), 0.16);\n  color: var(--ion-color-tertiary);\n  border-color: rgba(var(--ion-color-tertiary-rgb), 0.3);\n}\n\n.answer-pill--neutral {\n  background: rgba(146, 148, 156, 0.18);\n  color: var(--ion-color-medium);\n  border-color: rgba(146, 148, 156, 0.28);\n}\n\n.empty-state {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 60px 20px;\n  text-align: center;\n  color: var(--ion-color-medium);\n\n  ion-icon {\n    font-size: 48px;\n    margin-bottom: 12px;\n  }\n\n  h3 {\n    margin: 0 0 8px;\n    font-size: 20px;\n    color: var(--ion-color-dark);\n  }\n\n  p {\n    margin: 0;\n    font-size: 14px;\n    line-height: 1.6;\n    max-width: 320px;\n  }\n}\n\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  .section-title-main {\n    font-size: 20px;\n\n    ion-icon {\n      font-size: 24px;\n    }\n  }\n\n  .section-header {\n    padding: 0 12px;\n  }\n\n  .summary-stat .stat-value {\n    font-size: 16px;\n  }\n\n  .question-item {\n    .question-row {\n      flex-direction: column;\n      align-items: flex-start;\n\n      .answer-pill {\n        max-width: 100%;\n        width: 100%;\n      }\n    }\n\n    .repeat-details .repeat-table {\n      font-size: 12px;\n\n      thead th,\n      tbody td {\n        padding: 8px 6px;\n      }\n    }\n  }\n}\n\n@media (prefers-color-scheme: dark) {\n  ion-card {\n    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);\n    background: #1c1c1d;\n  }\n\n  .summary-stat {\n    background: rgba(255, 255, 255, 0.04);\n\n    .stat-value {\n      color: var(--ion-color-primary-tint);\n    }\n  }\n\n  .description-block {\n    background: rgba(255, 255, 255, 0.05);\n  }\n\n  .question-item {\n    background: #1f1f20;\n    border-color: rgba(255, 255, 255, 0.08);\n    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);\n  }\n\n  .question-item .answer-pill {\n    background: rgba(255, 255, 255, 0.06);\n    border-color: rgba(255, 255, 255, 0.12);\n    color: #f4f5f8;\n  }\n\n  .template-section .template-content {\n    background: rgba(var(--ion-color-tertiary-rgb), 0.16);\n  }\n\n  .repeat-details .table-container {\n    border-color: rgba(255, 255, 255, 0.08);\n  }\n\n  .repeat-table {\n    background: transparent;\n\n    thead {\n      background: rgba(var(--ion-color-primary-rgb), 0.18);\n    }\n\n    tbody tr {\n      border-bottom: 1px solid rgba(255, 255, 255, 0.08);\n\n      &:nth-child(even) {\n        background: rgba(var(--ion-color-primary-rgb), 0.08);\n      }\n\n      &:hover {\n        background: rgba(var(--ion-color-primary-rgb), 0.18);\n      }\n    }\n  }\n  \n  .answer-pill--success {\n    background: rgba(var(--ion-color-success-rgb), 0.26);\n    color: var(--ion-color-success);\n  }\n\n  .answer-pill--warning {\n    background: rgba(var(--ion-color-warning-rgb), 0.28);\n    color: var(--ion-color-warning);\n  }\n\n  .answer-pill--danger {\n    background: rgba(var(--ion-color-danger-rgb), 0.24);\n    color: var(--ion-color-danger);\n  }\n\n  .answer-pill--info {\n    background: rgba(var(--ion-color-tertiary-rgb), 0.26);\n    color: var(--ion-color-tertiary);\n  }\n\n  .answer-pill--neutral {\n    background: rgba(146, 148, 156, 0.28);\n    color: var(--ion-color-medium);\n  }\n}\n"],"sourceRoot":""}]);
// Exports
module.exports = ___CSS_LOADER_EXPORT___.toString();


/***/ }),

/***/ 54143:
/*!********************************************************************!*\
  !*** ./src/app/pages/survey-view/survey-view.page.html?ngResource ***!
  \********************************************************************/
/***/ ((module) => {

"use strict";
module.exports = "<ion-header>\n  <ion-toolbar>\n    <ion-buttons slot=\"start\">\n      <ion-back-button defaultHref=\"woman-list\"></ion-back-button>\n    </ion-buttons>\n    <ion-title>{{ response?.survey_form?.title || '-' }}</ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n  <ng-container *ngIf=\"response; else skeleton\">\n    <div class=\"section-header-main\">\n      <h2 class=\"section-title-main\">\n        <ion-icon name=\"clipboard-outline\" color=\"primary\"></ion-icon>\n        {{ response?.survey_form?.title || 'Survey Response' }}\n      </h2>\n    </div>\n\n    <div class=\"card-container\">\n      <ion-card class=\"survey-summary-card\">\n        <div class=\"section-header\">\n          <h2 class=\"section-title\">\n            <ion-icon name=\"information-circle-outline\" color=\"primary\"></ion-icon>\n            Survey Summary\n          </h2>\n        </div>\n        <ion-card-content>\n          <ion-grid>\n            <ion-row>\n              <ion-col size=\"12\" size-md=\"4\" *ngIf=\"response?.created_at\">\n                <div class=\"summary-stat\">\n                  <span class=\"stat-label\">Created On</span>\n                  <span class=\"stat-value\">{{ response.created_at | date:'d MMM yyyy, h:mm a' }}</span>\n                </div>\n              </ion-col>\n              <ion-col size=\"12\" size-md=\"4\" *ngIf=\"response?.updated_at\">\n                <div class=\"summary-stat\">\n                  <span class=\"stat-label\">Last Updated</span>\n                  <span class=\"stat-value\">{{ response.updated_at | date:'d MMM yyyy, h:mm a' }}</span>\n                </div>\n              </ion-col>\n              <ion-col size=\"12\" size-md=\"4\">\n                <div class=\"summary-stat\" [ngClass]=\"response?.is_finalized ? 'summary-stat--completed' : 'summary-stat--in-progress'\">\n                  <span class=\"stat-label\">Finalized</span>\n                  <span class=\"stat-value\">\n                    {{ response?.is_finalized ? (getFinalizedAt() ? (getFinalizedAt() | date:'d MMM yyyy, h:mm a') : '-') : 'In Progress' }}\n                  </span>\n                </div>\n              </ion-col>\n            </ion-row>\n            <ion-row *ngIf=\"response?.survey_form?.description\">\n              <ion-col size=\"12\">\n                <div class=\"description-block\">\n                  <span class=\"stat-label\">Description</span>\n                  <div class=\"description-content\" [innerHTML]=\"response.survey_form.description\"></div>\n                </div>\n              </ion-col>\n            </ion-row>\n          </ion-grid>\n        </ion-card-content>\n      </ion-card>\n    </div>\n\n    <div class=\"card-container\">\n      <ion-card class=\"survey-response-card\">\n        <div class=\"section-header\">\n          <h2 class=\"section-title\">\n            <ion-icon name=\"list-outline\" color=\"primary\"></ion-icon>\n            Responses\n          </h2>\n        </div>\n        <ion-card-content>\n          <div class=\"survey-content\" *ngIf=\"hasResponses(); else noResponses\">\n            <ng-container *ngFor=\"let item of getCombinedSchemaWithAnswers()\">\n              <div *ngIf=\"item.type === 'template'\" class=\"template-section\">\n                <div [innerHTML]=\"item.templateOptions?.template\" class=\"template-content\"></div>\n              </div>\n\n              <div *ngIf=\"item.type !== 'template' && item.hasAnswer\" class=\"question-item\">\n                <div class=\"question-row\">\n                  <div class=\"question-text\">{{ item.templateOptions?.label }}</div>\n                  <div\n                    class=\"answer-pill\"\n                    [ngClass]=\"getAnswerStyleClass(item, item.value)\">\n                    {{ getAnswerLabel(item, item.value) }}\n                  </div>\n                </div>\n\n                <div *ngIf=\"item.type === 'repeat' && item.value && item.value.length > 0\" class=\"repeat-details\">\n                  <div class=\"table-container\">\n                    <table class=\"repeat-table\">\n                      <thead>\n                        <tr>\n                          <th>#</th>\n                          <th *ngFor=\"let field of getRepeatFieldDetails(item, item.value)[0]?.fields\">\n                            {{ field.templateOptions?.label }}\n                          </th>\n                        </tr>\n                      </thead>\n                      <tbody>\n                        <tr *ngFor=\"let detail of getRepeatFieldDetails(item, item.value)\">\n                          <td class=\"row-number\">{{ detail.index }}</td>\n                          <td *ngFor=\"let field of detail.fields\">\n                            {{ formatRepeatFieldValue(field, detail.item[field.key]) }}\n                          </td>\n                        </tr>\n                      </tbody>\n                    </table>\n                  </div>\n                </div>\n              </div>\n            </ng-container>\n          </div>\n\n          <ng-template #noResponses>\n            <div class=\"empty-state\">\n              <ion-icon name=\"document-outline\" color=\"medium\"></ion-icon>\n              <h3>No responses recorded</h3>\n              <p>We could not find any answered questions for this submission.</p>\n            </div>\n          </ng-template>\n        </ion-card-content>\n      </ion-card>\n    </div>\n  </ng-container>\n\n  <ng-template #skeleton>\n    <app-skeleton></app-skeleton>\n  </ng-template>\n</ion-content>\n";

/***/ })

}]);
//# sourceMappingURL=src_app_pages_survey-view_survey-view_module_ts.js.map