@rangertechnologies/ngnxt 2.2.9 → 2.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61075,14 +61075,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
61075
61075
  /* tslint:disable */
61076
61076
  const VERSION = {
61077
61077
  "dirty": true,
61078
- "raw": "d9680848-dirty",
61079
- "hash": "d9680848",
61078
+ "raw": "fdf4e7f0-dirty",
61079
+ "hash": "fdf4e7f0",
61080
61080
  "distance": null,
61081
61081
  "tag": null,
61082
61082
  "semver": null,
61083
- "suffix": "d9680848-dirty",
61083
+ "suffix": "fdf4e7f0-dirty",
61084
61084
  "semverString": null,
61085
- "version": "2.2.9"
61085
+ "version": "2.2.10"
61086
61086
  };
61087
61087
  /* tslint:enable */
61088
61088
 
@@ -69226,7 +69226,7 @@ class PropertiesComponent {
69226
69226
  }
69227
69227
  }
69228
69228
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PropertiesComponent, deps: [{ token: FormBuilderService }, { token: TemplateService }, { token: TranslationService }, { token: i0.ChangeDetectorRef }, { token: DataService }, { token: CelValidatorService }], target: i0.ɵɵFactoryTarget.Component });
69229
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: PropertiesComponent, isStandalone: true, selector: "app-properties", inputs: { templateSelected: "templateSelected", selectedElementType: "selectedElementType" }, outputs: { formButtonHandler: "formButtonHandler", templateSaveHandler: "templateSaveHandler" }, host: { listeners: { "document:click": "onClickOutside($event)" } }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], ngImport: i0, template: "<!-- AP 22JAN25 - Field and Element Properties -->\n\n<div class=\"container\">\n <div class=\"tabs\">\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'attributes'}\" (click)=\"setActiveTab('attributes')\">{{ 'ATTRIBUTES' | nxtCustomTranslate : 'Attributes' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'property'}\" (click)=\"setActiveTab('property')\">{{ 'PROPERTY' | nxtCustomTranslate : 'Property' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'appearance'}\" (click)=\"setActiveTab('appearance')\">{{ 'APPEARANCE' | nxtCustomTranslate : 'Appearance' }}</div>\n </div>\n @if (activeTab() === 'attributes') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @defer (when selectedElement()?.type === 'Image') {\n @if (selectedElement().imageData) {\n <image-cropper\n [imageBase64]=\"selectedElement().orgImageData\"\n [disabled]=\"false\"\n [alignImage]=\"alignImage\"\n [roundCropper]=\"roundCropper\"\n [backgroundColor]=\"'white'\"\n imageAltText=\"Alternative image text\"\n [allowMoveImage]=\"false\"\n [hideResizeSquares]=\"false\"\n [canvasRotation]=\"canvasRotation()\"\n [aspectRatio]=\"aspectRatio\"\n [containWithinAspectRatio]=\"false\"\n [maintainAspectRatio]=\"false\"\n [cropperStaticWidth]=\"cropperStaticWidth\"\n [cropperStaticHeight]=\"cropperStaticHeight\"\n [cropperMinWidth]=\"cropperMinWidth\"\n [cropperMinHeight]=\"cropperMinHeight\"\n [cropperMaxWidth]=\"cropperMaxWidth\"\n [cropperMaxHeight]=\"cropperMaxHeight\"\n [resetCropOnAspectRatioChange]=\"true\"\n [(cropper)]=\"cropper\"\n [(transform)]=\"transform\"\n [onlyScaleDown]=\"true\"\n output=\"blob\"\n format=\"png\"\n (imageCropped)=\"imageCropped($event)\"\n (cropperReady)=\"cropperReady($event)\"\n ></image-cropper>\n }\n @if (selectedElement().imageData) {\n <div style=\"display: flex; gap: 2px;\">\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateLeft()\" title=\"{{ 'ROTATE_LEFT' | nxtCustomTranslate : 'Rotate Left' }}\">\u27F2</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateRight()\" title=\"{{ 'ROTATE_RIGHT' | nxtCustomTranslate : 'Rotate Right' }}\">\u27F3</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomOut()\" title=\"{{ 'ZOOM_OUT' | nxtCustomTranslate : 'Zoom Out' }}\">-</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomIn()\" title=\"{{ 'ZOOM_IN' | nxtCustomTranslate : 'Zoom In' }}\">+</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveLeft()\" title=\"{{ 'MOVE_LEFT' | nxtCustomTranslate : 'Move Left' }}\">\u2190</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveRight()\" title=\"{{ 'MOVE_RIGHT' | nxtCustomTranslate : 'Move Right' }}\">\u2192</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveUp()\" title=\"{{ 'MOVE_UP' | nxtCustomTranslate : 'Move Up' }}\">\u2191</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveDown()\" title=\"{{ 'MOVE_DOWN' | nxtCustomTranslate : 'Move Down' }}\">\u2193</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipHorizontal()\" [ngClass]=\"{'enabled': transform().flipH}\" title=\"{{ 'FLIP_HORIZONTALLY' | nxtCustomTranslate : 'Flip Horizontally' }}\">\u2194</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipVertical()\" [ngClass]=\"{'enabled': transform().flipV}\" title=\"{{ 'FLIP_VERTICALLY' | nxtCustomTranslate : 'Flip Vertically' }}\">\u2195</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"resetImage()\" title=\"{{ 'RESET' | nxtCustomTranslate : 'Reset' }}\">\u00D7</div>\n </div>\n }\n }\n @if (selectedElement()?.type === 'Book') {\n <div>\n <label class=\"text-sm\">{{ 'SEARCH_BOOK' | nxtCustomTranslate : 'Search Book' }}</label>\n <div style=\"display: flex; gap: 2px; align-items: center; justify-content: center;\">\n <nxt-search-box\n [question]=\"selectedElement()\"\n [apiMeta]=\"bookSubtext()\"\n [placeHolderText]=\"'SEARCH' | nxtCustomTranslate : 'Search...'\"\n (searchValueChange)=\"childEventCapture($event.value)\"\n ></nxt-search-box>\n <div class=\"link-icon\">\n <svg (click)=\"linkToggleDropdown($event)\" fill=\"#000000\" version=\"1.1\" id=\"Capa_1\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24px\" height=\"24px\"\n viewBox=\"0 0 450 450\" xml:space=\"preserve\">\n <g>\n <g>\n <g>\n <path d=\"M318.15,230.195l77.934-77.937c31.894-31.892,31.894-83.782-0.004-115.674l-12.66-12.66\n c-31.893-31.896-83.78-31.896-115.674-0.004l-77.937,77.934c-17.588,17.588-25.457,41.264-23.646,64.311\n c-23.045-1.813-46.722,6.056-64.308,23.647L23.92,267.748c-31.894,31.889-31.894,83.779,0,115.674l12.664,12.662\n c31.893,31.893,83.783,31.893,115.674,0l77.935-77.936c17.592-17.59,25.459-41.266,23.647-64.309\n C276.884,255.654,300.56,247.783,318.15,230.195z M202.653,290.605l-77.936,77.938c-16.705,16.703-43.889,16.703-60.59,0\n l-12.666-12.666c-16.705-16.701-16.703-43.885,0-60.594l77.936-77.932c14.14-14.141,35.779-16.306,52.226-6.516l-32.302,32.307\n c-7.606,7.604-7.606,19.938,0,27.541c7.605,7.607,19.937,7.607,27.541,0l32.306-32.303\n C218.959,254.828,216.795,276.469,202.653,290.605z M238.382,209.169l32.299-32.306c7.608-7.602,7.608-19.935,0-27.538\n c-7.604-7.61-19.936-7.61-27.541-0.004l-32.303,32.303c-9.791-16.446-7.627-38.087,6.514-52.226l77.935-77.935\n c16.707-16.707,43.89-16.707,60.594,0l12.664,12.664c16.705,16.705,16.705,43.886,0,60.591l-77.936,77.937\n C276.468,216.797,254.828,218.959,238.382,209.169z\" />\n <path d=\"M343.466,261.465c-45.287,0-82,36.713-82,82s36.713,82,82,82c45.286,0,82-36.713,82-82S388.753,261.465,343.466,261.465z\n M372.505,333.564l-56.046,56.104c-0.239,0.238-0.536,0.41-0.862,0.496l-22.315,5.85c-0.649,0.168-1.347-0.02-1.822-0.494\n c-0.477-0.479-0.666-1.172-0.496-1.824l5.826-22.318c0.084-0.326,0.256-0.627,0.494-0.863l56.047-56.104\n c0.742-0.742,1.945-0.744,2.688-0.002l4.548,4.541c0.739,0.74,0.741,1.943,0,2.688l-37.433,37.471l4.709,4.703l37.435-37.471\n c0.739-0.742,1.94-0.742,2.682-0.002l4.55,4.541C373.25,331.617,373.25,332.822,372.505,333.564z M395.472,310.574l-17,17.018\n c-0.739,0.744-1.942,0.744-2.685,0.002l-16.489-16.475c-0.744-0.74-0.744-1.943-0.002-2.688l17-17.02\n c0.741-0.74,1.944-0.74,2.688-0.002l16.487,16.477C396.216,308.629,396.216,309.832,395.472,310.574z\" />\n </g>\n </g>\n </g>\n </svg>\n @if (isLinkDropdownOpen()) {\n <div class=\"link-dropdown-menu\" #dropdown>\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().endpoint\" (ngModelChange)=\"updateBookSubtext('endpoint', $event)\" />\n <label>{{ 'VARIABLE' | nxtCustomTranslate : 'Variable' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().variable\" (ngModelChange)=\"updateBookSubtext('variable', $event)\" />\n <label>{{ 'FIELD' | nxtCustomTranslate : 'Field' }}:</label>\n <input type=\"text\" [ngModel]=\"fieldAsString()\" (ngModelChange)=\"updateField($event)\" />\n <label>{{ 'DEFAULT_FIELD' | nxtCustomTranslate : 'Default Field' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().defaultField\" (ngModelChange)=\"updateBookSubtext('defaultField', $event)\" />\n </div>\n }\n </div>\n </div>\n </div>\n }\n @for (prop of getProperties()?.elementProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'checkbox' && prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.isTranslate && formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if (((selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? selectColumn() : selectedElement().id) + '.' + prop.key | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n <!-- Copy Icon -->\n @if (!copied) {\n <svg\n (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" transform=\"rotate(0)\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#CCCCCC\" stroke-width=\"0.048\"></g><g id=\"SVGRepo_iconCarrier\"> <g id=\"style=stroke\"> <g id=\"copy\"> <path id=\"rec (Stroke)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 5.25C6.25 2.50265 8.43733 0.25 11.1667 0.25H17.8333C20.5627 0.25 22.75 2.50265 22.75 5.25V13.75C22.75 16.4974 20.5627 18.75 17.8333 18.75C17.4191 18.75 17.0833 18.4142 17.0833 18C17.0833 17.5858 17.4191 17.25 17.8333 17.25C19.7064 17.25 21.25 15.6971 21.25 13.75V5.25C21.25 3.30293 19.7064 1.75 17.8333 1.75H11.1667C9.29363 1.75 7.75 3.30293 7.75 5.25C7.75 5.66421 7.41421 6 7 6C6.58579 6 6.25 5.66421 6.25 5.25Z\" fill=\"#000000\"></path> <path id=\"rec (Stroke)_2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 10.25C1.25 7.50265 3.43733 5.25 6.16667 5.25H12.8333C15.5627 5.25 17.75 7.50265 17.75 10.25V18.75C17.75 21.4974 15.5627 23.75 12.8333 23.75H6.16667C3.43733 23.75 1.25 21.4974 1.25 18.75V10.25ZM6.16667 6.75C4.29363 6.75 2.75 8.30293 2.75 10.25V18.75C2.75 20.6971 4.29363 22.25 6.16667 22.25H12.8333C14.7064 22.25 16.25 20.6971 16.25 18.75V10.25C16.25 8.30293 14.7064 6.75 12.8333 6.75H6.16667Z\" fill=\"#000000\"></path> </g> </g> </g></svg>\n }\n <!-- Copied Message -->\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n @if (prop.key === 'helpText' && selectedElement()?.helpText) {\n <div>{{ selectedElement()?.helpText }}</div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'number') {\n <input\n type=\"number\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n }\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n <span class=\"toggle-label\" style=\"padding-left: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n </div>\n }\n @if (prop.type === 'subQuestion') {\n <div>\n <div style=\"display: flex; flex-direction: row; gap: 10px; align-items: center;\">\n <div>{{ prop.labelPath | nxtCustomTranslate : prop.label }}</div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n @if (selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)) {\n <div>\n @for (subProp of prop.subQuestion; track subProp) {\n <div style=\"background-color: #e7f2ff; padding: 8px; border-radius: 4px;\">\n <div class=\"form-group\">\n <label>{{ subProp.labelPath | nxtCustomTranslate : subProp.label }}</label>\n @if (subProp.type === 'array') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"subProp.operands ? subProp.operands.includes(column.apiName) : false\"\n (change)=\"onCheckboxChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName, $event.target.checked)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'radio') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"radio\"\n [name]=\"subProp.key\"\n [value]=\"column.apiName\"\n [checked]=\"getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) === column.apiName\"\n (change)=\"onRadioChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"subProp.placeholder\"\n [ngModel]=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) : (selectedElement() | getValueByPath : subProp.key)) : (selectedElement() | getValueByPath : subProp.key)\"\n (ngModelChange)=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event,false, prop.isTranslate) : setValueByPath(subProp.key, $event)) : setValueByPath(subProp.key, $event, prop.isTranslate)\"\n />\n }\n @if (subProp.type === 'boolean') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n @if (subProp.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? (getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, subProp.isTableColumn)) : (selectedElement() | getValueByPath : subProp.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event, subProp.isTableColumn, prop.isTranslate) : setValueByPath(subProp.key, $event, prop.isTranslate))\"\n >\n @for (option of subProp.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (subProp.type === 'checkbox') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n @if (prop.type === 'align') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onAlignSelect(option.value)\" [ngClass]=\"{'active': selectedElement()?.textAlign === option.value}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'style') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onStyleSelect(option.value)\" [ngClass]=\"{'active': isStyleActive(option.value)}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'color') {\n <div>\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n @if (prop.key === 'title') {\n <!-- MR 17NOV26 Compact Action Buttons in Sidebar -->\n <div class=\"action-buttons-sidebar-container\">\n <div class=\"action-buttons-sidebar-header\">\n <div class=\"action-buttons-sidebar-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <rect x=\"3\" y=\"6\" width=\"18\" height=\"12\" rx=\"3\"></rect>\n <path d=\"M7 12h10\"></path>\n </svg>\n <span>{{ 'ACTION_BUTTONS' | nxtCustomTranslate : 'Action Buttons' }}</span>\n </div>\n <button type=\"button\" (click)=\"openAddButtonModal()\" class=\"add-action-button-btn\">\n + {{ 'ADD_BUTTON' | nxtCustomTranslate : 'Add Button' }}\n </button>\n </div>\n\n <div class=\"action-buttons-card-list\">\n @for (btn of book()?.questionbook?.action || []; track btn.id || $index; let i = $index) {\n <div class=\"action-button-summary-card\">\n <div class=\"action-button-card-top\">\n <div class=\"action-button-card-info\">\n <span class=\"action-button-card-name\">{{ btn.name || ('UNNAMED' | nxtCustomTranslate : 'Unnamed') }}</span>\n <span class=\"action-button-card-event\">{{ btn.eventtoemit || 'default' }}</span>\n </div>\n <div class=\"action-button-card-actions\">\n <button type=\"button\" class=\"action-card-btn edit\" (click)=\"openEditButtonModal(i)\" title=\"Edit Button\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n </button>\n <button type=\"button\" class=\"action-card-btn remove\" (click)=\"removeButton(btn)\" title=\"Remove Button\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <polyline points=\"3 6 5 6 21 6\"></polyline>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path>\n </svg>\n </button>\n </div>\n </div>\n <div class=\"action-button-card-meta\">\n <span class=\"action-card-badge\">ID: {{ btn.id }}</span>\n @if (btn.method) {\n <span class=\"action-card-badge method\">{{ btn.method }}</span>\n }\n @if (btn.positionPercent !== undefined && btn.positionPercent !== null) {\n <span class=\"action-card-badge\">{{ btn.positionPercent }}%</span>\n }\n @if (btn.enableConfirm) {\n <span class=\"action-card-badge confirm\">Confirm</span>\n }\n @if (btn.rules && btn.rules.length > 0) {\n <span class=\"action-card-badge rules\">{{ btn.rules.length }} Rule{{ btn.rules.length > 1 ? 's' : '' }}</span>\n }\n </div>\n </div>\n }\n @if (!book()?.questionbook?.action?.length) {\n <div class=\"action-buttons-empty\">\n <span>{{ 'NO_BUTTONS_CONFIGURED' | nxtCustomTranslate : 'No footer buttons configured.' }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n @if (selectedElement()?.type === 'Date' || selectedElement()?.type === 'DateTime') {\n <div>\n <div class=\"text-sm\">\n {{ 'DATE_RANGE' | nxtCustomTranslate : 'Date Range' }}\n </div>\n <div style=\"display: flex; gap: 2px; align-items: center;\">\n <!-- Minimum Date -->\n <div>\n <label class=\"text-sm\">Minimum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'minDate') === 'today'\"\n (change)=\"setValueByPath('minDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'minDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'minDate') \n : null\"\n (ngModelChange)=\"setValueByPath('minDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'minDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n <!-- Maximum Date -->\n <div>\n <label class=\"text-sm\">Maximum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n (change)=\"setValueByPath('maxDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'maxDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'maxDate') \n : null\"\n (ngModelChange)=\"setValueByPath('maxDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (activeTab() === 'property') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n <label>Id</label>\n <div style=\"font-size: 13px; padding: 11px; border-radius: 5px; background-color: #f8f8f8; border: 1px solid #ddd;\">\n {{ headerSelect() ? bookId() : selectedElement()?.id }}\n </div>\n @for (prop of getProperties()?.fieldProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.type === 'toggleGroup') {\n <div class=\"toggle-group\">\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', true) : (selectedElement() | getValueByPath : 'isOptional')) : (selectedElement() | getValueByPath : 'isOptional')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', $event, true, prop.isTranslate) : onToggleChange('isOptional', $event)) : onToggleChange('isOptional', $event)\"\n />\n {{ 'REQUIRED' | nxtCustomTranslate : 'Required' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', true) : (selectedElement() | getValueByPath : 'isReadOnly')) : (selectedElement() | getValueByPath : 'isReadOnly')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', $event, true, prop.isTranslate) : onToggleChange('isReadOnly', $event)) : onToggleChange('isReadOnly', $event)\"\n />\n {{ 'READ_ONLY' | nxtCustomTranslate : 'Read Only' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', true) : (selectedElement() | getValueByPath : 'isHidden')) : (selectedElement() | getValueByPath : 'isHidden')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', $event, true, prop.isTranslate) : onToggleChange('isHidden', $event)) : onToggleChange('isHidden', $event)\"\n />\n {{ 'IS_HIDE' | nxtCustomTranslate : 'Is Hide' }}\n </label>\n </div>\n </div>\n }\n <!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n @if ( prop.type === 'checkbox' || prop.type === 'radio' || prop.key === 'options') {\n <div class=\"options-sidebar-trigger-wrapper\">\n <div class=\"options-trigger-header\">\n <div class=\"options-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <line x1=\"8\" y1=\"6\" x2=\"21\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"12\" x2=\"21\" y2=\"12\"></line>\n <line x1=\"8\" y1=\"18\" x2=\"21\" y2=\"18\"></line>\n <line x1=\"3\" y1=\"6\" x2=\"3.01\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"12\" x2=\"3.01\" y2=\"12\"></line>\n <line x1=\"3\" y1=\"18\" x2=\"3.01\" y2=\"18\"></line>\n </svg>\n <span>{{ prop.labelPath | nxtCustomTranslate : prop.label || 'Options' }}</span>\n </div>\n <span class=\"options-status-badge\" [class.configured]=\"getOptionsCount(prop.key) > 0\">\n {{ getOptionsCount(prop.key) }} {{ getOptionsCount(prop.key) === 1 ? 'Option' : 'Options' }}\n </span>\n </div>\n <p class=\"options-trigger-hint\">Manage choices, display labels, stored values, and option ordering.</p>\n <button type=\"button\" class=\"options-modal-open-btn\" (click)=\"openOptionsModal(prop.key)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Options ({{ getOptionsCount(prop.key) }})</span>\n </button>\n </div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'subQuestion') {\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n <div class=\"subtext-sidebar-trigger-wrapper\">\n <div class=\"subtext-trigger-header\">\n <div class=\"subtext-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>\n </svg>\n <span>Sub Text (API & Layout)</span>\n </div>\n @if (hasSubTextConfigured()) {\n <span class=\"subtext-status-badge configured\">Configured</span>\n } @else {\n <span class=\"subtext-status-badge\">Not Set</span>\n }\n </div>\n <p class=\"subtext-trigger-hint\">Configure API endpoint, live search queries, dependent fields, and card layout.</p>\n <button type=\"button\" class=\"subtext-modal-open-btn\" (click)=\"openSubTextModal(prop)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Sub Text</span>\n </button>\n </div>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <span class=\"toggle-label\" style=\"padding-right: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key , prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) :setValueByPath(prop.key, $event, prop.isTranslate) ) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n </div>\n }\n <!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n <div class=\"style-sidebar-trigger-wrapper\">\n <div class=\"style-trigger-header\">\n <div class=\"style-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <path d=\"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z\"></path>\n </svg>\n <span>{{ 'STYLE' | nxtCustomTranslate : 'Style' }}</span>\n </div>\n @if (hasStyleConfigured()) {\n <span class=\"style-status-badge configured\">Customized</span>\n } @else {\n <span class=\"style-status-badge\">Default</span>\n }\n </div>\n <p class=\"style-trigger-hint\">Configure CSS classes, inline styling, text direction, and label visibility.</p>\n <button type=\"button\" class=\"style-modal-open-btn\" (click)=\"openStyleModal()\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M12 20h9\"></path>\n <path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z\"></path>\n </svg>\n <span>Configure Style</span>\n </button>\n </div>\n </div>\n }\n </div>\n}\n\n@if (activeTab() === 'appearance') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @for (prop of getProperties()?.appearance; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n }\n <div class=\"flex-container\">\n @if (prop.type === 'color') {\n <div class=\"color-selector\">\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"selectedElement()?.color\"\n (ngModelChange)=\"setValueByPath('color', $event, prop.isTranslate)\"\n >\n </div>\n }\n @if (prop.type === 'color') {\n <div class=\"hex-input-container\">\n <span>{{ 'HEX_CODE' | nxtCustomTranslate : 'HEX Code' }}</span>\n <input\n type=\"text\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n </div>\n }\n </div>\n @if (prop.type === 'button-toggle') {\n <div class=\"button-toggle-wrapper\">\n <button\n type=\"button\"\n class=\"toggle-button\"\n (click)=\"duplicateField(selectedElement())\"\n >\n {{ 'ADD_DUPLICATE' | nxtCustomTranslate : 'Add Duplicate' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n}\n\n@if (!templateSelected) {\n <div class=\"button-container\">\n <button class=\"save-btn\" (click)=\"handleButtonClick()\">{{ 'SAVE' | nxtCustomTranslate : 'Save' }}</button>\n <button class=\"cancel-btn\" (click)=\"onCancel()\">{{ 'CANCEL' | nxtCustomTranslate : 'Cancel' }}</button>\n </div>\n}\n\n@if (templateSelected) {\n <div class=\"button-container\" style=\"margin-top: 20px;\">\n <button class=\"save-btn\" (click)=\"handleTemplateSave()\">{{ 'SAVE_TEMPLATE' | nxtCustomTranslate : 'Save Template' }}</button>\n </div>\n}\n\n<!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n@if (isSubTextModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeSubTextModal()\">\n <div class=\"subtext-modal-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Sub Text (API & Card Configuration)</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} &bull; {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeSubTextModal()\">&times;</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'api'\" (click)=\"activeSubTextTab = 'api'\">\n API & Data Source\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'dependencies'\" (click)=\"activeSubTextTab = 'dependencies'\">\n Dependencies & Queries\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'card'\" (click)=\"activeSubTextTab = 'card'\">\n Card Presentation\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'other'\" (click)=\"activeSubTextTab = 'other'\">\n Advanced / Files\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: API & Data Source -->\n @if (activeSubTextTab === 'api') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-row\">\n <label>End Point URL (endpoint)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.endpoint\" placeholder=\"/services/apexrest/FusionApiData?type=...\" />\n <small class=\"field-hint\">Base or relative endpoint URL to fetch records from</small>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Variable / Response Key (variable)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.variable\" placeholder=\"data or records (leave blank if root array)\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Default Field / Selected Value (defaultField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.defaultField\" placeholder=\"e.g. name, id\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Search & Display Fields (field)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextFieldsStr\" placeholder=\"e.g. name, code, city\" />\n <small class=\"field-hint\">Fields used for live searching and default two-line fallback display</small>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isObject\" />\n <span>Is Object (isObject - emit full record object instead of single scalar string)</span>\n </label>\n </div>\n </div>\n }\n\n <!-- Tab 2: Dependencies & Queries -->\n @if (activeSubTextTab === 'dependencies') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Source Question Id (sourceQuestionId)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.sourceQuestionId\" placeholder=\"Parent question ID\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Dependent Value (dependentValue)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.dependentValue\" placeholder=\"e.g. true or specific value\" />\n </div>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isDependentField\" />\n <span>Is Dependent Field (isDependentField - conditional rendering based on parent value)</span>\n </label>\n </div>\n <hr class=\"subtext-divider\" />\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Live Search Query Parameter (queryParameter)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextQueryParamStr\" placeholder=\"e.g. search, q\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Field in API URL (queryField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryField\" placeholder=\"e.g. customerId\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value / Reference Key (queryValue)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValue\" placeholder=\"e.g. selectedCustomer\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value Reference (queryValueReference)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValueReference\" placeholder=\"e.g. parentRef\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Unique Cache Key (uniqueKey)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.uniqueKey\" placeholder=\"Cache key for local storage\" />\n </div>\n </div>\n }\n\n <!-- Tab 3: Card Layout Presentation -->\n @if (activeSubTextTab === 'card') {\n <div class=\"subtext-tab-content\">\n <div class=\"card-config-header-row\">\n <label class=\"toggle-switch\">\n <input type=\"checkbox\" [(ngModel)]=\"isCardConfigEnabled\" (change)=\"toggleCardConfig(isCardConfigEnabled)\" />\n <span class=\"toggle-slider\"></span>\n </label>\n <div class=\"toggle-text\">\n <strong>Enable Card Layout (cardConfig)</strong>\n <p>Render suggestions as rich cards with thumbnail, primary title, subtitle, and badges</p>\n </div>\n </div>\n\n @if (isCardConfigEnabled) {\n <div class=\"card-config-body\">\n <div class=\"card-config-fields\">\n <div class=\"subtext-form-row\">\n <label>Image Field Name (cardConfig.imageUrl)</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.imageUrl\" placeholder=\"e.g. photoUrl, thumbnail, imageUrl\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Primary Title Field (cardConfig.primary)</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.primary\" placeholder=\"e.g. name, title, hotelName\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Subtitle Field (cardConfig.subTitle)</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.subTitle\" placeholder=\"e.g. summary, duration, description\" />\n </div>\n\n <!-- Badges Section -->\n <div class=\"badges-config-section\">\n <div class=\"badges-header\">\n <label>Badges (cardConfig.badges)</label>\n <button type=\"button\" class=\"add-badge-btn\" (click)=\"addModalBadge()\">+ Add Badge</button>\n </div>\n @for (badge of modalBadges; track $index; let bIdx = $index) {\n <div class=\"badge-item-row\">\n <input type=\"text\" [(ngModel)]=\"badge.field\" placeholder=\"Field name (e.g. city)\" class=\"badge-field-input\" />\n <select [(ngModel)]=\"badge.icon\" class=\"badge-icon-select\">\n <option value=\"\">No Icon</option>\n <option value=\"hotel\">Hotel</option>\n <option value=\"calendar\">Calendar</option>\n <option value=\"location\">Location</option>\n </select>\n <input type=\"text\" [(ngModel)]=\"badge.label\" placeholder=\"Prefix label (optional)\" class=\"badge-label-input\" />\n <button type=\"button\" class=\"remove-badge-btn\" (click)=\"removeModalBadge(bIdx)\">&times;</button>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Card Preview -->\n <div class=\"card-live-preview-box\">\n <span class=\"preview-tag\">LIVE PREVIEW</span>\n <div class=\"sample-card-container\">\n <div class=\"sample-card-image\">\n @if (modalCardConfig.imageUrl) {\n <div class=\"sample-img-placeholder has-img\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\"/>\n <polyline points=\"21 15 16 10 5 21\"/>\n </svg>\n <span class=\"img-field-label\">{{ modalCardConfig.imageUrl }}</span>\n </div>\n } @else {\n <div class=\"sample-img-placeholder\">Image</div>\n }\n </div>\n <div class=\"sample-card-content\">\n <div class=\"sample-card-title\">{{ modalCardConfig.primary || 'Hotel Booking' }}</div>\n <div class=\"sample-card-subtitle\">{{ modalCardConfig.subTitle || '3 nights at Atlantis, Dubai' }}</div>\n @if (modalBadges.length > 0) {\n <div class=\"sample-card-badges\">\n @for (badge of modalBadges; track $index) {\n @if (badge.field) {\n <span class=\"sample-badge-pill\">\n @if (badge.icon === 'hotel') { \uD83C\uDFE8 }\n @else if (badge.icon === 'calendar') { \uD83D\uDCC5 }\n @else if (badge.icon === 'location') { \uD83D\uDCCD }\n <span>{{ badge.label ? badge.label + ': ' : '' }}{{ badge.field }}</span>\n </span>\n }\n }\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Tab 4: Advanced / Files -->\n @if (activeSubTextTab === 'other') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Group Field (groupField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.groupField\" placeholder=\"groupField\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Child Group Field (childGroupField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.childGroupField\" placeholder=\"childGroupField\" />\n </div>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Allowed File Types (allowedTypes)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextAllowedTypesStr\" placeholder=\".jpg,.png,.pdf\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Max File Size in MB (maxFileSize)</label>\n <input type=\"number\" [(ngModel)]=\"modalSubText.maxFileSize\" placeholder=\"10\" />\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeSubTextModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveSubTextModal()\">Save Configuration</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n@if (isStyleModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeStyleModal()\">\n <div class=\"subtext-modal-container style-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Element Style Configuration</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} &bull; {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeStyleModal()\">&times;</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'classes'\" (click)=\"activeStyleTab = 'classes'\">\n Classes & Essentials\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'inline'\" (click)=\"activeStyleTab = 'inline'\">\n Inline Styles\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'custom'\" (click)=\"activeStyleTab = 'custom'\">\n Custom Keys & Live Preview\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: Classes & Essentials -->\n @if (activeStyleTab === 'classes') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputClass\"\n placeholder=\"e.g. form-control invoice-data custom-input\"\n />\n <span class=\"field-hint\">Classes applied directly to input/control element</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelClass\"\n placeholder=\"e.g. form-label fw-bold text-primary\"\n />\n <span class=\"field-hint\">Classes applied to the question/field label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Text / Layout Direction</label>\n <select [(ngModel)]=\"modalStyle.direction\">\n <option value=\"ltr\">LTR (Left to Right)</option>\n <option value=\"rtl\">RTL (Right to Left)</option>\n </select>\n <span class=\"field-hint\">Direction attribute for text flow and control layout</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Visibility</label>\n <div style=\"display: flex; align-items: center; gap: 8px; margin-top: 8px;\">\n <input\n type=\"checkbox\"\n id=\"modalStyleShowLabel\"\n style=\"width: 18px; height: 18px; cursor: pointer;\"\n [(ngModel)]=\"modalStyle.showLabel\"\n />\n <label for=\"modalStyleShowLabel\" style=\"cursor: pointer; font-size: 13px; font-weight: 500; margin: 0;\">\n Show Label ({{ modalStyle.showLabel ? 'Enabled' : 'Hidden' }})\n </label>\n </div>\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 2: Inline Styles -->\n @if (activeStyleTab === 'inline') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputStyle\"\n placeholder=\"e.g. background-color: #f8fafc; border-color: #3b82f6;\"\n />\n <span class=\"field-hint\">Inline styles applied to input control</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelStyle\"\n placeholder=\"e.g. font-size: 14px; color: #1e293b; font-weight: 600;\"\n />\n <span class=\"field-hint\">Inline styles applied to label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Label Value Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelValueStyle\"\n placeholder=\"e.g. color: #64748b; font-style: italic;\"\n />\n <span class=\"field-hint\">Inline styles applied to label value text</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Question Wrapper Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.questionStyle\"\n placeholder=\"e.g. margin-bottom: 16px; padding: 8px;\"\n />\n <span class=\"field-hint\">Inline styles applied to outer question wrapper</span>\n </div>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Book / Container Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.bookStyle\"\n placeholder=\"e.g. border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);\"\n />\n <span class=\"field-hint\">Inline styles applied to booklet / section wrapper</span>\n </div>\n </div>\n }\n\n <!-- Tab 3: Custom Keys & Live Preview -->\n @if (activeStyleTab === 'custom') {\n <div class=\"subtext-tab-content\">\n <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;\">\n <div>\n <h4 style=\"margin: 0; font-size: 14px; color: #0f172a;\">Dynamic / Custom Style Keys</h4>\n <p style=\"margin: 2px 0 0 0; font-size: 12px; color: #64748b;\">Add specialized style properties for custom rendering</p>\n </div>\n <button type=\"button\" class=\"btn-add-badge\" (click)=\"addCustomStyleKey()\">\n + Add Style Key\n </button>\n </div>\n\n @if (customStyleKeys.length === 0) {\n <div style=\"padding: 16px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 6px; text-align: center; font-size: 12px; color: #64748b; margin-bottom: 16px;\">\n No custom style keys added. All standard style properties are configured under Classes and Inline tabs.\n </div>\n } @else {\n <div style=\"display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px;\">\n @for (item of customStyleKeys; track $index) {\n <div class=\"subtext-badge-row\">\n <input type=\"text\" [(ngModel)]=\"item.key\" placeholder=\"Key (e.g. helperStyle)\" style=\"flex: 1;\" />\n <input type=\"text\" [(ngModel)]=\"item.value\" placeholder=\"Value (e.g. font-size: 11px;)\" style=\"flex: 1;\" />\n <button type=\"button\" class=\"btn-remove-badge\" (click)=\"removeCustomStyleKey($index)\">&times;</button>\n </div>\n }\n </div>\n }\n\n <!-- Live Interactive Preview -->\n <div style=\"margin-top: 16px; border-top: 1px solid #e2e8f0; padding-top: 16px;\">\n <div style=\"display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;\">\n <span style=\"font-size: 13px; font-weight: 600; color: #1e293b;\">Live Element Style Preview</span>\n <span style=\"font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 12px; background: #e0f2fe; color: #0369a1;\">Interactive</span>\n </div>\n <div [attr.dir]=\"modalStyle.direction\" style=\"background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 16px;\">\n @if (modalStyle.showLabel) {\n <div [class]=\"modalStyle.labelClass\" [style]=\"modalStyle.labelStyle\" style=\"font-weight: 600; margin-bottom: 6px; font-size: 13px;\">\n {{ selectedElement()?.questionText || selectedElement()?.label || 'Sample Question Label' }}\n </div>\n }\n <div [class]=\"modalStyle.inputClass\" [style]=\"modalStyle.inputStyle\" style=\"background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 8px 12px; font-size: 13px; color: #475569;\">\n Sample Input Value / Preview\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" style=\"margin-right: auto; color: #dc2626; border-color: #fca5a5;\" (click)=\"resetStyleToDefault()\">\n Reset to Defaults\n </button>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeStyleModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveStyleModal()\">Save Styles</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n@if (isOptionsModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeOptionsModal()\">\n <div class=\"subtext-modal-container options-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Options Configuration</h2>\n <span class=\"subtext-modal-element-tag\">\n {{ selectedElement()?.type }} &bull; {{ selectedElement()?.questionText || selectedElement()?.label || 'Choice Field' }}\n ({{ modalOptions.length }} {{ modalOptions.length === 1 ? 'choice' : 'choices' }})\n </span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeOptionsModal()\">&times;</button>\n </div>\n\n <!-- Modal Toolbar -->\n <div class=\"options-modal-toolbar\">\n <div class=\"options-search-box\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#64748b\" stroke-width=\"2\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n <input\n type=\"text\"\n [(ngModel)]=\"optionsFilterQuery\"\n placeholder=\"Filter options by value or label...\"\n class=\"options-filter-input\"\n />\n </div>\n <button type=\"button\" class=\"options-add-btn\" (click)=\"addModalOption()\">\n <span style=\"font-size: 15px; font-weight: bold; line-height: 1;\">+</span>\n <span>Add Option</span>\n </button>\n </div>\n\n <!-- Modal Body -->\n <div class=\"options-modal-body\">\n @if (modalOptions.length === 0) {\n <div class=\"options-empty-state\">\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#94a3b8\" stroke-width=\"1.5\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"8\" y1=\"12\" x2=\"16\" y2=\"12\"></line>\n </svg>\n <p class=\"empty-title\">No Options Configured</p>\n <p class=\"empty-desc\">Click \"Add Option\" above to create your first choice for this field.</p>\n <button type=\"button\" class=\"options-add-btn\" style=\"margin-top: 8px;\" (click)=\"addModalOption()\">\n + Add First Option\n </button>\n </div>\n } @else {\n <div class=\"options-table-wrapper\" (dragover)=\"onModalOptionDragOver($event)\" (drop)=\"onModalOptionDrop($event)\">\n <div class=\"options-table-header\">\n <span class=\"col-num\">#</span>\n <span class=\"col-reorder\">Reorder</span>\n <span class=\"col-value\">Stored Value (value)</span>\n <span class=\"col-label\">Display Label (label)</span>\n <span class=\"col-actions\">Action</span>\n </div>\n\n <div class=\"options-table-body\">\n @for (opt of getFilteredModalOptions(); track opt.id; let idx = $index) {\n <div\n class=\"modal-option-table-row\"\n [attr.data-id]=\"opt.id\"\n draggable=\"true\"\n (dragstart)=\"onModalOptionDragStart($event, opt.id)\"\n >\n <span class=\"col-num index-pill\">{{ idx + 1 }}</span>\n \n <div class=\"col-reorder reorder-buttons\">\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === 0\"\n (click)=\"moveModalOption(idx, 'up')\"\n title=\"Move Up\"\n >\n &#9650;\n </button>\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === modalOptions.length - 1\"\n (click)=\"moveModalOption(idx, 'down')\"\n title=\"Move Down\"\n >\n &#9660;\n </button>\n <span class=\"modal-drag-grip\" title=\"Drag to reorder\">&#9776;</span>\n </div>\n\n <div class=\"col-value\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.value\"\n placeholder=\"e.g. choice_1 or 01\"\n />\n </div>\n\n <div class=\"col-label\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.label\"\n placeholder=\"e.g. First Choice\"\n />\n </div>\n\n <div class=\"col-actions\">\n <button\n type=\"button\"\n class=\"btn-delete-option\"\n (click)=\"removeModalOption(idx)\"\n title=\"Delete Option\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <polyline points=\"3 6 5 6 21 6\"></polyline>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path>\n </svg>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Choices Preview -->\n <div class=\"options-live-preview-box\">\n <div class=\"preview-header\">\n <span class=\"preview-title\">Live Dropdown / Choice Preview</span>\n <span class=\"preview-tag\">{{ modalOptions.length }} Items</span>\n </div>\n <div class=\"preview-select-mock\">\n <select class=\"mock-dropdown-select\" disabled>\n <option value=\"\" selected disabled>--- Select an option ---</option>\n @for (opt of modalOptions; track opt.id) {\n <option [value]=\"opt.value\">{{ opt.label || opt.value }}</option>\n }\n </select>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <span style=\"font-size: 12px; color: #64748b; margin-right: auto; align-self: center;\">\n Total: <strong>{{ modalOptions.length }}</strong> {{ modalOptions.length === 1 ? 'choice' : 'choices' }}\n </span>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeOptionsModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveOptionsModal()\">Save Options</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 17NOV26 Action Button Configuration Pop-Up Modal with RuleMeta Support -->\n@if (isButtonModalOpen) {\n <div class=\"button-modal-backdrop\" (click)=\"closeButtonModal()\">\n <div class=\"button-modal-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"button-modal-header\">\n <div class=\"button-modal-title-group\">\n <h2 class=\"button-modal-title\">\n {{ (editingButtonIndex === -1 ? 'ADD_ACTION_BUTTON' : 'EDIT_ACTION_BUTTON') | nxtCustomTranslate : (editingButtonIndex === -1 ? 'Add Action Button' : 'Edit Action Button') }}\n </h2>\n <span class=\"button-modal-element-tag\">\n {{ editingButton.name || ('UNNAMED' | nxtCustomTranslate : 'Unnamed') }} &bull; ID: {{ editingButton.id }}\n </span>\n </div>\n <button type=\"button\" class=\"button-modal-close-btn\" (click)=\"closeButtonModal()\">&times;</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"button-modal-tabs\">\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'general'\" (click)=\"activeButtonTab = 'general'\">\n {{ 'GENERAL' | nxtCustomTranslate : 'General' }}\n </button>\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'api'\" (click)=\"activeButtonTab = 'api'\">\n {{ 'ACTION_API' | nxtCustomTranslate : 'Action & API' }}\n </button>\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'appearance'\" (click)=\"activeButtonTab = 'appearance'\">\n {{ 'APPEARANCE' | nxtCustomTranslate : 'Appearance' }}\n </button>\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'rules'\" (click)=\"activeButtonTab = 'rules'\">\n {{ 'RULES_AND_CONFIRM' | nxtCustomTranslate : 'Rules & Confirm' }}\n @if (editingButton.rules?.length) {\n <span class=\"tab-badge\">{{ editingButton.rules?.length }}</span>\n }\n </button>\n </div>\n\n <!-- Modal Body -->\n <div class=\"button-modal-body\">\n <!-- Tab 1: General -->\n @if (activeButtonTab === 'general') {\n <div class=\"button-modal-tab-content\">\n <div class=\"button-form-row\">\n <label>{{ 'BUTTON_ID' | nxtCustomTranslate : 'Button ID' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.id\" placeholder=\"Enter button id\" />\n </div>\n\n <div class=\"button-form-row\">\n <label>{{ 'BUTTON_NAME' | nxtCustomTranslate : 'Button Name' }}</label>\n @if (formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if ((editingButton.id + '.name' | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n @if (!copied) {\n <svg (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" stroke=\"currentColor\">\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" stroke-width=\"2\"></rect>\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" stroke-width=\"2\"></path>\n </svg>\n }\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n <input type=\"text\" [(ngModel)]=\"editingButton.name\" placeholder=\"Enter button name\" />\n </div>\n\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'EVENT_NAME' | nxtCustomTranslate : 'Event to Emit' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.eventtoemit\" placeholder=\"e.g. submit, close, print\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'ALT' | nxtCustomTranslate : 'Alt Text' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.alt\" placeholder=\"Button alt text\" />\n </div>\n </div>\n\n <div class=\"button-form-row\">\n <label>{{ 'ACTION_DATA' | nxtCustomTranslate : 'Action Data' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.actionData\" placeholder=\"Event to actionData\" />\n </div>\n </div>\n }\n\n <!-- Tab 2: Action / API -->\n @if (activeButtonTab === 'api') {\n <div class=\"button-modal-tab-content\">\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\" style=\"grid-column: 1 / -1;\">\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.endpoint\" placeholder=\"API endpoint URL\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'METHOD' | nxtCustomTranslate : 'Method' }}</label>\n <select [(ngModel)]=\"editingButton.method\">\n <option value=\"GET\">GET</option>\n <option value=\"POST\">POST</option>\n <option value=\"PUT\">PUT</option>\n <option value=\"DELETE\">DELETE</option>\n </select>\n </div>\n <div class=\"button-form-row\" style=\"align-self: center; margin-top: 22px;\">\n <label class=\"button-checkbox-label\">\n <input type=\"checkbox\" [(ngModel)]=\"editingButton.updateParentData\" />\n <span>{{ 'UPDATE_PARENTDATA' | nxtCustomTranslate : 'Update Parent Data' }}</span>\n </label>\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 3: Appearance -->\n @if (activeButtonTab === 'appearance') {\n <div class=\"button-modal-tab-content\">\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'BUTTON_WIDTH_PX' | nxtCustomTranslate : 'Button Width (px)' }}</label>\n <input type=\"number\" [(ngModel)]=\"editingButton.width\" min=\"50\" placeholder=\"Width in px\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'POSITION_PERCENT' | nxtCustomTranslate : 'Position (%)' }}: {{ editingButton.positionPercent || 0 }}%</label>\n <input type=\"range\" min=\"0\" max=\"100\" [(ngModel)]=\"editingButton.positionPercent\" />\n </div>\n </div>\n\n <div class=\"button-form-grid-3\">\n <div class=\"button-form-row\">\n <label>{{ 'BACKGROUND_COLOR' | nxtCustomTranslate : 'Background Color' }}</label>\n <input type=\"color\" [(ngModel)]=\"editingButton.bgColor\" class=\"button-color-input\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'TEXT_COLOR' | nxtCustomTranslate : 'Text Color' }}</label>\n <input type=\"color\" [(ngModel)]=\"editingButton.textColor\" class=\"button-color-input\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'BORDER_COLOR' | nxtCustomTranslate : 'Border Color' }}</label>\n <input type=\"color\" [(ngModel)]=\"editingButton.borderColor\" class=\"button-color-input\" />\n </div>\n </div>\n\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'BORDER_SIZE' | nxtCustomTranslate : 'Border Size' }}: {{ editingButton.borderSize || 0 }}px</label>\n <input type=\"range\" min=\"0\" max=\"20\" [(ngModel)]=\"editingButton.borderSize\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'BORDER_RADIUS' | nxtCustomTranslate : 'Border Radius' }}: {{ editingButton.borderRadius || 0 }}px</label>\n <input type=\"range\" min=\"0\" max=\"50\" [(ngModel)]=\"editingButton.borderRadius\" />\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 4: Rules & Confirm -->\n @if (activeButtonTab === 'rules') {\n <div class=\"button-modal-tab-content\">\n <!-- Confirmation Setting -->\n <div class=\"button-rules-section\">\n <label class=\"button-checkbox-label\" style=\"font-weight: 600;\">\n <input type=\"checkbox\" [(ngModel)]=\"editingButton.enableConfirm\" />\n <span>{{ 'ENABLE_CONFIRM' | nxtCustomTranslate : 'Enable Confirmation Prompt before execution' }}</span>\n </label>\n </div>\n\n <!-- Quick Visibility Expression with Google CEL validation -->\n <div class=\"button-form-row\">\n <div class=\"button-row-header-between\">\n <label>{{ 'VISIBILITY_RULE' | nxtCustomTranslate : 'Visibility Rule Expression' }}</label>\n <span class=\"cel-badge\">CEL</span>\n </div>\n <input\n type=\"text\"\n [(ngModel)]=\"editingButton.visibilityRule\"\n (ngModelChange)=\"onVisibilityRuleChange($event)\"\n [class.is-invalid]=\"!visibilityRuleValidation.isValid\"\n placeholder=\"e.g. status == 'Approved'\" />\n @if (editingButton.visibilityRule?.trim()) {\n @if (visibilityRuleValidation.isValid) {\n <div class=\"cel-feedback valid\">\n <span class=\"cel-icon\">\u2713</span>\n <span>{{ 'CEL_VALID' | nxtCustomTranslate : 'Valid CEL expression' }}</span>\n </div>\n } @else {\n <div class=\"cel-feedback invalid\">\n <span class=\"cel-icon\">\u26A0</span>\n <span>{{ visibilityRuleValidation.error }}</span>\n </div>\n }\n }\n </div>\n\n <!-- RuleMeta List Section -->\n <div class=\"button-rules-header\">\n <div class=\"button-rules-title\">\n <span>{{ 'BUTTON_RULES' | nxtCustomTranslate : 'Rules (RuleMeta)' }}</span>\n <span class=\"button-rules-count\">{{ editingButton.rules?.length || 0 }}</span>\n </div>\n <button type=\"button\" class=\"btn-add-rule\" (click)=\"addRuleToEditingButton()\">\n + {{ 'ADD_RULE' | nxtCustomTranslate : 'Add Rule' }}\n </button>\n </div>\n\n <div class=\"button-rules-list\">\n @for (rule of editingButton.rules || []; track rule.id || $index; let rIdx = $index) {\n <div class=\"button-rule-card\">\n <div class=\"button-rule-card-header\">\n <span class=\"button-rule-num\">#{{ rIdx + 1 }}</span>\n <div class=\"button-rule-type-select\">\n <label>{{ 'RULE_TYPE' | nxtCustomTranslate : 'Type' }}:</label>\n <select [(ngModel)]=\"rule.type\">\n @for (rt of ruleTypes; track rt) {\n <option [value]=\"rt\">{{ rt }}</option>\n }\n </select>\n </div>\n <button type=\"button\" class=\"btn-rule-remove\" (click)=\"removeRuleFromEditingButton(rIdx)\" title=\"Remove Rule\">\n &times;\n </button>\n </div>\n\n <!-- MR 17NOV26 Rule ID and Execution Order inputs -->\n <div class=\"button-form-grid-2\" style=\"margin-top: 8px;\">\n <div class=\"button-form-row\">\n <label>{{ 'RULE_ID' | nxtCustomTranslate : 'Rule ID' }}</label>\n <input type=\"text\" [(ngModel)]=\"rule.id\" placeholder=\"Rule ID\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'ORDER' | nxtCustomTranslate : 'Order' }}</label>\n <input type=\"number\" [(ngModel)]=\"rule.order\" min=\"1\" placeholder=\"Order (e.g. 1)\" />\n </div>\n </div>\n\n <!-- MR 17NOV26 Rule Expression Textarea with Google CEL syntax validation -->\n <div class=\"button-form-row\" style=\"margin-top: 8px;\">\n <div class=\"button-row-header-between\">\n <label>{{ 'EXPRESSION' | nxtCustomTranslate : 'Rule Expression (Google CEL)' }}</label>\n <span class=\"cel-badge\">CEL</span>\n </div>\n <textarea\n rows=\"3\"\n [(ngModel)]=\"rule.expression\"\n (ngModelChange)=\"onRuleExpressionChange(rule)\"\n class=\"button-form-textarea\"\n [class.is-invalid]=\"rule.id && ruleValidationMap[rule.id]?.isValid === false\"\n placeholder=\"Enter Google CEL expression, e.g. isValid == true && totalAmount > 0\"></textarea>\n @if (rule.expression?.trim()) {\n @if (rule.id && ruleValidationMap[rule.id]?.isValid) {\n <div class=\"cel-feedback valid\">\n <span class=\"cel-icon\">\u2713</span>\n <span>{{ 'CEL_VALID' | nxtCustomTranslate : 'Valid CEL expression' }}</span>\n </div>\n } @else if (rule.id && ruleValidationMap[rule.id]?.isValid === false) {\n <div class=\"cel-feedback invalid\">\n <span class=\"cel-icon\">\u26A0</span>\n <span>{{ ruleValidationMap[rule.id]?.error }}</span>\n </div>\n }\n }\n </div>\n\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'MESSAGE' | nxtCustomTranslate : 'Message / Notification' }}</label>\n <input type=\"text\" [(ngModel)]=\"rule.message\" placeholder=\"Optional notification or validation message\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'TARGET_FIELD' | nxtCustomTranslate : 'Target Field' }}</label>\n <input type=\"text\" [(ngModel)]=\"rule.targetField\" placeholder=\"Optional target field\" />\n </div>\n </div>\n </div>\n }\n @if (!editingButton.rules?.length) {\n <div class=\"button-rules-empty\">\n <span>{{ 'NO_RULES_CONFIGURED' | nxtCustomTranslate : 'No rules configured for this button.' }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"button-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeButtonModal()\">\n {{ 'CANCEL' | nxtCustomTranslate : 'Cancel' }}\n </button>\n <button\n type=\"button\"\n class=\"btn-save\"\n [disabled]=\"hasCelValidationErrors()\"\n (click)=\"saveButtonModal()\">\n {{ 'SAVE_BUTTON' | nxtCustomTranslate : 'Save Button' }}\n </button>\n </div>\n </div>\n </div>\n}\n</div>", styles: ["*{margin:0;padding:0;box-sizing:border-box;font-family:Roboto,sans-serif}.properties{height:calc(100vh - 20px);overflow-y:auto}.container{width:100%;max-width:500px;margin:0 auto;background:#fff;box-shadow:0 2px 10px #0000001a;overflow:hidden;font-family:Arial,sans-serif}.design-header{display:flex;justify-content:center;align-items:center;padding:15px 20px;background:#fff;border-radius:8px;box-shadow:0 2px 10px #0000001a;margin-bottom:20px}.header-title{font-size:20px;font-weight:400;color:#222}.toggle-header,.style-toggle-header{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:10px;background:#f8f8f8;border:1px solid #ddd;border-radius:6px;margin-bottom:6px}.tabs{display:flex;background:#f0f2f5;border-bottom:2px solid #0052cc}.tab{flex:1;padding:15px 10px;text-align:center;cursor:pointer}.tab.active{background:#0052cc;color:#fff;font-weight:700}.tab-content{padding:5px;max-height:80vh;overflow-y:auto;overflow-x:hidden}.form-group{margin-bottom:15px}label{display:block;font-size:14px;font-weight:500;color:#444;margin-bottom:8px}.required:before{content:\"*\";color:red;margin-right:3px}input[type=text],input[type=number],select,textarea{width:100%;padding:10px;font-size:14px;border:1px solid #ccc;border-radius:6px;outline:none;transition:all .3s;background:#f8f8f8}input:focus,select:focus,textarea:focus{border-color:#007bff;background:#fff;box-shadow:0 0 5px #007bff4d}textarea{min-height:55px;resize:vertical}button,.btn{padding:10px 15px;border:none;border-radius:6px;background:#007bff;color:#fff;font-size:15px;cursor:pointer;transition:all .3s}button:hover,.btn:hover{background:#0056b3;transform:translateY(-2px)}.add-button{padding:8px 14px;background:#0954c5;border-radius:8px}.remove-button{background:#e74c3c;padding:6px 12px;margin-top:10px}.remove-button:hover{background:#c0392b}.cancel-btn{background:#fff;color:#666;border:1px solid #ddd}.save-btn{background:#0052cc;margin-right:10px}.toggle-group{display:grid;grid-template-columns:1fr 1fr;gap:10px}.toggle-item{display:flex;align-items:center;gap:10px;padding:8px}.switch{position:relative;width:42px;height:22px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background:#ccc;transition:.4s;border-radius:24px}.slider:before{position:absolute;content:\"\";height:20px;width:20px;left:1px;bottom:1px;background:#fff;transition:.4s;border-radius:50%}input:checked+.slider{background:#2196f3}input:checked+.slider:before{transform:translate(18px)}.radio-item{display:flex;align-items:center;gap:20px}.radio-item input{accent-color:#007bff}.checkbox-row{display:flex;margin-bottom:10px}.checkbox-group{display:flex;align-items:center;margin-right:20px;min-width:120px}.checkbox-group input[type=checkbox]{margin-right:5px}.color-picker-row,.color-picker-container{display:flex;align-items:center}.color-picker-container{border:1px solid #ddd;border-radius:4px;margin-right:10px}.color-box,.color-selector input[type=color]{width:78px!important;height:40px;border:none;border-radius:4px;cursor:pointer}.hex-input-container{display:flex;gap:20px;align-items:center;font-size:12px;color:#b0b0b0}.hex-input-container span{font-size:14px;margin-top:10px}.hex-input,.hex-input-container input[type=text]{width:120px;padding:10px 12px;border:1px solid #d1d1d1;color:#28343e}.hex-label{color:#999;margin-right:5px}.select-container,.input-box-field{position:relative;width:100%}.dropdown-arrow,.input-box-field:after{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none;color:#666;font-size:12px}.input-box-field:after{content:\"\\25bc\";color:#1c1b1f;font-size:10px}.input-box-field select{background:#28343e;color:#fff;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none}.input-box-field select::-ms-expand{display:none}.all-properties details{background:#fff;border:1px solid #ddd;border-radius:8px;margin-bottom:12px;padding:12px;box-shadow:0 2px 8px #0000000d}.all-properties summary{font-size:15px;font-weight:400;cursor:pointer;padding:6px;transition:color .3s}.all-properties summary:hover{color:#007bff}.inner-content{padding:12px 0}.head-elements{font-size:14px;font-weight:500;color:#444}.options-container{display:flex;flex-direction:column;gap:12px}.field-size-controls,.flex-container{display:flex;align-items:center;gap:12px}.flex-container{margin-bottom:1rem}.size-input{width:110px;text-align:center}.input-container{display:flex;flex-direction:column;align-items:flex-start;gap:10px;width:100%}.subtext-textarea{width:100%;margin-left:auto}.arrow-icon{width:19px;height:23px;transition:transform .3s ease}.icon{display:inline-block;width:18px;height:18px;border-radius:50%;text-align:center;line-height:18px;color:#fff;font-size:12px;margin-left:5px}.edit-icon{background:#4caf50}.view-icon{background:#2196f3}.delete-icon{background:#f44336}.logo-icon{width:20px;height:20px;width:35px;display:flex;justify-content:center;background:#d0d9ff;border-radius:4px}.link-icon{background:#e7f2ff;padding:5px;border-radius:5px;margin:5px;display:inline-block;cursor:pointer;position:relative;transition:all .3s}.link-icon:hover{background:#d0e5ff}.link-icon:active{background:#a8d0ff}.link-dropdown-menu{position:absolute;top:100%;right:0;background:#fff;border:1px solid #ccc;padding:10px;width:200px;box-shadow:0 4px 6px #0000001a}.link-dropdown-menu input{width:100%;margin-bottom:5px;padding:5px;border:1px solid #ccc;border-radius:3px}.option-items{display:flex;align-items:center;padding:5px;gap:5px;border:1px solid #ccc;margin-bottom:10px;cursor:grab;background:#fff}.option-items:active{opacity:.5}.drag-handle{cursor:grab}.button-toggle-wrapper{margin-top:8px}.toggle-button{padding:8px 16px;border:1px solid #cbd2d9;border-radius:6px;font-size:14px;cursor:pointer;transition:all .2s ease-in-out}.toggle-button.active:hover{background:#2c6dd5}.button-config-card{background:#fff;padding:15px;border-radius:12px;border:1px solid #ccc;margin-top:20px;box-shadow:0 2px 8px #0000000d}.design-footer{display:flex;justify-content:space-between;margin-top:20px}.button-container{display:flex;padding:15px;background:#f9f9f9;border-top:1px solid #eee}.button-container .cancel-btn,.button-container .save-btn{flex:1;padding:12px;font-weight:700}.divider{border-top:1px dashed #ddd;margin:20px 0}input{width:auto}@media screen and (max-width:768px){.container{height:calc(100vh - 20px);min-height:calc(100vh - 20px)}.tabs{flex-direction:column}.tab{padding:1rem;font-size:.9rem}.form-group,.tab-content[aria-label=attributes] .form-group,.tab-content[aria-label=property] .form-group,.tab-content[aria-label=appearance] .form-group{flex-direction:column;grid-template-columns:1fr}.toggle-group{flex-direction:column;align-items:flex-start}}@media screen and (max-width:480px){.container{padding:0 10px}.tabs{flex-direction:column}.tab{padding:1rem;border-bottom:1px solid #dee2e6}input[type=text],input[type=number],select,textarea{font-size:.9rem}}.translation-fallback label,.translation-input-group label{font-weight:500;font-size:13px;margin-bottom:4px;display:block;color:#666}.readonly-box{font-size:14px;padding:4px;border:1px solid #ddd;border-radius:5px;-webkit-user-select:text;user-select:text;cursor:text;color:#7a7a7a;margin-bottom:3px}.copied-msg{font-size:12px;color:green;opacity:0;animation:fadeInOut 1.5s ease}@keyframes fadeInOut{0%{opacity:0;transform:translateY(-2px)}20%{opacity:1;transform:translateY(0)}80%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-2px)}}.subtext-sidebar-trigger-wrapper{background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:10px 12px;margin:10px 0;box-shadow:0 1px 3px #0000000a}.subtext-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.subtext-trigger-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#1e293b}.subtext-status-badge{font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:#f1f5f9;color:#64748b}.subtext-status-badge.configured{background:#e0f2fe;color:#0369a1}.subtext-trigger-hint{font-size:11px;color:#64748b;margin:2px 0 8px;line-height:1.3}.subtext-modal-open-btn{width:100%;background:#2563eb;color:#fff;border:none;border-radius:5px;padding:7px 12px;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:background .15s ease}.subtext-modal-open-btn:hover{background:#1d4ed8}.subtext-modal-backdrop{position:fixed;inset:0;background:#0f172a99;backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:10000}.subtext-modal-container{background:#fff;border-radius:10px;box-shadow:0 20px 45px #00000040;width:90%;max-width:780px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;animation:modalFadeIn .2s ease-out}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.subtext-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.subtext-modal-title{font-size:16px;font-weight:700;color:#0f172a;margin:0}.subtext-modal-element-tag{font-size:11px;font-weight:500;color:#475569;background:#e2e8f0;padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px}.subtext-modal-close-btn{background:none;border:none;font-size:24px;line-height:1;color:#64748b;cursor:pointer;padding:0 4px}.subtext-modal-close-btn:hover{color:#0f172a}.subtext-modal-tabs{display:flex;background:#f1f5f9;padding:4px 16px 0;border-bottom:1px solid #e2e8f0;gap:4px}.subtext-tab-btn{border:none;background:transparent;padding:9px 14px;font-size:13px;font-weight:500;color:#64748b;border-bottom:2px solid transparent;cursor:pointer;transition:all .15s ease}.subtext-tab-btn:hover{color:#0f172a}.subtext-tab-btn.active{color:#2563eb;border-bottom:2px solid #2563eb;font-weight:600;background:#fff;border-radius:6px 6px 0 0}.subtext-modal-body{padding:18px 20px;overflow-y:auto;flex:1}.subtext-form-row{margin-bottom:12px;display:flex;flex-direction:column;gap:4px}.subtext-form-row label{font-size:12px;font-weight:600;color:#334155}.subtext-form-row input,.subtext-form-row select{padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;width:100%;box-sizing:border-box}.subtext-form-row input:focus,.subtext-form-row select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.subtext-form-row-checkbox{margin:10px 0;display:flex;align-items:center}.subtext-form-row-checkbox label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#334155;cursor:pointer}.subtext-form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-hint{font-size:11px;color:#64748b}.subtext-divider{border:none;border-top:1px solid #e2e8f0;margin:14px 0}.card-config-header-row{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-bottom:14px}.card-config-body{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.badges-config-section{border:1px solid #e2e8f0;border-radius:6px;padding:10px;background:#f8fafc;margin-top:8px}.badges-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.badges-header label{font-size:12px;font-weight:600;color:#334155}.add-badge-btn{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0;padding:3px 8px;font-size:11px;border-radius:4px;font-weight:600;cursor:pointer}.add-badge-btn:hover{background:#dcfce7}.badge-item-row{display:flex;gap:6px;align-items:center;margin-bottom:6px}.badge-field-input{flex:1.2;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-icon-select{flex:.9;padding:5px 6px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-label-input{flex:.9;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.remove-badge-btn{background:none;border:none;color:#ef4444;font-size:18px;line-height:1;cursor:pointer;padding:0 4px}.card-live-preview-box{border:1px solid #e2e8f0;border-radius:8px;padding:12px;background:#f8fafc;display:flex;flex-direction:column;gap:8px;align-self:flex-start}.preview-tag{font-size:10px;font-weight:700;letter-spacing:.5px;color:#64748b}.sample-card-container{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:10px;display:flex;gap:12px;box-shadow:0 2px 6px #0000000d}.sample-card-image{width:76px;height:52px;border-radius:6px;background:#f1f5f9;border:1px solid #e2e8f0;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}.sample-img-placeholder{font-size:10px;color:#94a3b8;text-align:center}.sample-img-placeholder.has-img{display:flex;flex-direction:column;align-items:center;gap:2px}.img-field-label{font-size:9px;color:#2563eb;font-weight:600;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sample-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.sample-card-title{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.2}.sample-card-subtitle{font-size:11px;color:#556987;line-height:1.2}.sample-card-badges{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}.sample-badge-pill{background:#f0f4f9;color:#27406b;font-size:9px;font-weight:600;padding:2px 5px;border-radius:3px;display:inline-flex;align-items:center;gap:2px}.subtext-modal-footer{display:flex;justify-content:flex-end;gap:10px;padding:12px 20px;border-top:1px solid #e2e8f0;background:#f8fafc}.btn-cancel{background:#fff;border:1px solid #cbd5e1;padding:7px 16px;border-radius:6px;font-size:13px;font-weight:500;color:#475569;cursor:pointer}.btn-cancel:hover{background:#f1f5f9}.btn-save{background:#2563eb;border:1px solid #2563eb;padding:7px 18px;border-radius:6px;font-size:13px;font-weight:600;color:#fff;cursor:pointer}.btn-save:hover{background:#1d4ed8}.style-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0f7ff;border:1px solid #bfdbfe;border-radius:8px}.style-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.style-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#1e3a8a}.style-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.style-status-badge.configured{background:#dcfce7;color:#15803d}.style-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.style-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.style-modal-open-btn:hover{background:#1d4ed8}.style-modal-container{max-width:680px}.options-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px}.options-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.options-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#166534}.options-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.options-status-badge.configured{background:#dcfce7;color:#15803d}.options-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.options-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#16a34a;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.options-modal-open-btn:hover{background:#15803d}.options-modal-container{max-width:760px}.options-modal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.options-search-box{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #cbd5e1;border-radius:6px;padding:6px 10px;flex:1;max-width:380px}.options-filter-input{border:none;outline:none;background:transparent;font-size:13px;color:#0f172a;width:100%}.options-add-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:background .15s ease}.options-add-btn:hover{background:#1d4ed8}.options-modal-body{padding:16px 20px;overflow-y:auto;max-height:520px}.options-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.empty-title{margin:12px 0 4px;font-size:15px;font-weight:600;color:#1e293b}.empty-desc{margin:0;font-size:13px;color:#64748b}.options-table-wrapper{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;background:#fff}.options-table-header{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:10px 14px;background:#f1f5f9;font-size:11px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #e2e8f0}.options-table-body{display:flex;flex-direction:column}.modal-option-table-row{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid #f1f5f9;transition:background .12s ease}.modal-option-table-row:last-child{border-bottom:none}.modal-option-table-row:hover{background:#f8fafc}.index-pill{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#475569;font-size:11px;font-weight:600}.reorder-buttons{display:flex;align-items:center;gap:4px}.btn-arrow{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:4px;font-size:9px;color:#475569;cursor:pointer;transition:all .12s ease}.btn-arrow:hover:not(:disabled){background:#2563eb;color:#fff;border-color:#2563eb}.btn-arrow:disabled{opacity:.35;cursor:not-allowed}.modal-drag-grip{font-size:14px;color:#94a3b8;cursor:grab;padding:0 4px;-webkit-user-select:none;user-select:none}.modal-drag-grip:active{cursor:grabbing}.options-input{width:100%;padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;box-sizing:border-box}.options-input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb1a}.btn-delete-option{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:transparent;border:none;border-radius:4px;color:#94a3b8;cursor:pointer;transition:all .12s ease}.btn-delete-option:hover{background:#fee2e2;color:#dc2626}.options-live-preview-box{margin-top:16px;padding:14px 16px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.preview-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.preview-title{font-size:12px;font-weight:600;color:#334155}.preview-tag{font-size:10px;font-weight:600;padding:2px 7px;border-radius:10px;background:#e2e8f0;color:#475569}.preview-select-mock{width:100%}.mock-dropdown-select{width:100%;padding:8px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:13px;color:#334155;box-sizing:border-box}.action-buttons-sidebar-container{margin-top:15px;border:1px solid var(--fb-border-default, #e2e8f0);padding:14px;border-radius:10px;background-color:var(--fb-surface-secondary, #f8fafc)}.action-buttons-sidebar-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.action-buttons-sidebar-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--fb-text-primary, #0f172a)}.action-buttons-sidebar-title svg{stroke:var(--fb-action-surface, #0275ff)}.add-action-button-btn{display:inline-flex;align-items:center;gap:4px;background-color:var(--fb-action-surface, #0275ff);color:var(--fb-text-on-action, #ffffff);border:1px solid var(--fb-action-border, #0275ff);padding:5px 10px;border-radius:6px;font-size:11px;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.add-action-button-btn:hover{background-color:var(--fb-action-surface-hover, #0056b3);border-color:var(--fb-action-surface-hover, #0056b3)}.action-buttons-card-list{display:flex;flex-direction:column;gap:8px}.action-button-summary-card{background-color:var(--fb-surface-elevated, #ffffff);border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:6px;transition:border-color .15s ease,box-shadow .15s ease}.action-button-summary-card:hover{border-color:var(--fb-action-surface, #0275ff);box-shadow:0 2px 8px #0000000d}.action-button-card-top{display:flex;align-items:center;justify-content:space-between}.action-button-card-info{display:flex;align-items:center;gap:8px}.action-button-card-name{font-size:13px;font-weight:600;color:var(--fb-text-primary, #0f172a)}.action-button-card-event{font-size:11px;color:var(--fb-text-secondary, #64748b);background-color:var(--fb-surface-tertiary, #f1f5f9);padding:2px 6px;border-radius:4px}.action-button-card-actions{display:flex;align-items:center;gap:4px}.action-card-btn{background:none;border:1px solid transparent;border-radius:4px;padding:4px 6px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background-color .15s ease,color .15s ease}.action-card-btn.edit{color:var(--fb-action-surface, #0275ff)}.action-card-btn.edit:hover{background-color:var(--fb-selected-bg, #eff6ff);border-color:var(--fb-selected-border, #bfdbfe)}.action-card-btn.remove{color:var(--fb-error-text, #ef4444)}.action-card-btn.remove:hover{background-color:var(--fb-error-surface, #fef2f2);border-color:var(--fb-error-border, #fecaca)}.action-button-card-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.action-card-badge{font-size:10px;font-weight:500;padding:2px 6px;border-radius:4px;background-color:var(--fb-surface-tertiary, #f1f5f9);color:var(--fb-text-secondary, #475569);border:1px solid var(--fb-border-subtle, #e2e8f0)}.action-card-badge.method{background-color:var(--fb-info-surface, #eff6ff);color:var(--fb-info-text, #1d4ed8);border-color:var(--fb-info-border, #bfdbfe);font-weight:600}.action-card-badge.confirm{background-color:var(--fb-warning-surface, #fffbeb);color:var(--fb-warning-text, #b45309);border-color:var(--fb-warning-border, #fef08a)}.action-card-badge.rules{background-color:var(--fb-success-surface, #f0fdf4);color:var(--fb-success-text, #15803d);border-color:var(--fb-success-border, #bbf7d0);font-weight:600}.action-buttons-empty{text-align:center;padding:16px;font-size:12px;color:var(--fb-text-muted, #94a3b8);border:1px dashed var(--fb-border-default, #cbd5e1);border-radius:6px;background:var(--fb-surface-elevated, #ffffff)}.button-modal-backdrop{position:fixed;inset:0;background:var(--fb-backdrop, rgba(15, 23, 42, .6));backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:10000}.button-modal-container{background:var(--fb-surface-elevated, #ffffff);border-radius:10px;box-shadow:0 20px 45px #00000040;width:90%;max-width:680px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;animation:modalFadeIn .2s ease-out}.button-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid var(--fb-border-default, #e2e8f0);background:var(--fb-surface-secondary, #f8fafc)}.button-modal-title{font-size:16px;font-weight:700;color:var(--fb-text-primary, #0f172a);margin:0}.button-modal-element-tag{font-size:11px;font-weight:500;color:var(--fb-text-secondary, #475569);background:var(--fb-surface-tertiary, #e2e8f0);padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px}.button-modal-close-btn{background:none;border:none;font-size:24px;line-height:1;color:var(--fb-text-muted, #64748b);cursor:pointer;padding:0 4px;transition:color .15s ease}.button-modal-close-btn:hover{color:var(--fb-text-primary, #0f172a)}.button-modal-tabs{display:flex;background:var(--fb-surface-tertiary, #f1f5f9);border-bottom:1px solid var(--fb-border-default, #e2e8f0);padding:0 16px;gap:4px;overflow-x:auto}.button-tab-btn{background:none;border:none;border-bottom:2px solid transparent;padding:10px 14px;font-size:12px;font-weight:600;color:var(--fb-text-secondary, #475569);cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:all .15s ease;white-space:nowrap}.button-tab-btn:hover{color:var(--fb-text-primary, #0f172a);background:var(--fb-nav-hover, rgba(0, 0, 0, .03))}.button-tab-btn.active{color:var(--fb-action-surface, #0275ff);border-bottom-color:var(--fb-action-surface, #0275ff);background:var(--fb-surface-elevated, #ffffff)}.tab-badge{font-size:10px;font-weight:700;background:var(--fb-action-surface, #0275ff);color:var(--fb-text-on-action, #ffffff);padding:1px 6px;border-radius:10px}.button-modal-body{padding:20px;overflow-y:auto;flex:1;background:var(--fb-surface-elevated, #ffffff)}.button-modal-tab-content{display:flex;flex-direction:column;gap:14px}.button-form-row{display:flex;flex-direction:column;gap:5px}.button-form-row label{font-size:12px;font-weight:600;color:var(--fb-text-primary, #1e293b)}.button-form-row input[type=text],.button-form-row input[type=number],.button-form-row select{padding:8px 10px;border:1px solid var(--fb-input-border, #cbd5e1);border-radius:6px;font-size:13px;color:var(--fb-text-primary, #0f172a);background:var(--fb-input-bg, #ffffff);box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.button-form-row input[type=text]:focus,.button-form-row input[type=number]:focus,.button-form-row select:focus{outline:none;border-color:var(--fb-input-focus, #0275ff);box-shadow:0 0 0 3px var(--fb-focus-ring, rgba(2, 117, 255, .15))}.button-form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.button-form-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}.button-checkbox-label{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;color:var(--fb-text-primary, #1e293b)}.button-checkbox-label input[type=checkbox]{width:16px;height:16px;cursor:pointer;accent-color:var(--fb-action-surface, #0275ff)}.button-color-input{width:100%;height:38px;padding:2px 4px;border:1px solid var(--fb-input-border, #cbd5e1);border-radius:6px;cursor:pointer;background:var(--fb-input-bg, #ffffff);box-sizing:border-box}.button-rules-section{padding:10px 14px;background:var(--fb-surface-secondary, #f8fafc);border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px}.button-rules-header{display:flex;align-items:center;justify-content:space-between;margin-top:10px;padding-bottom:8px;border-bottom:1px solid var(--fb-border-default, #e2e8f0)}.button-rules-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--fb-text-primary, #0f172a)}.button-rules-count{font-size:11px;background:var(--fb-surface-tertiary, #e2e8f0);color:var(--fb-text-secondary, #475569);padding:1px 7px;border-radius:10px}.btn-add-rule{background:var(--fb-action-surface, #0275ff);color:var(--fb-text-on-action, #ffffff);border:1px solid var(--fb-action-border, #0275ff);padding:5px 12px;border-radius:6px;font-size:11px;font-weight:600;cursor:pointer;transition:background-color .15s ease}.btn-add-rule:hover{background:var(--fb-action-surface-hover, #0056b3)}.button-rules-list{display:flex;flex-direction:column;gap:10px;margin-top:10px}.button-rule-card{background:var(--fb-surface-secondary, #f8fafc);border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px;padding:12px}.button-rule-card-header{display:flex;align-items:center;gap:10px}.button-rule-num{font-size:12px;font-weight:700;color:var(--fb-text-muted, #64748b)}.button-rule-type-select{display:flex;align-items:center;gap:6px;flex:1}.button-rule-type-select label{font-size:11px;font-weight:600;color:var(--fb-text-secondary, #475569)}.button-rule-type-select select{padding:4px 8px;font-size:12px;border-radius:4px;border:1px solid var(--fb-input-border, #cbd5e1);background:var(--fb-input-bg, #ffffff);color:var(--fb-text-primary, #0f172a)}.btn-rule-remove{background:none;border:none;font-size:18px;line-height:1;color:var(--fb-error-text, #ef4444);cursor:pointer;padding:2px 6px;border-radius:4px;transition:background-color .15s ease}.btn-rule-remove:hover{background:var(--fb-error-surface, #fef2f2)}.button-rules-empty{text-align:center;padding:16px;font-size:12px;color:var(--fb-text-muted, #94a3b8);border:1px dashed var(--fb-border-default, #cbd5e1);border-radius:6px;background:var(--fb-surface-secondary, #f8fafc)}.button-modal-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:12px 20px;background:var(--fb-surface-secondary, #f8fafc);border-top:1px solid var(--fb-border-default, #e2e8f0)}.button-modal-footer .btn-cancel{background:var(--fb-surface-elevated, #ffffff);border:1px solid var(--fb-border-default, #cbd5e1);color:var(--fb-text-primary, #334155);padding:8px 16px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.button-modal-footer .btn-cancel:hover{background:var(--fb-surface-tertiary, #f1f5f9);border-color:var(--fb-border-strong, #94a3b8)}.button-modal-footer .btn-save{background:var(--fb-action-surface, #0275ff);border:1px solid var(--fb-action-border, #0275ff);color:var(--fb-text-on-action, #ffffff);padding:8px 18px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.button-modal-footer .btn-save:hover{background:var(--fb-action-surface-hover, #0056b3);border-color:var(--fb-action-surface-hover, #0056b3)}.button-modal-footer .btn-save:disabled{opacity:.5;cursor:not-allowed;background:var(--fb-action-disabled, #94a3b8);border-color:var(--fb-action-disabled, #94a3b8)}.button-row-header-between{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.cel-badge{font-size:10px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:var(--fb-text-muted, #64748b);background:var(--fb-surface-tertiary, #f1f5f9);border:1px solid var(--fb-border-subtle, #e2e8f0);padding:1px 6px;border-radius:4px}.button-form-textarea{width:100%;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;line-height:1.45;padding:8px 10px;border:1px solid var(--fb-input-border, #cbd5e1);border-radius:6px;background:var(--fb-input-bg, #ffffff);color:var(--fb-text-primary, #1e293b);outline:none;resize:vertical;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.button-form-textarea:focus{border-color:var(--fb-input-focus, #0275ff);box-shadow:0 0 0 2px var(--fb-focus-ring, rgba(2, 117, 255, .2))}.button-form-textarea.is-invalid,.button-form-row input.is-invalid{border-color:var(--fb-error-border, #ef4444)!important;background-color:var(--fb-error-surface, #fef2f2)}.cel-feedback{display:flex;align-items:center;gap:6px;font-size:11px;line-height:1.3;margin-top:4px}.cel-feedback.valid{color:var(--fb-success-text, #16a34a)}.cel-feedback.invalid{color:var(--fb-error-text, #dc2626);font-weight:500}.cel-icon{font-size:12px;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i7.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NumberValueAccessor, selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i7.RangeValueAccessor, selector: "input[type=range]:not([ngNoCva])[formControlName],input[type=range]:not([ngNoCva])[formControl],input[type=range]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i7.CheckboxControlValueAccessor, selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i7.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: NxtCustomTranslatePipe, name: "nxtCustomTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i6.NgClass, i7.NgSelectOption, i7.ɵNgSelectMultipleOption, i7.DefaultValueAccessor, i7.NumberValueAccessor, i7.SelectControlValueAccessor, i7.NgControlStatus, i7.NgModel, /* @ts-ignore */
69229
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: PropertiesComponent, isStandalone: true, selector: "app-properties", inputs: { templateSelected: "templateSelected", selectedElementType: "selectedElementType" }, outputs: { formButtonHandler: "formButtonHandler", templateSaveHandler: "templateSaveHandler" }, host: { listeners: { "document:click": "onClickOutside($event)" } }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], ngImport: i0, template: "<!-- AP 22JAN25 - Field and Element Properties -->\n\n<div class=\"container\">\n <div class=\"tabs\">\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'attributes'}\" (click)=\"setActiveTab('attributes')\">{{ 'ATTRIBUTES' | nxtCustomTranslate : 'Attributes' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'property'}\" (click)=\"setActiveTab('property')\">{{ 'PROPERTY' | nxtCustomTranslate : 'Property' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'appearance'}\" (click)=\"setActiveTab('appearance')\">{{ 'APPEARANCE' | nxtCustomTranslate : 'Appearance' }}</div>\n </div>\n @if (activeTab() === 'attributes') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @defer (when selectedElement()?.type === 'Image') {\n @if (selectedElement().imageData) {\n <image-cropper\n [imageBase64]=\"selectedElement().orgImageData\"\n [disabled]=\"false\"\n [alignImage]=\"alignImage\"\n [roundCropper]=\"roundCropper\"\n [backgroundColor]=\"'white'\"\n imageAltText=\"Alternative image text\"\n [allowMoveImage]=\"false\"\n [hideResizeSquares]=\"false\"\n [canvasRotation]=\"canvasRotation()\"\n [aspectRatio]=\"aspectRatio\"\n [containWithinAspectRatio]=\"false\"\n [maintainAspectRatio]=\"false\"\n [cropperStaticWidth]=\"cropperStaticWidth\"\n [cropperStaticHeight]=\"cropperStaticHeight\"\n [cropperMinWidth]=\"cropperMinWidth\"\n [cropperMinHeight]=\"cropperMinHeight\"\n [cropperMaxWidth]=\"cropperMaxWidth\"\n [cropperMaxHeight]=\"cropperMaxHeight\"\n [resetCropOnAspectRatioChange]=\"true\"\n [(cropper)]=\"cropper\"\n [(transform)]=\"transform\"\n [onlyScaleDown]=\"true\"\n output=\"blob\"\n format=\"png\"\n (imageCropped)=\"imageCropped($event)\"\n (cropperReady)=\"cropperReady($event)\"\n ></image-cropper>\n }\n @if (selectedElement().imageData) {\n <div style=\"display: flex; gap: 2px;\">\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateLeft()\" title=\"{{ 'ROTATE_LEFT' | nxtCustomTranslate : 'Rotate Left' }}\">\u27F2</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateRight()\" title=\"{{ 'ROTATE_RIGHT' | nxtCustomTranslate : 'Rotate Right' }}\">\u27F3</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomOut()\" title=\"{{ 'ZOOM_OUT' | nxtCustomTranslate : 'Zoom Out' }}\">-</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomIn()\" title=\"{{ 'ZOOM_IN' | nxtCustomTranslate : 'Zoom In' }}\">+</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveLeft()\" title=\"{{ 'MOVE_LEFT' | nxtCustomTranslate : 'Move Left' }}\">\u2190</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveRight()\" title=\"{{ 'MOVE_RIGHT' | nxtCustomTranslate : 'Move Right' }}\">\u2192</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveUp()\" title=\"{{ 'MOVE_UP' | nxtCustomTranslate : 'Move Up' }}\">\u2191</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveDown()\" title=\"{{ 'MOVE_DOWN' | nxtCustomTranslate : 'Move Down' }}\">\u2193</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipHorizontal()\" [ngClass]=\"{'enabled': transform().flipH}\" title=\"{{ 'FLIP_HORIZONTALLY' | nxtCustomTranslate : 'Flip Horizontally' }}\">\u2194</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipVertical()\" [ngClass]=\"{'enabled': transform().flipV}\" title=\"{{ 'FLIP_VERTICALLY' | nxtCustomTranslate : 'Flip Vertically' }}\">\u2195</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"resetImage()\" title=\"{{ 'RESET' | nxtCustomTranslate : 'Reset' }}\">\u00D7</div>\n </div>\n }\n }\n @if (selectedElement()?.type === 'Book') {\n <div>\n <label class=\"text-sm\">{{ 'SEARCH_BOOK' | nxtCustomTranslate : 'Search Book' }}</label>\n <div style=\"display: flex; gap: 2px; align-items: center; justify-content: center;\">\n <nxt-search-box\n [question]=\"selectedElement()\"\n [apiMeta]=\"bookSubtext()\"\n [placeHolderText]=\"'SEARCH' | nxtCustomTranslate : 'Search...'\"\n (searchValueChange)=\"childEventCapture($event.value)\"\n ></nxt-search-box>\n <div class=\"link-icon\">\n <svg (click)=\"linkToggleDropdown($event)\" fill=\"#000000\" version=\"1.1\" id=\"Capa_1\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24px\" height=\"24px\"\n viewBox=\"0 0 450 450\" xml:space=\"preserve\">\n <g>\n <g>\n <g>\n <path d=\"M318.15,230.195l77.934-77.937c31.894-31.892,31.894-83.782-0.004-115.674l-12.66-12.66\n c-31.893-31.896-83.78-31.896-115.674-0.004l-77.937,77.934c-17.588,17.588-25.457,41.264-23.646,64.311\n c-23.045-1.813-46.722,6.056-64.308,23.647L23.92,267.748c-31.894,31.889-31.894,83.779,0,115.674l12.664,12.662\n c31.893,31.893,83.783,31.893,115.674,0l77.935-77.936c17.592-17.59,25.459-41.266,23.647-64.309\n C276.884,255.654,300.56,247.783,318.15,230.195z M202.653,290.605l-77.936,77.938c-16.705,16.703-43.889,16.703-60.59,0\n l-12.666-12.666c-16.705-16.701-16.703-43.885,0-60.594l77.936-77.932c14.14-14.141,35.779-16.306,52.226-6.516l-32.302,32.307\n c-7.606,7.604-7.606,19.938,0,27.541c7.605,7.607,19.937,7.607,27.541,0l32.306-32.303\n C218.959,254.828,216.795,276.469,202.653,290.605z M238.382,209.169l32.299-32.306c7.608-7.602,7.608-19.935,0-27.538\n c-7.604-7.61-19.936-7.61-27.541-0.004l-32.303,32.303c-9.791-16.446-7.627-38.087,6.514-52.226l77.935-77.935\n c16.707-16.707,43.89-16.707,60.594,0l12.664,12.664c16.705,16.705,16.705,43.886,0,60.591l-77.936,77.937\n C276.468,216.797,254.828,218.959,238.382,209.169z\" />\n <path d=\"M343.466,261.465c-45.287,0-82,36.713-82,82s36.713,82,82,82c45.286,0,82-36.713,82-82S388.753,261.465,343.466,261.465z\n M372.505,333.564l-56.046,56.104c-0.239,0.238-0.536,0.41-0.862,0.496l-22.315,5.85c-0.649,0.168-1.347-0.02-1.822-0.494\n c-0.477-0.479-0.666-1.172-0.496-1.824l5.826-22.318c0.084-0.326,0.256-0.627,0.494-0.863l56.047-56.104\n c0.742-0.742,1.945-0.744,2.688-0.002l4.548,4.541c0.739,0.74,0.741,1.943,0,2.688l-37.433,37.471l4.709,4.703l37.435-37.471\n c0.739-0.742,1.94-0.742,2.682-0.002l4.55,4.541C373.25,331.617,373.25,332.822,372.505,333.564z M395.472,310.574l-17,17.018\n c-0.739,0.744-1.942,0.744-2.685,0.002l-16.489-16.475c-0.744-0.74-0.744-1.943-0.002-2.688l17-17.02\n c0.741-0.74,1.944-0.74,2.688-0.002l16.487,16.477C396.216,308.629,396.216,309.832,395.472,310.574z\" />\n </g>\n </g>\n </g>\n </svg>\n @if (isLinkDropdownOpen()) {\n <div class=\"link-dropdown-menu\" #dropdown>\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().endpoint\" (ngModelChange)=\"updateBookSubtext('endpoint', $event)\" />\n <label>{{ 'VARIABLE' | nxtCustomTranslate : 'Variable' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().variable\" (ngModelChange)=\"updateBookSubtext('variable', $event)\" />\n <label>{{ 'FIELD' | nxtCustomTranslate : 'Field' }}:</label>\n <input type=\"text\" [ngModel]=\"fieldAsString()\" (ngModelChange)=\"updateField($event)\" />\n <label>{{ 'DEFAULT_FIELD' | nxtCustomTranslate : 'Default Field' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().defaultField\" (ngModelChange)=\"updateBookSubtext('defaultField', $event)\" />\n </div>\n }\n </div>\n </div>\n </div>\n }\n @for (prop of getProperties()?.elementProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'checkbox' && prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.isTranslate && formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if (((selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? selectColumn() : selectedElement().id) + '.' + prop.key | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n <!-- Copy Icon -->\n @if (!copied) {\n <svg\n (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" transform=\"rotate(0)\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#CCCCCC\" stroke-width=\"0.048\"></g><g id=\"SVGRepo_iconCarrier\"> <g id=\"style=stroke\"> <g id=\"copy\"> <path id=\"rec (Stroke)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 5.25C6.25 2.50265 8.43733 0.25 11.1667 0.25H17.8333C20.5627 0.25 22.75 2.50265 22.75 5.25V13.75C22.75 16.4974 20.5627 18.75 17.8333 18.75C17.4191 18.75 17.0833 18.4142 17.0833 18C17.0833 17.5858 17.4191 17.25 17.8333 17.25C19.7064 17.25 21.25 15.6971 21.25 13.75V5.25C21.25 3.30293 19.7064 1.75 17.8333 1.75H11.1667C9.29363 1.75 7.75 3.30293 7.75 5.25C7.75 5.66421 7.41421 6 7 6C6.58579 6 6.25 5.66421 6.25 5.25Z\" fill=\"#000000\"></path> <path id=\"rec (Stroke)_2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 10.25C1.25 7.50265 3.43733 5.25 6.16667 5.25H12.8333C15.5627 5.25 17.75 7.50265 17.75 10.25V18.75C17.75 21.4974 15.5627 23.75 12.8333 23.75H6.16667C3.43733 23.75 1.25 21.4974 1.25 18.75V10.25ZM6.16667 6.75C4.29363 6.75 2.75 8.30293 2.75 10.25V18.75C2.75 20.6971 4.29363 22.25 6.16667 22.25H12.8333C14.7064 22.25 16.25 20.6971 16.25 18.75V10.25C16.25 8.30293 14.7064 6.75 12.8333 6.75H6.16667Z\" fill=\"#000000\"></path> </g> </g> </g></svg>\n }\n <!-- Copied Message -->\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n @if (prop.key === 'helpText' && selectedElement()?.helpText) {\n <div>{{ selectedElement()?.helpText }}</div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'number') {\n <input\n type=\"number\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n }\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n <span class=\"toggle-label\" style=\"padding-left: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n </div>\n }\n @if (prop.type === 'subQuestion') {\n <div>\n <div style=\"display: flex; flex-direction: row; gap: 10px; align-items: center;\">\n <div>{{ prop.labelPath | nxtCustomTranslate : prop.label }}</div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n @if (selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)) {\n <div>\n @for (subProp of prop.subQuestion; track subProp) {\n <div style=\"background-color: #e7f2ff; padding: 8px; border-radius: 4px;\">\n <div class=\"form-group\">\n <label>{{ subProp.labelPath | nxtCustomTranslate : subProp.label }}</label>\n @if (subProp.type === 'array') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"subProp.operands ? subProp.operands.includes(column.apiName) : false\"\n (change)=\"onCheckboxChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName, $event.target.checked)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'radio') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"radio\"\n [name]=\"subProp.key\"\n [value]=\"column.apiName\"\n [checked]=\"getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) === column.apiName\"\n (change)=\"onRadioChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"subProp.placeholder\"\n [ngModel]=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) : (selectedElement() | getValueByPath : subProp.key)) : (selectedElement() | getValueByPath : subProp.key)\"\n (ngModelChange)=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event,false, prop.isTranslate) : setValueByPath(subProp.key, $event)) : setValueByPath(subProp.key, $event, prop.isTranslate)\"\n />\n }\n @if (subProp.type === 'boolean') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n @if (subProp.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? (getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, subProp.isTableColumn)) : (selectedElement() | getValueByPath : subProp.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event, subProp.isTableColumn, prop.isTranslate) : setValueByPath(subProp.key, $event, prop.isTranslate))\"\n >\n @for (option of subProp.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (subProp.type === 'checkbox') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n @if (prop.type === 'align') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onAlignSelect(option.value)\" [ngClass]=\"{'active': selectedElement()?.textAlign === option.value}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'style') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onStyleSelect(option.value)\" [ngClass]=\"{'active': isStyleActive(option.value)}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'color') {\n <div>\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n @if (prop.key === 'title') {\n <!-- MR 17NOV26 Compact Action Buttons in Sidebar -->\n <div class=\"action-buttons-sidebar-container\">\n <div class=\"action-buttons-sidebar-header\">\n <div class=\"action-buttons-sidebar-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <rect x=\"3\" y=\"6\" width=\"18\" height=\"12\" rx=\"3\"></rect>\n <path d=\"M7 12h10\"></path>\n </svg>\n <span>{{ 'ACTION_BUTTONS' | nxtCustomTranslate : 'Action Buttons' }}</span>\n </div>\n <button type=\"button\" (click)=\"openAddButtonModal()\" class=\"add-action-button-btn\">\n + {{ 'ADD_BUTTON' | nxtCustomTranslate : 'Add Button' }}\n </button>\n </div>\n\n <div class=\"action-buttons-card-list\">\n @for (btn of book()?.questionbook?.action || []; track btn.id || $index; let i = $index) {\n <div class=\"action-button-summary-card\">\n <div class=\"action-button-card-top\">\n <div class=\"action-button-card-info\">\n <span class=\"action-button-card-name\">{{ btn.name || ('UNNAMED' | nxtCustomTranslate : 'Unnamed') }}</span>\n <span class=\"action-button-card-event\">{{ btn.eventtoemit || 'default' }}</span>\n </div>\n <div class=\"action-button-card-actions\">\n <button type=\"button\" class=\"action-card-btn edit\" (click)=\"openEditButtonModal(i)\" title=\"Edit Button\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n </button>\n <button type=\"button\" class=\"action-card-btn remove\" (click)=\"removeButton(btn)\" title=\"Remove Button\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <polyline points=\"3 6 5 6 21 6\"></polyline>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path>\n </svg>\n </button>\n </div>\n </div>\n <div class=\"action-button-card-meta\">\n <span class=\"action-card-badge\">ID: {{ btn.id }}</span>\n @if (btn.method) {\n <span class=\"action-card-badge method\">{{ btn.method }}</span>\n }\n @if (btn.positionPercent !== undefined && btn.positionPercent !== null) {\n <span class=\"action-card-badge\">{{ btn.positionPercent }}%</span>\n }\n @if (btn.enableConfirm) {\n <span class=\"action-card-badge confirm\">Confirm</span>\n }\n @if (btn.rules && btn.rules.length > 0) {\n <span class=\"action-card-badge rules\">{{ btn.rules.length }} Rule{{ btn.rules.length > 1 ? 's' : '' }}</span>\n }\n </div>\n </div>\n }\n @if (!book()?.questionbook?.action?.length) {\n <div class=\"action-buttons-empty\">\n <span>{{ 'NO_BUTTONS_CONFIGURED' | nxtCustomTranslate : 'No footer buttons configured.' }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n @if (selectedElement()?.type === 'Date' || selectedElement()?.type === 'DateTime') {\n <div>\n <div class=\"text-sm\">\n {{ 'DATE_RANGE' | nxtCustomTranslate : 'Date Range' }}\n </div>\n <div style=\"display: flex; gap: 2px; align-items: center;\">\n <!-- Minimum Date -->\n <div>\n <label class=\"text-sm\">Minimum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'minDate') === 'today'\"\n (change)=\"setValueByPath('minDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'minDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'minDate') \n : null\"\n (ngModelChange)=\"setValueByPath('minDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'minDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n <!-- Maximum Date -->\n <div>\n <label class=\"text-sm\">Maximum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n (change)=\"setValueByPath('maxDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'maxDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'maxDate') \n : null\"\n (ngModelChange)=\"setValueByPath('maxDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (activeTab() === 'property') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n <label>Id</label>\n <div style=\"font-size: 13px; padding: 11px; border-radius: 5px; background-color: #f8f8f8; border: 1px solid #ddd;\">\n {{ headerSelect() ? bookId() : selectedElement()?.id }}\n </div>\n @for (prop of getProperties()?.fieldProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.type === 'toggleGroup') {\n <div class=\"toggle-group\">\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', true) : (selectedElement() | getValueByPath : 'isOptional')) : (selectedElement() | getValueByPath : 'isOptional')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', $event, true, prop.isTranslate) : onToggleChange('isOptional', $event)) : onToggleChange('isOptional', $event)\"\n />\n {{ 'REQUIRED' | nxtCustomTranslate : 'Required' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', true) : (selectedElement() | getValueByPath : 'isReadOnly')) : (selectedElement() | getValueByPath : 'isReadOnly')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', $event, true, prop.isTranslate) : onToggleChange('isReadOnly', $event)) : onToggleChange('isReadOnly', $event)\"\n />\n {{ 'READ_ONLY' | nxtCustomTranslate : 'Read Only' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', true) : (selectedElement() | getValueByPath : 'isHidden')) : (selectedElement() | getValueByPath : 'isHidden')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', $event, true, prop.isTranslate) : onToggleChange('isHidden', $event)) : onToggleChange('isHidden', $event)\"\n />\n {{ 'IS_HIDE' | nxtCustomTranslate : 'Is Hide' }}\n </label>\n </div>\n </div>\n }\n <!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n @if ( prop.type === 'checkbox' || prop.type === 'radio' || prop.key === 'options') {\n <div class=\"options-sidebar-trigger-wrapper\">\n <div class=\"options-trigger-header\">\n <div class=\"options-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <line x1=\"8\" y1=\"6\" x2=\"21\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"12\" x2=\"21\" y2=\"12\"></line>\n <line x1=\"8\" y1=\"18\" x2=\"21\" y2=\"18\"></line>\n <line x1=\"3\" y1=\"6\" x2=\"3.01\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"12\" x2=\"3.01\" y2=\"12\"></line>\n <line x1=\"3\" y1=\"18\" x2=\"3.01\" y2=\"18\"></line>\n </svg>\n <span>{{ prop.labelPath | nxtCustomTranslate : prop.label || 'Options' }}</span>\n </div>\n <span class=\"options-status-badge\" [class.configured]=\"getOptionsCount(prop.key) > 0\">\n {{ getOptionsCount(prop.key) }} {{ getOptionsCount(prop.key) === 1 ? 'Option' : 'Options' }}\n </span>\n </div>\n <p class=\"options-trigger-hint\">Manage choices, display labels, stored values, and option ordering.</p>\n <button type=\"button\" class=\"options-modal-open-btn\" (click)=\"openOptionsModal(prop.key)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Options ({{ getOptionsCount(prop.key) }})</span>\n </button>\n </div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'subQuestion') {\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n <div class=\"subtext-sidebar-trigger-wrapper\">\n <div class=\"subtext-trigger-header\">\n <div class=\"subtext-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>\n </svg>\n <span>Sub Text (API & Layout)</span>\n </div>\n @if (hasSubTextConfigured()) {\n <span class=\"subtext-status-badge configured\">Configured</span>\n } @else {\n <span class=\"subtext-status-badge\">Not Set</span>\n }\n </div>\n <p class=\"subtext-trigger-hint\">Configure API endpoint, live search queries, dependent fields, and card layout.</p>\n <button type=\"button\" class=\"subtext-modal-open-btn\" (click)=\"openSubTextModal(prop)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Sub Text</span>\n </button>\n </div>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <span class=\"toggle-label\" style=\"padding-right: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key , prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) :setValueByPath(prop.key, $event, prop.isTranslate) ) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n </div>\n }\n <!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n <div class=\"style-sidebar-trigger-wrapper\">\n <div class=\"style-trigger-header\">\n <div class=\"style-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <path d=\"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z\"></path>\n </svg>\n <span>{{ 'STYLE' | nxtCustomTranslate : 'Style' }}</span>\n </div>\n @if (hasStyleConfigured()) {\n <span class=\"style-status-badge configured\">Customized</span>\n } @else {\n <span class=\"style-status-badge\">Default</span>\n }\n </div>\n <p class=\"style-trigger-hint\">Configure CSS classes, inline styling, text direction, and label visibility.</p>\n <button type=\"button\" class=\"style-modal-open-btn\" (click)=\"openStyleModal()\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M12 20h9\"></path>\n <path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z\"></path>\n </svg>\n <span>Configure Style</span>\n </button>\n </div>\n </div>\n }\n </div>\n}\n\n@if (activeTab() === 'appearance') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @for (prop of getProperties()?.appearance; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n }\n <div class=\"flex-container\">\n @if (prop.type === 'color') {\n <div class=\"color-selector\">\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"selectedElement()?.color\"\n (ngModelChange)=\"setValueByPath('color', $event, prop.isTranslate)\"\n >\n </div>\n }\n @if (prop.type === 'color') {\n <div class=\"hex-input-container\">\n <span>{{ 'HEX_CODE' | nxtCustomTranslate : 'HEX Code' }}</span>\n <input\n type=\"text\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n </div>\n }\n </div>\n @if (prop.type === 'button-toggle') {\n <div class=\"button-toggle-wrapper\">\n <button\n type=\"button\"\n class=\"toggle-button\"\n (click)=\"duplicateField(selectedElement())\"\n >\n {{ 'ADD_DUPLICATE' | nxtCustomTranslate : 'Add Duplicate' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n}\n\n@if (!templateSelected) {\n <div class=\"button-container\">\n <button class=\"save-btn\" (click)=\"handleButtonClick()\">{{ 'SAVE' | nxtCustomTranslate : 'Save' }}</button>\n <button class=\"cancel-btn\" (click)=\"onCancel()\">{{ 'CANCEL' | nxtCustomTranslate : 'Cancel' }}</button>\n </div>\n}\n\n@if (templateSelected) {\n <div class=\"button-container\" style=\"margin-top: 20px;\">\n <button class=\"save-btn\" (click)=\"handleTemplateSave()\">{{ 'SAVE_TEMPLATE' | nxtCustomTranslate : 'Save Template' }}</button>\n </div>\n}\n\n<!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n@if (isSubTextModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeSubTextModal()\">\n <div class=\"subtext-modal-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Sub Text (API & Card Configuration)</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} &bull; {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeSubTextModal()\">&times;</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'api'\" (click)=\"activeSubTextTab = 'api'\">\n API & Data Source\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'dependencies'\" (click)=\"activeSubTextTab = 'dependencies'\">\n Dependencies & Queries\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'card'\" (click)=\"activeSubTextTab = 'card'\">\n Card Presentation\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'other'\" (click)=\"activeSubTextTab = 'other'\">\n Advanced / Files\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: API & Data Source -->\n @if (activeSubTextTab === 'api') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-row\">\n <label>End Point URL (endpoint)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.endpoint\" placeholder=\"/services/apexrest/FusionApiData?type=...\" />\n <small class=\"field-hint\">Base or relative endpoint URL to fetch records from</small>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Variable / Response Key (variable)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.variable\" placeholder=\"data or records (leave blank if root array)\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Default Field / Selected Value (defaultField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.defaultField\" placeholder=\"e.g. name, id\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Search & Display Fields (field)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextFieldsStr\" placeholder=\"e.g. name, code, city\" />\n <small class=\"field-hint\">Fields used for live searching and default two-line fallback display</small>\n </div>\n <!-- MR 05DEC26 Add missing API/reference subText fields -->\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Label Field (labelField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.labelField\" placeholder=\"e.g. name, label\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Value Field (valueField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.valueField\" placeholder=\"e.g. id, _id, code\" />\n </div>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Post Reference Field (postReferenceField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.postReferenceField\" placeholder=\"e.g. workinfo.designation\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Save To Backend (saveToBackend)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.saveToBackend\" placeholder=\"Save To Backend\" />\n </div>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isObject\" />\n <span>Is Object (isObject - emit full record object instead of single scalar string)</span>\n </label>\n </div>\n </div>\n }\n\n <!-- Tab 2: Dependencies & Queries -->\n @if (activeSubTextTab === 'dependencies') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Source Question Id (sourceQuestionId)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.sourceQuestionId\" placeholder=\"Parent question ID\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Dependent Value (dependentValue)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.dependentValue\" placeholder=\"e.g. true or specific value\" />\n </div>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isDependentField\" />\n <span>Is Dependent Field (isDependentField - conditional rendering based on parent value)</span>\n </label>\n </div>\n <hr class=\"subtext-divider\" />\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Live Search Query Parameter (queryParameter)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextQueryParamStr\" placeholder=\"e.g. search, q\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Field in API URL (queryField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryField\" placeholder=\"e.g. customerId\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value / Reference Key (queryValue)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValue\" placeholder=\"e.g. selectedCustomer\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value Reference (queryValueReference)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValueReference\" placeholder=\"e.g. parentRef\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Unique Cache Key (uniqueKey)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.uniqueKey\" placeholder=\"Cache key for local storage\" />\n </div>\n </div>\n }\n\n <!-- Tab 3: Card Layout Presentation -->\n @if (activeSubTextTab === 'card') {\n <div class=\"subtext-tab-content\">\n <div class=\"card-config-header-row\">\n <label class=\"toggle-switch\">\n <input type=\"checkbox\" [(ngModel)]=\"isCardConfigEnabled\" (change)=\"toggleCardConfig(isCardConfigEnabled)\" />\n <span class=\"toggle-slider\"></span>\n </label>\n <div class=\"toggle-text\">\n <strong>Enable Card Layout (cardConfig)</strong>\n <p>Render suggestions as rich cards with thumbnail, primary title, subtitle, and badges</p>\n </div>\n </div>\n\n @if (isCardConfigEnabled) {\n <div class=\"card-config-body\">\n <div class=\"card-config-fields\">\n <div class=\"subtext-form-row\">\n <label>Image Field Name (cardConfig.imageUrl)</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.imageUrl\" placeholder=\"e.g. photoUrl, thumbnail, imageUrl\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Primary Title Field (cardConfig.primary)</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.primary\" placeholder=\"e.g. name, title, hotelName\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Subtitle Field (cardConfig.subTitle)</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.subTitle\" placeholder=\"e.g. summary, duration, description\" />\n </div>\n\n <!-- Badges Section -->\n <div class=\"badges-config-section\">\n <div class=\"badges-header\">\n <label>Badges (cardConfig.badges)</label>\n <button type=\"button\" class=\"add-badge-btn\" (click)=\"addModalBadge()\">+ Add Badge</button>\n </div>\n @for (badge of modalBadges; track $index; let bIdx = $index) {\n <div class=\"badge-item-row\">\n <input type=\"text\" [(ngModel)]=\"badge.field\" placeholder=\"Field name (e.g. city)\" class=\"badge-field-input\" />\n <select [(ngModel)]=\"badge.icon\" class=\"badge-icon-select\">\n <option value=\"\">No Icon</option>\n <option value=\"hotel\">Hotel</option>\n <option value=\"calendar\">Calendar</option>\n <option value=\"location\">Location</option>\n </select>\n <input type=\"text\" [(ngModel)]=\"badge.label\" placeholder=\"Prefix label (optional)\" class=\"badge-label-input\" />\n <button type=\"button\" class=\"remove-badge-btn\" (click)=\"removeModalBadge(bIdx)\">&times;</button>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Card Preview -->\n <div class=\"card-live-preview-box\">\n <span class=\"preview-tag\">LIVE PREVIEW</span>\n <div class=\"sample-card-container\">\n <div class=\"sample-card-image\">\n @if (modalCardConfig.imageUrl) {\n <div class=\"sample-img-placeholder has-img\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\"/>\n <polyline points=\"21 15 16 10 5 21\"/>\n </svg>\n <span class=\"img-field-label\">{{ modalCardConfig.imageUrl }}</span>\n </div>\n } @else {\n <div class=\"sample-img-placeholder\">Image</div>\n }\n </div>\n <div class=\"sample-card-content\">\n <div class=\"sample-card-title\">{{ modalCardConfig.primary || 'Hotel Booking' }}</div>\n <div class=\"sample-card-subtitle\">{{ modalCardConfig.subTitle || '3 nights at Atlantis, Dubai' }}</div>\n @if (modalBadges.length > 0) {\n <div class=\"sample-card-badges\">\n @for (badge of modalBadges; track $index) {\n @if (badge.field) {\n <span class=\"sample-badge-pill\">\n @if (badge.icon === 'hotel') { \uD83C\uDFE8 }\n @else if (badge.icon === 'calendar') { \uD83D\uDCC5 }\n @else if (badge.icon === 'location') { \uD83D\uDCCD }\n <span>{{ badge.label ? badge.label + ': ' : '' }}{{ badge.field }}</span>\n </span>\n }\n }\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Tab 4: Advanced / Files -->\n @if (activeSubTextTab === 'other') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Group Field (groupField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.groupField\" placeholder=\"groupField\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Child Group Field (childGroupField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.childGroupField\" placeholder=\"childGroupField\" />\n </div>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Allowed File Types (allowedTypes)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextAllowedTypesStr\" placeholder=\".jpg,.png,.pdf\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Max File Size in MB (maxFileSize)</label>\n <input type=\"number\" [(ngModel)]=\"modalSubText.maxFileSize\" placeholder=\"10\" />\n </div>\n </div>\n <!-- MR 05DEC26 Add missing file and advanced boolean subText fields -->\n <div class=\"subtext-form-row\">\n <label>Max Files (maxFiles)</label>\n <input type=\"number\" [(ngModel)]=\"modalSubText.maxFiles\" placeholder=\"Max files\" />\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.dragAndDrop\" />\n <span>Drag And Drop (dragAndDrop)</span>\n </label>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.onlyFileId\" />\n <span>Only File ID (onlyFileId)</span>\n </label>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isCurrencyField\" />\n <span>Is Currency Field (isCurrencyField)</span>\n </label>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.singleFieldDisable\" />\n <span>Single Field Disable (singleFieldDisable)</span>\n </label>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeSubTextModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveSubTextModal()\">Save Configuration</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n@if (isStyleModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeStyleModal()\">\n <div class=\"subtext-modal-container style-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Element Style Configuration</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} &bull; {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeStyleModal()\">&times;</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'classes'\" (click)=\"activeStyleTab = 'classes'\">\n Classes & Essentials\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'inline'\" (click)=\"activeStyleTab = 'inline'\">\n Inline Styles\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'custom'\" (click)=\"activeStyleTab = 'custom'\">\n Custom Keys & Live Preview\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: Classes & Essentials -->\n @if (activeStyleTab === 'classes') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputClass\"\n placeholder=\"e.g. form-control invoice-data custom-input\"\n />\n <span class=\"field-hint\">Classes applied directly to input/control element</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelClass\"\n placeholder=\"e.g. form-label fw-bold text-primary\"\n />\n <span class=\"field-hint\">Classes applied to the question/field label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Text / Layout Direction</label>\n <select [(ngModel)]=\"modalStyle.direction\">\n <option value=\"ltr\">LTR (Left to Right)</option>\n <option value=\"rtl\">RTL (Right to Left)</option>\n </select>\n <span class=\"field-hint\">Direction attribute for text flow and control layout</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Visibility</label>\n <div style=\"display: flex; align-items: center; gap: 8px; margin-top: 8px;\">\n <input\n type=\"checkbox\"\n id=\"modalStyleShowLabel\"\n style=\"width: 18px; height: 18px; cursor: pointer;\"\n [(ngModel)]=\"modalStyle.showLabel\"\n />\n <label for=\"modalStyleShowLabel\" style=\"cursor: pointer; font-size: 13px; font-weight: 500; margin: 0;\">\n Show Label ({{ modalStyle.showLabel ? 'Enabled' : 'Hidden' }})\n </label>\n </div>\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 2: Inline Styles -->\n @if (activeStyleTab === 'inline') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputStyle\"\n placeholder=\"e.g. background-color: #f8fafc; border-color: #3b82f6;\"\n />\n <span class=\"field-hint\">Inline styles applied to input control</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelStyle\"\n placeholder=\"e.g. font-size: 14px; color: #1e293b; font-weight: 600;\"\n />\n <span class=\"field-hint\">Inline styles applied to label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Label Value Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelValueStyle\"\n placeholder=\"e.g. color: #64748b; font-style: italic;\"\n />\n <span class=\"field-hint\">Inline styles applied to label value text</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Question Wrapper Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.questionStyle\"\n placeholder=\"e.g. margin-bottom: 16px; padding: 8px;\"\n />\n <span class=\"field-hint\">Inline styles applied to outer question wrapper</span>\n </div>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Book / Container Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.bookStyle\"\n placeholder=\"e.g. border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);\"\n />\n <span class=\"field-hint\">Inline styles applied to booklet / section wrapper</span>\n </div>\n </div>\n }\n\n <!-- Tab 3: Custom Keys & Live Preview -->\n @if (activeStyleTab === 'custom') {\n <div class=\"subtext-tab-content\">\n <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;\">\n <div>\n <h4 style=\"margin: 0; font-size: 14px; color: #0f172a;\">Dynamic / Custom Style Keys</h4>\n <p style=\"margin: 2px 0 0 0; font-size: 12px; color: #64748b;\">Add specialized style properties for custom rendering</p>\n </div>\n <button type=\"button\" class=\"btn-add-badge\" (click)=\"addCustomStyleKey()\">\n + Add Style Key\n </button>\n </div>\n\n @if (customStyleKeys.length === 0) {\n <div style=\"padding: 16px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 6px; text-align: center; font-size: 12px; color: #64748b; margin-bottom: 16px;\">\n No custom style keys added. All standard style properties are configured under Classes and Inline tabs.\n </div>\n } @else {\n <div style=\"display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px;\">\n @for (item of customStyleKeys; track $index) {\n <div class=\"subtext-badge-row\">\n <input type=\"text\" [(ngModel)]=\"item.key\" placeholder=\"Key (e.g. helperStyle)\" style=\"flex: 1;\" />\n <input type=\"text\" [(ngModel)]=\"item.value\" placeholder=\"Value (e.g. font-size: 11px;)\" style=\"flex: 1;\" />\n <button type=\"button\" class=\"btn-remove-badge\" (click)=\"removeCustomStyleKey($index)\">&times;</button>\n </div>\n }\n </div>\n }\n\n <!-- Live Interactive Preview -->\n <div style=\"margin-top: 16px; border-top: 1px solid #e2e8f0; padding-top: 16px;\">\n <div style=\"display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;\">\n <span style=\"font-size: 13px; font-weight: 600; color: #1e293b;\">Live Element Style Preview</span>\n <span style=\"font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 12px; background: #e0f2fe; color: #0369a1;\">Interactive</span>\n </div>\n <div [attr.dir]=\"modalStyle.direction\" style=\"background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 16px;\">\n @if (modalStyle.showLabel) {\n <div [class]=\"modalStyle.labelClass\" [style]=\"modalStyle.labelStyle\" style=\"font-weight: 600; margin-bottom: 6px; font-size: 13px;\">\n {{ selectedElement()?.questionText || selectedElement()?.label || 'Sample Question Label' }}\n </div>\n }\n <div [class]=\"modalStyle.inputClass\" [style]=\"modalStyle.inputStyle\" style=\"background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 8px 12px; font-size: 13px; color: #475569;\">\n Sample Input Value / Preview\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" style=\"margin-right: auto; color: #dc2626; border-color: #fca5a5;\" (click)=\"resetStyleToDefault()\">\n Reset to Defaults\n </button>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeStyleModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveStyleModal()\">Save Styles</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n@if (isOptionsModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeOptionsModal()\">\n <div class=\"subtext-modal-container options-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Options Configuration</h2>\n <span class=\"subtext-modal-element-tag\">\n {{ selectedElement()?.type }} &bull; {{ selectedElement()?.questionText || selectedElement()?.label || 'Choice Field' }}\n ({{ modalOptions.length }} {{ modalOptions.length === 1 ? 'choice' : 'choices' }})\n </span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeOptionsModal()\">&times;</button>\n </div>\n\n <!-- Modal Toolbar -->\n <div class=\"options-modal-toolbar\">\n <div class=\"options-search-box\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#64748b\" stroke-width=\"2\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n <input\n type=\"text\"\n [(ngModel)]=\"optionsFilterQuery\"\n placeholder=\"Filter options by value or label...\"\n class=\"options-filter-input\"\n />\n </div>\n <button type=\"button\" class=\"options-add-btn\" (click)=\"addModalOption()\">\n <span style=\"font-size: 15px; font-weight: bold; line-height: 1;\">+</span>\n <span>Add Option</span>\n </button>\n </div>\n\n <!-- Modal Body -->\n <div class=\"options-modal-body\">\n @if (modalOptions.length === 0) {\n <div class=\"options-empty-state\">\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#94a3b8\" stroke-width=\"1.5\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"8\" y1=\"12\" x2=\"16\" y2=\"12\"></line>\n </svg>\n <p class=\"empty-title\">No Options Configured</p>\n <p class=\"empty-desc\">Click \"Add Option\" above to create your first choice for this field.</p>\n <button type=\"button\" class=\"options-add-btn\" style=\"margin-top: 8px;\" (click)=\"addModalOption()\">\n + Add First Option\n </button>\n </div>\n } @else {\n <div class=\"options-table-wrapper\" (dragover)=\"onModalOptionDragOver($event)\" (drop)=\"onModalOptionDrop($event)\">\n <div class=\"options-table-header\">\n <span class=\"col-num\">#</span>\n <span class=\"col-reorder\">Reorder</span>\n <span class=\"col-value\">Stored Value (value)</span>\n <span class=\"col-label\">Display Label (label)</span>\n <span class=\"col-actions\">Action</span>\n </div>\n\n <div class=\"options-table-body\">\n @for (opt of getFilteredModalOptions(); track opt.id; let idx = $index) {\n <div\n class=\"modal-option-table-row\"\n [attr.data-id]=\"opt.id\"\n draggable=\"true\"\n (dragstart)=\"onModalOptionDragStart($event, opt.id)\"\n >\n <span class=\"col-num index-pill\">{{ idx + 1 }}</span>\n \n <div class=\"col-reorder reorder-buttons\">\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === 0\"\n (click)=\"moveModalOption(idx, 'up')\"\n title=\"Move Up\"\n >\n &#9650;\n </button>\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === modalOptions.length - 1\"\n (click)=\"moveModalOption(idx, 'down')\"\n title=\"Move Down\"\n >\n &#9660;\n </button>\n <span class=\"modal-drag-grip\" title=\"Drag to reorder\">&#9776;</span>\n </div>\n\n <div class=\"col-value\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.value\"\n placeholder=\"e.g. choice_1 or 01\"\n />\n </div>\n\n <div class=\"col-label\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.label\"\n placeholder=\"e.g. First Choice\"\n />\n </div>\n\n <div class=\"col-actions\">\n <button\n type=\"button\"\n class=\"btn-delete-option\"\n (click)=\"removeModalOption(idx)\"\n title=\"Delete Option\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <polyline points=\"3 6 5 6 21 6\"></polyline>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path>\n </svg>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Choices Preview -->\n <div class=\"options-live-preview-box\">\n <div class=\"preview-header\">\n <span class=\"preview-title\">Live Dropdown / Choice Preview</span>\n <span class=\"preview-tag\">{{ modalOptions.length }} Items</span>\n </div>\n <div class=\"preview-select-mock\">\n <select class=\"mock-dropdown-select\" disabled>\n <option value=\"\" selected disabled>--- Select an option ---</option>\n @for (opt of modalOptions; track opt.id) {\n <option [value]=\"opt.value\">{{ opt.label || opt.value }}</option>\n }\n </select>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <span style=\"font-size: 12px; color: #64748b; margin-right: auto; align-self: center;\">\n Total: <strong>{{ modalOptions.length }}</strong> {{ modalOptions.length === 1 ? 'choice' : 'choices' }}\n </span>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeOptionsModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveOptionsModal()\">Save Options</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 17NOV26 Action Button Configuration Pop-Up Modal with RuleMeta Support -->\n@if (isButtonModalOpen) {\n <div class=\"button-modal-backdrop\" (click)=\"closeButtonModal()\">\n <div class=\"button-modal-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"button-modal-header\">\n <div class=\"button-modal-title-group\">\n <h2 class=\"button-modal-title\">\n {{ (editingButtonIndex === -1 ? 'ADD_ACTION_BUTTON' : 'EDIT_ACTION_BUTTON') | nxtCustomTranslate : (editingButtonIndex === -1 ? 'Add Action Button' : 'Edit Action Button') }}\n </h2>\n <span class=\"button-modal-element-tag\">\n {{ editingButton.name || ('UNNAMED' | nxtCustomTranslate : 'Unnamed') }} &bull; ID: {{ editingButton.id }}\n </span>\n </div>\n <button type=\"button\" class=\"button-modal-close-btn\" (click)=\"closeButtonModal()\">&times;</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"button-modal-tabs\">\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'general'\" (click)=\"activeButtonTab = 'general'\">\n {{ 'GENERAL' | nxtCustomTranslate : 'General' }}\n </button>\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'api'\" (click)=\"activeButtonTab = 'api'\">\n {{ 'ACTION_API' | nxtCustomTranslate : 'Action & API' }}\n </button>\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'appearance'\" (click)=\"activeButtonTab = 'appearance'\">\n {{ 'APPEARANCE' | nxtCustomTranslate : 'Appearance' }}\n </button>\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'rules'\" (click)=\"activeButtonTab = 'rules'\">\n {{ 'RULES_AND_CONFIRM' | nxtCustomTranslate : 'Rules & Confirm' }}\n @if (editingButton.rules?.length) {\n <span class=\"tab-badge\">{{ editingButton.rules?.length }}</span>\n }\n </button>\n </div>\n\n <!-- Modal Body -->\n <div class=\"button-modal-body\">\n <!-- Tab 1: General -->\n @if (activeButtonTab === 'general') {\n <div class=\"button-modal-tab-content\">\n <div class=\"button-form-row\">\n <label>{{ 'BUTTON_ID' | nxtCustomTranslate : 'Button ID' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.id\" placeholder=\"Enter button id\" />\n </div>\n\n <div class=\"button-form-row\">\n <label>{{ 'BUTTON_NAME' | nxtCustomTranslate : 'Button Name' }}</label>\n @if (formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if ((editingButton.id + '.name' | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n @if (!copied) {\n <svg (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" stroke=\"currentColor\">\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" stroke-width=\"2\"></rect>\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" stroke-width=\"2\"></path>\n </svg>\n }\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n <input type=\"text\" [(ngModel)]=\"editingButton.name\" placeholder=\"Enter button name\" />\n </div>\n\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'EVENT_NAME' | nxtCustomTranslate : 'Event to Emit' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.eventtoemit\" placeholder=\"e.g. submit, close, print\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'ALT' | nxtCustomTranslate : 'Alt Text' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.alt\" placeholder=\"Button alt text\" />\n </div>\n </div>\n\n <div class=\"button-form-row\">\n <label>{{ 'ACTION_DATA' | nxtCustomTranslate : 'Action Data' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.actionData\" placeholder=\"Event to actionData\" />\n </div>\n </div>\n }\n\n <!-- Tab 2: Action / API -->\n @if (activeButtonTab === 'api') {\n <div class=\"button-modal-tab-content\">\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\" style=\"grid-column: 1 / -1;\">\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.endpoint\" placeholder=\"API endpoint URL\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'METHOD' | nxtCustomTranslate : 'Method' }}</label>\n <select [(ngModel)]=\"editingButton.method\">\n <option value=\"GET\">GET</option>\n <option value=\"POST\">POST</option>\n <option value=\"PUT\">PUT</option>\n <option value=\"DELETE\">DELETE</option>\n </select>\n </div>\n <div class=\"button-form-row\" style=\"align-self: center; margin-top: 22px;\">\n <label class=\"button-checkbox-label\">\n <input type=\"checkbox\" [(ngModel)]=\"editingButton.updateParentData\" />\n <span>{{ 'UPDATE_PARENTDATA' | nxtCustomTranslate : 'Update Parent Data' }}</span>\n </label>\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 3: Appearance -->\n @if (activeButtonTab === 'appearance') {\n <div class=\"button-modal-tab-content\">\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'BUTTON_WIDTH_PX' | nxtCustomTranslate : 'Button Width (px)' }}</label>\n <input type=\"number\" [(ngModel)]=\"editingButton.width\" min=\"50\" placeholder=\"Width in px\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'POSITION_PERCENT' | nxtCustomTranslate : 'Position (%)' }}: {{ editingButton.positionPercent || 0 }}%</label>\n <input type=\"range\" min=\"0\" max=\"100\" [(ngModel)]=\"editingButton.positionPercent\" />\n </div>\n </div>\n\n <div class=\"button-form-grid-3\">\n <div class=\"button-form-row\">\n <label>{{ 'BACKGROUND_COLOR' | nxtCustomTranslate : 'Background Color' }}</label>\n <input type=\"color\" [(ngModel)]=\"editingButton.bgColor\" class=\"button-color-input\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'TEXT_COLOR' | nxtCustomTranslate : 'Text Color' }}</label>\n <input type=\"color\" [(ngModel)]=\"editingButton.textColor\" class=\"button-color-input\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'BORDER_COLOR' | nxtCustomTranslate : 'Border Color' }}</label>\n <input type=\"color\" [(ngModel)]=\"editingButton.borderColor\" class=\"button-color-input\" />\n </div>\n </div>\n\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'BORDER_SIZE' | nxtCustomTranslate : 'Border Size' }}: {{ editingButton.borderSize || 0 }}px</label>\n <input type=\"range\" min=\"0\" max=\"20\" [(ngModel)]=\"editingButton.borderSize\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'BORDER_RADIUS' | nxtCustomTranslate : 'Border Radius' }}: {{ editingButton.borderRadius || 0 }}px</label>\n <input type=\"range\" min=\"0\" max=\"50\" [(ngModel)]=\"editingButton.borderRadius\" />\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 4: Rules & Confirm -->\n @if (activeButtonTab === 'rules') {\n <div class=\"button-modal-tab-content\">\n <!-- Confirmation Setting -->\n <div class=\"button-rules-section\">\n <label class=\"button-checkbox-label\" style=\"font-weight: 600;\">\n <input type=\"checkbox\" [(ngModel)]=\"editingButton.enableConfirm\" />\n <span>{{ 'ENABLE_CONFIRM' | nxtCustomTranslate : 'Enable Confirmation Prompt before execution' }}</span>\n </label>\n </div>\n\n <!-- Quick Visibility Expression with Google CEL validation -->\n <div class=\"button-form-row\">\n <div class=\"button-row-header-between\">\n <label>{{ 'VISIBILITY_RULE' | nxtCustomTranslate : 'Visibility Rule Expression' }}</label>\n <span class=\"cel-badge\">CEL</span>\n </div>\n <input\n type=\"text\"\n [(ngModel)]=\"editingButton.visibilityRule\"\n (ngModelChange)=\"onVisibilityRuleChange($event)\"\n [class.is-invalid]=\"!visibilityRuleValidation.isValid\"\n placeholder=\"e.g. status == 'Approved'\" />\n @if (editingButton.visibilityRule?.trim()) {\n @if (visibilityRuleValidation.isValid) {\n <div class=\"cel-feedback valid\">\n <span class=\"cel-icon\">\u2713</span>\n <span>{{ 'CEL_VALID' | nxtCustomTranslate : 'Valid CEL expression' }}</span>\n </div>\n } @else {\n <div class=\"cel-feedback invalid\">\n <span class=\"cel-icon\">\u26A0</span>\n <span>{{ visibilityRuleValidation.error }}</span>\n </div>\n }\n }\n </div>\n\n <!-- RuleMeta List Section -->\n <div class=\"button-rules-header\">\n <div class=\"button-rules-title\">\n <span>{{ 'BUTTON_RULES' | nxtCustomTranslate : 'Rules (RuleMeta)' }}</span>\n <span class=\"button-rules-count\">{{ editingButton.rules?.length || 0 }}</span>\n </div>\n <button type=\"button\" class=\"btn-add-rule\" (click)=\"addRuleToEditingButton()\">\n + {{ 'ADD_RULE' | nxtCustomTranslate : 'Add Rule' }}\n </button>\n </div>\n\n <div class=\"button-rules-list\">\n @for (rule of editingButton.rules || []; track rule.id || $index; let rIdx = $index) {\n <div class=\"button-rule-card\">\n <div class=\"button-rule-card-header\">\n <span class=\"button-rule-num\">#{{ rIdx + 1 }}</span>\n <div class=\"button-rule-type-select\">\n <label>{{ 'RULE_TYPE' | nxtCustomTranslate : 'Type' }}:</label>\n <select [(ngModel)]=\"rule.type\">\n @for (rt of ruleTypes; track rt) {\n <option [value]=\"rt\">{{ rt }}</option>\n }\n </select>\n </div>\n <button type=\"button\" class=\"btn-rule-remove\" (click)=\"removeRuleFromEditingButton(rIdx)\" title=\"Remove Rule\">\n &times;\n </button>\n </div>\n\n <!-- MR 17NOV26 Rule ID and Execution Order inputs -->\n <div class=\"button-form-grid-2\" style=\"margin-top: 8px;\">\n <div class=\"button-form-row\">\n <label>{{ 'RULE_ID' | nxtCustomTranslate : 'Rule ID' }}</label>\n <input type=\"text\" [(ngModel)]=\"rule.id\" placeholder=\"Rule ID\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'ORDER' | nxtCustomTranslate : 'Order' }}</label>\n <input type=\"number\" [(ngModel)]=\"rule.order\" min=\"1\" placeholder=\"Order (e.g. 1)\" />\n </div>\n </div>\n\n <!-- MR 17NOV26 Rule Expression Textarea with Google CEL syntax validation -->\n <div class=\"button-form-row\" style=\"margin-top: 8px;\">\n <div class=\"button-row-header-between\">\n <label>{{ 'EXPRESSION' | nxtCustomTranslate : 'Rule Expression (Google CEL)' }}</label>\n <span class=\"cel-badge\">CEL</span>\n </div>\n <textarea\n rows=\"3\"\n [(ngModel)]=\"rule.expression\"\n (ngModelChange)=\"onRuleExpressionChange(rule)\"\n class=\"button-form-textarea\"\n [class.is-invalid]=\"rule.id && ruleValidationMap[rule.id]?.isValid === false\"\n placeholder=\"Enter Google CEL expression, e.g. isValid == true && totalAmount > 0\"></textarea>\n @if (rule.expression?.trim()) {\n @if (rule.id && ruleValidationMap[rule.id]?.isValid) {\n <div class=\"cel-feedback valid\">\n <span class=\"cel-icon\">\u2713</span>\n <span>{{ 'CEL_VALID' | nxtCustomTranslate : 'Valid CEL expression' }}</span>\n </div>\n } @else if (rule.id && ruleValidationMap[rule.id]?.isValid === false) {\n <div class=\"cel-feedback invalid\">\n <span class=\"cel-icon\">\u26A0</span>\n <span>{{ ruleValidationMap[rule.id]?.error }}</span>\n </div>\n }\n }\n </div>\n\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'MESSAGE' | nxtCustomTranslate : 'Message / Notification' }}</label>\n <input type=\"text\" [(ngModel)]=\"rule.message\" placeholder=\"Optional notification or validation message\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'TARGET_FIELD' | nxtCustomTranslate : 'Target Field' }}</label>\n <input type=\"text\" [(ngModel)]=\"rule.targetField\" placeholder=\"Optional target field\" />\n </div>\n </div>\n </div>\n }\n @if (!editingButton.rules?.length) {\n <div class=\"button-rules-empty\">\n <span>{{ 'NO_RULES_CONFIGURED' | nxtCustomTranslate : 'No rules configured for this button.' }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"button-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeButtonModal()\">\n {{ 'CANCEL' | nxtCustomTranslate : 'Cancel' }}\n </button>\n <button\n type=\"button\"\n class=\"btn-save\"\n [disabled]=\"hasCelValidationErrors()\"\n (click)=\"saveButtonModal()\">\n {{ 'SAVE_BUTTON' | nxtCustomTranslate : 'Save Button' }}\n </button>\n </div>\n </div>\n </div>\n}\n</div>", styles: ["*{margin:0;padding:0;box-sizing:border-box;font-family:Roboto,sans-serif}.properties{height:calc(100vh - 20px);overflow-y:auto}.container{width:100%;max-width:500px;margin:0 auto;background:#fff;box-shadow:0 2px 10px #0000001a;overflow:hidden;font-family:Arial,sans-serif}.design-header{display:flex;justify-content:center;align-items:center;padding:15px 20px;background:#fff;border-radius:8px;box-shadow:0 2px 10px #0000001a;margin-bottom:20px}.header-title{font-size:20px;font-weight:400;color:#222}.toggle-header,.style-toggle-header{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:10px;background:#f8f8f8;border:1px solid #ddd;border-radius:6px;margin-bottom:6px}.tabs{display:flex;background:#f0f2f5;border-bottom:2px solid #0052cc}.tab{flex:1;padding:15px 10px;text-align:center;cursor:pointer}.tab.active{background:#0052cc;color:#fff;font-weight:700}.tab-content{padding:5px;max-height:80vh;overflow-y:auto;overflow-x:hidden}.form-group{margin-bottom:15px}label{display:block;font-size:14px;font-weight:500;color:#444;margin-bottom:8px}.required:before{content:\"*\";color:red;margin-right:3px}input[type=text],input[type=number],select,textarea{width:100%;padding:10px;font-size:14px;border:1px solid #ccc;border-radius:6px;outline:none;transition:all .3s;background:#f8f8f8}input:focus,select:focus,textarea:focus{border-color:#007bff;background:#fff;box-shadow:0 0 5px #007bff4d}textarea{min-height:55px;resize:vertical}button,.btn{padding:10px 15px;border:none;border-radius:6px;background:#007bff;color:#fff;font-size:15px;cursor:pointer;transition:all .3s}button:hover,.btn:hover{background:#0056b3;transform:translateY(-2px)}.add-button{padding:8px 14px;background:#0954c5;border-radius:8px}.remove-button{background:#e74c3c;padding:6px 12px;margin-top:10px}.remove-button:hover{background:#c0392b}.cancel-btn{background:#fff;color:#666;border:1px solid #ddd}.save-btn{background:#0052cc;margin-right:10px}.toggle-group{display:grid;grid-template-columns:1fr 1fr;gap:10px}.toggle-item{display:flex;align-items:center;gap:10px;padding:8px}.switch{position:relative;width:42px;height:22px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background:#ccc;transition:.4s;border-radius:24px}.slider:before{position:absolute;content:\"\";height:20px;width:20px;left:1px;bottom:1px;background:#fff;transition:.4s;border-radius:50%}input:checked+.slider{background:#2196f3}input:checked+.slider:before{transform:translate(18px)}.radio-item{display:flex;align-items:center;gap:20px}.radio-item input{accent-color:#007bff}.checkbox-row{display:flex;margin-bottom:10px}.checkbox-group{display:flex;align-items:center;margin-right:20px;min-width:120px}.checkbox-group input[type=checkbox]{margin-right:5px}.color-picker-row,.color-picker-container{display:flex;align-items:center}.color-picker-container{border:1px solid #ddd;border-radius:4px;margin-right:10px}.color-box,.color-selector input[type=color]{width:78px!important;height:40px;border:none;border-radius:4px;cursor:pointer}.hex-input-container{display:flex;gap:20px;align-items:center;font-size:12px;color:#b0b0b0}.hex-input-container span{font-size:14px;margin-top:10px}.hex-input,.hex-input-container input[type=text]{width:120px;padding:10px 12px;border:1px solid #d1d1d1;color:#28343e}.hex-label{color:#999;margin-right:5px}.select-container,.input-box-field{position:relative;width:100%}.dropdown-arrow,.input-box-field:after{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none;color:#666;font-size:12px}.input-box-field:after{content:\"\\25bc\";color:#1c1b1f;font-size:10px}.input-box-field select{background:#28343e;color:#fff;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none}.input-box-field select::-ms-expand{display:none}.all-properties details{background:#fff;border:1px solid #ddd;border-radius:8px;margin-bottom:12px;padding:12px;box-shadow:0 2px 8px #0000000d}.all-properties summary{font-size:15px;font-weight:400;cursor:pointer;padding:6px;transition:color .3s}.all-properties summary:hover{color:#007bff}.inner-content{padding:12px 0}.head-elements{font-size:14px;font-weight:500;color:#444}.options-container{display:flex;flex-direction:column;gap:12px}.field-size-controls,.flex-container{display:flex;align-items:center;gap:12px}.flex-container{margin-bottom:1rem}.size-input{width:110px;text-align:center}.input-container{display:flex;flex-direction:column;align-items:flex-start;gap:10px;width:100%}.subtext-textarea{width:100%;margin-left:auto}.arrow-icon{width:19px;height:23px;transition:transform .3s ease}.icon{display:inline-block;width:18px;height:18px;border-radius:50%;text-align:center;line-height:18px;color:#fff;font-size:12px;margin-left:5px}.edit-icon{background:#4caf50}.view-icon{background:#2196f3}.delete-icon{background:#f44336}.logo-icon{width:20px;height:20px;width:35px;display:flex;justify-content:center;background:#d0d9ff;border-radius:4px}.link-icon{background:#e7f2ff;padding:5px;border-radius:5px;margin:5px;display:inline-block;cursor:pointer;position:relative;transition:all .3s}.link-icon:hover{background:#d0e5ff}.link-icon:active{background:#a8d0ff}.link-dropdown-menu{position:absolute;top:100%;right:0;background:#fff;border:1px solid #ccc;padding:10px;width:200px;box-shadow:0 4px 6px #0000001a}.link-dropdown-menu input{width:100%;margin-bottom:5px;padding:5px;border:1px solid #ccc;border-radius:3px}.option-items{display:flex;align-items:center;padding:5px;gap:5px;border:1px solid #ccc;margin-bottom:10px;cursor:grab;background:#fff}.option-items:active{opacity:.5}.drag-handle{cursor:grab}.button-toggle-wrapper{margin-top:8px}.toggle-button{padding:8px 16px;border:1px solid #cbd2d9;border-radius:6px;font-size:14px;cursor:pointer;transition:all .2s ease-in-out}.toggle-button.active:hover{background:#2c6dd5}.button-config-card{background:#fff;padding:15px;border-radius:12px;border:1px solid #ccc;margin-top:20px;box-shadow:0 2px 8px #0000000d}.design-footer{display:flex;justify-content:space-between;margin-top:20px}.button-container{display:flex;padding:15px;background:#f9f9f9;border-top:1px solid #eee}.button-container .cancel-btn,.button-container .save-btn{flex:1;padding:12px;font-weight:700}.divider{border-top:1px dashed #ddd;margin:20px 0}input{width:auto}@media screen and (max-width:768px){.container{height:calc(100vh - 20px);min-height:calc(100vh - 20px)}.tabs{flex-direction:column}.tab{padding:1rem;font-size:.9rem}.form-group,.tab-content[aria-label=attributes] .form-group,.tab-content[aria-label=property] .form-group,.tab-content[aria-label=appearance] .form-group{flex-direction:column;grid-template-columns:1fr}.toggle-group{flex-direction:column;align-items:flex-start}}@media screen and (max-width:480px){.container{padding:0 10px}.tabs{flex-direction:column}.tab{padding:1rem;border-bottom:1px solid #dee2e6}input[type=text],input[type=number],select,textarea{font-size:.9rem}}.translation-fallback label,.translation-input-group label{font-weight:500;font-size:13px;margin-bottom:4px;display:block;color:#666}.readonly-box{font-size:14px;padding:4px;border:1px solid #ddd;border-radius:5px;-webkit-user-select:text;user-select:text;cursor:text;color:#7a7a7a;margin-bottom:3px}.copied-msg{font-size:12px;color:green;opacity:0;animation:fadeInOut 1.5s ease}@keyframes fadeInOut{0%{opacity:0;transform:translateY(-2px)}20%{opacity:1;transform:translateY(0)}80%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-2px)}}.subtext-sidebar-trigger-wrapper{background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:10px 12px;margin:10px 0;box-shadow:0 1px 3px #0000000a}.subtext-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.subtext-trigger-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#1e293b}.subtext-status-badge{font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:#f1f5f9;color:#64748b}.subtext-status-badge.configured{background:#e0f2fe;color:#0369a1}.subtext-trigger-hint{font-size:11px;color:#64748b;margin:2px 0 8px;line-height:1.3}.subtext-modal-open-btn{width:100%;background:#2563eb;color:#fff;border:none;border-radius:5px;padding:7px 12px;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:background .15s ease}.subtext-modal-open-btn:hover{background:#1d4ed8}.subtext-modal-backdrop{position:fixed;inset:0;background:#0f172a99;backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:10000}.subtext-modal-container{background:#fff;border-radius:10px;box-shadow:0 20px 45px #00000040;width:90%;max-width:780px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;animation:modalFadeIn .2s ease-out}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.subtext-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.subtext-modal-title{font-size:16px;font-weight:700;color:#0f172a;margin:0}.subtext-modal-element-tag{font-size:11px;font-weight:500;color:#475569;background:#e2e8f0;padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px}.subtext-modal-close-btn{background:none;border:none;font-size:24px;line-height:1;color:#64748b;cursor:pointer;padding:0 4px}.subtext-modal-close-btn:hover{color:#0f172a}.subtext-modal-tabs{display:flex;background:#f1f5f9;padding:4px 16px 0;border-bottom:1px solid #e2e8f0;gap:4px}.subtext-tab-btn{border:none;background:transparent;padding:9px 14px;font-size:13px;font-weight:500;color:#64748b;border-bottom:2px solid transparent;cursor:pointer;transition:all .15s ease}.subtext-tab-btn:hover{color:#0f172a}.subtext-tab-btn.active{color:#2563eb;border-bottom:2px solid #2563eb;font-weight:600;background:#fff;border-radius:6px 6px 0 0}.subtext-modal-body{padding:18px 20px;overflow-y:auto;flex:1}.subtext-form-row{margin-bottom:12px;display:flex;flex-direction:column;gap:4px}.subtext-form-row label{font-size:12px;font-weight:600;color:#334155}.subtext-form-row input,.subtext-form-row select{padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;width:100%;box-sizing:border-box}.subtext-form-row input:focus,.subtext-form-row select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.subtext-form-row-checkbox{margin:10px 0;display:flex;align-items:center}.subtext-form-row-checkbox label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#334155;cursor:pointer}.subtext-form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-hint{font-size:11px;color:#64748b}.subtext-divider{border:none;border-top:1px solid #e2e8f0;margin:14px 0}.card-config-header-row{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-bottom:14px}.card-config-body{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.badges-config-section{border:1px solid #e2e8f0;border-radius:6px;padding:10px;background:#f8fafc;margin-top:8px}.badges-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.badges-header label{font-size:12px;font-weight:600;color:#334155}.add-badge-btn{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0;padding:3px 8px;font-size:11px;border-radius:4px;font-weight:600;cursor:pointer}.add-badge-btn:hover{background:#dcfce7}.badge-item-row{display:flex;gap:6px;align-items:center;margin-bottom:6px}.badge-field-input{flex:1.2;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-icon-select{flex:.9;padding:5px 6px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-label-input{flex:.9;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.remove-badge-btn{background:none;border:none;color:#ef4444;font-size:18px;line-height:1;cursor:pointer;padding:0 4px}.card-live-preview-box{border:1px solid #e2e8f0;border-radius:8px;padding:12px;background:#f8fafc;display:flex;flex-direction:column;gap:8px;align-self:flex-start}.preview-tag{font-size:10px;font-weight:700;letter-spacing:.5px;color:#64748b}.sample-card-container{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:10px;display:flex;gap:12px;box-shadow:0 2px 6px #0000000d}.sample-card-image{width:76px;height:52px;border-radius:6px;background:#f1f5f9;border:1px solid #e2e8f0;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}.sample-img-placeholder{font-size:10px;color:#94a3b8;text-align:center}.sample-img-placeholder.has-img{display:flex;flex-direction:column;align-items:center;gap:2px}.img-field-label{font-size:9px;color:#2563eb;font-weight:600;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sample-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.sample-card-title{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.2}.sample-card-subtitle{font-size:11px;color:#556987;line-height:1.2}.sample-card-badges{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}.sample-badge-pill{background:#f0f4f9;color:#27406b;font-size:9px;font-weight:600;padding:2px 5px;border-radius:3px;display:inline-flex;align-items:center;gap:2px}.subtext-modal-footer{display:flex;justify-content:flex-end;gap:10px;padding:12px 20px;border-top:1px solid #e2e8f0;background:#f8fafc}.btn-cancel{background:#fff;border:1px solid #cbd5e1;padding:7px 16px;border-radius:6px;font-size:13px;font-weight:500;color:#475569;cursor:pointer}.btn-cancel:hover{background:#f1f5f9}.btn-save{background:#2563eb;border:1px solid #2563eb;padding:7px 18px;border-radius:6px;font-size:13px;font-weight:600;color:#fff;cursor:pointer}.btn-save:hover{background:#1d4ed8}.style-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0f7ff;border:1px solid #bfdbfe;border-radius:8px}.style-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.style-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#1e3a8a}.style-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.style-status-badge.configured{background:#dcfce7;color:#15803d}.style-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.style-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.style-modal-open-btn:hover{background:#1d4ed8}.style-modal-container{max-width:680px}.options-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px}.options-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.options-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#166534}.options-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.options-status-badge.configured{background:#dcfce7;color:#15803d}.options-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.options-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#16a34a;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.options-modal-open-btn:hover{background:#15803d}.options-modal-container{max-width:760px}.options-modal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.options-search-box{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #cbd5e1;border-radius:6px;padding:6px 10px;flex:1;max-width:380px}.options-filter-input{border:none;outline:none;background:transparent;font-size:13px;color:#0f172a;width:100%}.options-add-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:background .15s ease}.options-add-btn:hover{background:#1d4ed8}.options-modal-body{padding:16px 20px;overflow-y:auto;max-height:520px}.options-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.empty-title{margin:12px 0 4px;font-size:15px;font-weight:600;color:#1e293b}.empty-desc{margin:0;font-size:13px;color:#64748b}.options-table-wrapper{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;background:#fff}.options-table-header{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:10px 14px;background:#f1f5f9;font-size:11px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #e2e8f0}.options-table-body{display:flex;flex-direction:column}.modal-option-table-row{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid #f1f5f9;transition:background .12s ease}.modal-option-table-row:last-child{border-bottom:none}.modal-option-table-row:hover{background:#f8fafc}.index-pill{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#475569;font-size:11px;font-weight:600}.reorder-buttons{display:flex;align-items:center;gap:4px}.btn-arrow{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:4px;font-size:9px;color:#475569;cursor:pointer;transition:all .12s ease}.btn-arrow:hover:not(:disabled){background:#2563eb;color:#fff;border-color:#2563eb}.btn-arrow:disabled{opacity:.35;cursor:not-allowed}.modal-drag-grip{font-size:14px;color:#94a3b8;cursor:grab;padding:0 4px;-webkit-user-select:none;user-select:none}.modal-drag-grip:active{cursor:grabbing}.options-input{width:100%;padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;box-sizing:border-box}.options-input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb1a}.btn-delete-option{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:transparent;border:none;border-radius:4px;color:#94a3b8;cursor:pointer;transition:all .12s ease}.btn-delete-option:hover{background:#fee2e2;color:#dc2626}.options-live-preview-box{margin-top:16px;padding:14px 16px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.preview-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.preview-title{font-size:12px;font-weight:600;color:#334155}.preview-tag{font-size:10px;font-weight:600;padding:2px 7px;border-radius:10px;background:#e2e8f0;color:#475569}.preview-select-mock{width:100%}.mock-dropdown-select{width:100%;padding:8px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:13px;color:#334155;box-sizing:border-box}.action-buttons-sidebar-container{margin-top:15px;border:1px solid var(--fb-border-default, #e2e8f0);padding:14px;border-radius:10px;background-color:var(--fb-surface-secondary, #f8fafc)}.action-buttons-sidebar-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.action-buttons-sidebar-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--fb-text-primary, #0f172a)}.action-buttons-sidebar-title svg{stroke:var(--fb-action-surface, #0275ff)}.add-action-button-btn{display:inline-flex;align-items:center;gap:4px;background-color:var(--fb-action-surface, #0275ff);color:var(--fb-text-on-action, #ffffff);border:1px solid var(--fb-action-border, #0275ff);padding:5px 10px;border-radius:6px;font-size:11px;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.add-action-button-btn:hover{background-color:var(--fb-action-surface-hover, #0056b3);border-color:var(--fb-action-surface-hover, #0056b3)}.action-buttons-card-list{display:flex;flex-direction:column;gap:8px}.action-button-summary-card{background-color:var(--fb-surface-elevated, #ffffff);border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:6px;transition:border-color .15s ease,box-shadow .15s ease}.action-button-summary-card:hover{border-color:var(--fb-action-surface, #0275ff);box-shadow:0 2px 8px #0000000d}.action-button-card-top{display:flex;align-items:center;justify-content:space-between}.action-button-card-info{display:flex;align-items:center;gap:8px}.action-button-card-name{font-size:13px;font-weight:600;color:var(--fb-text-primary, #0f172a)}.action-button-card-event{font-size:11px;color:var(--fb-text-secondary, #64748b);background-color:var(--fb-surface-tertiary, #f1f5f9);padding:2px 6px;border-radius:4px}.action-button-card-actions{display:flex;align-items:center;gap:4px}.action-card-btn{background:none;border:1px solid transparent;border-radius:4px;padding:4px 6px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background-color .15s ease,color .15s ease}.action-card-btn.edit{color:var(--fb-action-surface, #0275ff)}.action-card-btn.edit:hover{background-color:var(--fb-selected-bg, #eff6ff);border-color:var(--fb-selected-border, #bfdbfe)}.action-card-btn.remove{color:var(--fb-error-text, #ef4444)}.action-card-btn.remove:hover{background-color:var(--fb-error-surface, #fef2f2);border-color:var(--fb-error-border, #fecaca)}.action-button-card-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.action-card-badge{font-size:10px;font-weight:500;padding:2px 6px;border-radius:4px;background-color:var(--fb-surface-tertiary, #f1f5f9);color:var(--fb-text-secondary, #475569);border:1px solid var(--fb-border-subtle, #e2e8f0)}.action-card-badge.method{background-color:var(--fb-info-surface, #eff6ff);color:var(--fb-info-text, #1d4ed8);border-color:var(--fb-info-border, #bfdbfe);font-weight:600}.action-card-badge.confirm{background-color:var(--fb-warning-surface, #fffbeb);color:var(--fb-warning-text, #b45309);border-color:var(--fb-warning-border, #fef08a)}.action-card-badge.rules{background-color:var(--fb-success-surface, #f0fdf4);color:var(--fb-success-text, #15803d);border-color:var(--fb-success-border, #bbf7d0);font-weight:600}.action-buttons-empty{text-align:center;padding:16px;font-size:12px;color:var(--fb-text-muted, #94a3b8);border:1px dashed var(--fb-border-default, #cbd5e1);border-radius:6px;background:var(--fb-surface-elevated, #ffffff)}.button-modal-backdrop{position:fixed;inset:0;background:var(--fb-backdrop, rgba(15, 23, 42, .6));backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:10000}.button-modal-container{background:var(--fb-surface-elevated, #ffffff);border-radius:10px;box-shadow:0 20px 45px #00000040;width:90%;max-width:680px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;animation:modalFadeIn .2s ease-out}.button-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid var(--fb-border-default, #e2e8f0);background:var(--fb-surface-secondary, #f8fafc)}.button-modal-title{font-size:16px;font-weight:700;color:var(--fb-text-primary, #0f172a);margin:0}.button-modal-element-tag{font-size:11px;font-weight:500;color:var(--fb-text-secondary, #475569);background:var(--fb-surface-tertiary, #e2e8f0);padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px}.button-modal-close-btn{background:none;border:none;font-size:24px;line-height:1;color:var(--fb-text-muted, #64748b);cursor:pointer;padding:0 4px;transition:color .15s ease}.button-modal-close-btn:hover{color:var(--fb-text-primary, #0f172a)}.button-modal-tabs{display:flex;background:var(--fb-surface-tertiary, #f1f5f9);border-bottom:1px solid var(--fb-border-default, #e2e8f0);padding:0 16px;gap:4px;overflow-x:auto}.button-tab-btn{background:none;border:none;border-bottom:2px solid transparent;padding:10px 14px;font-size:12px;font-weight:600;color:var(--fb-text-secondary, #475569);cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:all .15s ease;white-space:nowrap}.button-tab-btn:hover{color:var(--fb-text-primary, #0f172a);background:var(--fb-nav-hover, rgba(0, 0, 0, .03))}.button-tab-btn.active{color:var(--fb-action-surface, #0275ff);border-bottom-color:var(--fb-action-surface, #0275ff);background:var(--fb-surface-elevated, #ffffff)}.tab-badge{font-size:10px;font-weight:700;background:var(--fb-action-surface, #0275ff);color:var(--fb-text-on-action, #ffffff);padding:1px 6px;border-radius:10px}.button-modal-body{padding:20px;overflow-y:auto;flex:1;background:var(--fb-surface-elevated, #ffffff)}.button-modal-tab-content{display:flex;flex-direction:column;gap:14px}.button-form-row{display:flex;flex-direction:column;gap:5px}.button-form-row label{font-size:12px;font-weight:600;color:var(--fb-text-primary, #1e293b)}.button-form-row input[type=text],.button-form-row input[type=number],.button-form-row select{padding:8px 10px;border:1px solid var(--fb-input-border, #cbd5e1);border-radius:6px;font-size:13px;color:var(--fb-text-primary, #0f172a);background:var(--fb-input-bg, #ffffff);box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.button-form-row input[type=text]:focus,.button-form-row input[type=number]:focus,.button-form-row select:focus{outline:none;border-color:var(--fb-input-focus, #0275ff);box-shadow:0 0 0 3px var(--fb-focus-ring, rgba(2, 117, 255, .15))}.button-form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.button-form-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}.button-checkbox-label{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;color:var(--fb-text-primary, #1e293b)}.button-checkbox-label input[type=checkbox]{width:16px;height:16px;cursor:pointer;accent-color:var(--fb-action-surface, #0275ff)}.button-color-input{width:100%;height:38px;padding:2px 4px;border:1px solid var(--fb-input-border, #cbd5e1);border-radius:6px;cursor:pointer;background:var(--fb-input-bg, #ffffff);box-sizing:border-box}.button-rules-section{padding:10px 14px;background:var(--fb-surface-secondary, #f8fafc);border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px}.button-rules-header{display:flex;align-items:center;justify-content:space-between;margin-top:10px;padding-bottom:8px;border-bottom:1px solid var(--fb-border-default, #e2e8f0)}.button-rules-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--fb-text-primary, #0f172a)}.button-rules-count{font-size:11px;background:var(--fb-surface-tertiary, #e2e8f0);color:var(--fb-text-secondary, #475569);padding:1px 7px;border-radius:10px}.btn-add-rule{background:var(--fb-action-surface, #0275ff);color:var(--fb-text-on-action, #ffffff);border:1px solid var(--fb-action-border, #0275ff);padding:5px 12px;border-radius:6px;font-size:11px;font-weight:600;cursor:pointer;transition:background-color .15s ease}.btn-add-rule:hover{background:var(--fb-action-surface-hover, #0056b3)}.button-rules-list{display:flex;flex-direction:column;gap:10px;margin-top:10px}.button-rule-card{background:var(--fb-surface-secondary, #f8fafc);border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px;padding:12px}.button-rule-card-header{display:flex;align-items:center;gap:10px}.button-rule-num{font-size:12px;font-weight:700;color:var(--fb-text-muted, #64748b)}.button-rule-type-select{display:flex;align-items:center;gap:6px;flex:1}.button-rule-type-select label{font-size:11px;font-weight:600;color:var(--fb-text-secondary, #475569)}.button-rule-type-select select{padding:4px 8px;font-size:12px;border-radius:4px;border:1px solid var(--fb-input-border, #cbd5e1);background:var(--fb-input-bg, #ffffff);color:var(--fb-text-primary, #0f172a)}.btn-rule-remove{background:none;border:none;font-size:18px;line-height:1;color:var(--fb-error-text, #ef4444);cursor:pointer;padding:2px 6px;border-radius:4px;transition:background-color .15s ease}.btn-rule-remove:hover{background:var(--fb-error-surface, #fef2f2)}.button-rules-empty{text-align:center;padding:16px;font-size:12px;color:var(--fb-text-muted, #94a3b8);border:1px dashed var(--fb-border-default, #cbd5e1);border-radius:6px;background:var(--fb-surface-secondary, #f8fafc)}.button-modal-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:12px 20px;background:var(--fb-surface-secondary, #f8fafc);border-top:1px solid var(--fb-border-default, #e2e8f0)}.button-modal-footer .btn-cancel{background:var(--fb-surface-elevated, #ffffff);border:1px solid var(--fb-border-default, #cbd5e1);color:var(--fb-text-primary, #334155);padding:8px 16px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.button-modal-footer .btn-cancel:hover{background:var(--fb-surface-tertiary, #f1f5f9);border-color:var(--fb-border-strong, #94a3b8)}.button-modal-footer .btn-save{background:var(--fb-action-surface, #0275ff);border:1px solid var(--fb-action-border, #0275ff);color:var(--fb-text-on-action, #ffffff);padding:8px 18px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.button-modal-footer .btn-save:hover{background:var(--fb-action-surface-hover, #0056b3);border-color:var(--fb-action-surface-hover, #0056b3)}.button-modal-footer .btn-save:disabled{opacity:.5;cursor:not-allowed;background:var(--fb-action-disabled, #94a3b8);border-color:var(--fb-action-disabled, #94a3b8)}.button-row-header-between{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.cel-badge{font-size:10px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:var(--fb-text-muted, #64748b);background:var(--fb-surface-tertiary, #f1f5f9);border:1px solid var(--fb-border-subtle, #e2e8f0);padding:1px 6px;border-radius:4px}.button-form-textarea{width:100%;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;line-height:1.45;padding:8px 10px;border:1px solid var(--fb-input-border, #cbd5e1);border-radius:6px;background:var(--fb-input-bg, #ffffff);color:var(--fb-text-primary, #1e293b);outline:none;resize:vertical;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.button-form-textarea:focus{border-color:var(--fb-input-focus, #0275ff);box-shadow:0 0 0 2px var(--fb-focus-ring, rgba(2, 117, 255, .2))}.button-form-textarea.is-invalid,.button-form-row input.is-invalid{border-color:var(--fb-error-border, #ef4444)!important;background-color:var(--fb-error-surface, #fef2f2)}.cel-feedback{display:flex;align-items:center;gap:6px;font-size:11px;line-height:1.3;margin-top:4px}.cel-feedback.valid{color:var(--fb-success-text, #16a34a)}.cel-feedback.invalid{color:var(--fb-error-text, #dc2626);font-weight:500}.cel-icon{font-size:12px;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i7.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NumberValueAccessor, selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i7.RangeValueAccessor, selector: "input[type=range]:not([ngNoCva])[formControlName],input[type=range]:not([ngNoCva])[formControl],input[type=range]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i7.CheckboxControlValueAccessor, selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i7.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: NxtCustomTranslatePipe, name: "nxtCustomTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i6.NgClass, i7.NgSelectOption, i7.ɵNgSelectMultipleOption, i7.DefaultValueAccessor, i7.NumberValueAccessor, i7.SelectControlValueAccessor, i7.NgControlStatus, i7.NgModel, /* @ts-ignore */
69230
69230
  Promise.resolve().then(function () { return searchBox_component; }).then(m => m.NxtSearchBox), /* @ts-ignore */
69231
69231
  Promise.resolve().then(function () { return formulaInput_component; }).then(m => m.FormulaInputComponent), GetValueByPathPipe, NxtCustomTranslatePipe], () => [i6.NgClass, /* @ts-ignore */
69232
69232
  Promise.resolve().then(function () { return imageCropper_component; }).then(m => m.ImageCropperComponent), NxtCustomTranslatePipe], () => [i7.DefaultValueAccessor, i7.NgControlStatus, i7.NgModel, /* @ts-ignore */
@@ -69237,7 +69237,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.1.7", ng
69237
69237
  Promise.resolve().then(function () { return formulaInput_component; }).then(m => m.FormulaInputComponent), /* @ts-ignore */
69238
69238
  Promise.resolve().then(function () { return imageCropper_component; }).then(m => m.ImageCropperComponent)], resolveMetadata: (NxtSearchBox, FormulaInputComponent, ImageCropperComponent) => ({ decorators: [{
69239
69239
  type: Component,
69240
- args: [{ selector: 'app-properties', standalone: true, imports: [CommonModule, FormsModule, ImageCropperComponent, NxtSearchBox, NgClass, GetValueByPathPipe, NxtCustomTranslatePipe, FormulaInputComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- AP 22JAN25 - Field and Element Properties -->\n\n<div class=\"container\">\n <div class=\"tabs\">\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'attributes'}\" (click)=\"setActiveTab('attributes')\">{{ 'ATTRIBUTES' | nxtCustomTranslate : 'Attributes' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'property'}\" (click)=\"setActiveTab('property')\">{{ 'PROPERTY' | nxtCustomTranslate : 'Property' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'appearance'}\" (click)=\"setActiveTab('appearance')\">{{ 'APPEARANCE' | nxtCustomTranslate : 'Appearance' }}</div>\n </div>\n @if (activeTab() === 'attributes') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @defer (when selectedElement()?.type === 'Image') {\n @if (selectedElement().imageData) {\n <image-cropper\n [imageBase64]=\"selectedElement().orgImageData\"\n [disabled]=\"false\"\n [alignImage]=\"alignImage\"\n [roundCropper]=\"roundCropper\"\n [backgroundColor]=\"'white'\"\n imageAltText=\"Alternative image text\"\n [allowMoveImage]=\"false\"\n [hideResizeSquares]=\"false\"\n [canvasRotation]=\"canvasRotation()\"\n [aspectRatio]=\"aspectRatio\"\n [containWithinAspectRatio]=\"false\"\n [maintainAspectRatio]=\"false\"\n [cropperStaticWidth]=\"cropperStaticWidth\"\n [cropperStaticHeight]=\"cropperStaticHeight\"\n [cropperMinWidth]=\"cropperMinWidth\"\n [cropperMinHeight]=\"cropperMinHeight\"\n [cropperMaxWidth]=\"cropperMaxWidth\"\n [cropperMaxHeight]=\"cropperMaxHeight\"\n [resetCropOnAspectRatioChange]=\"true\"\n [(cropper)]=\"cropper\"\n [(transform)]=\"transform\"\n [onlyScaleDown]=\"true\"\n output=\"blob\"\n format=\"png\"\n (imageCropped)=\"imageCropped($event)\"\n (cropperReady)=\"cropperReady($event)\"\n ></image-cropper>\n }\n @if (selectedElement().imageData) {\n <div style=\"display: flex; gap: 2px;\">\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateLeft()\" title=\"{{ 'ROTATE_LEFT' | nxtCustomTranslate : 'Rotate Left' }}\">\u27F2</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateRight()\" title=\"{{ 'ROTATE_RIGHT' | nxtCustomTranslate : 'Rotate Right' }}\">\u27F3</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomOut()\" title=\"{{ 'ZOOM_OUT' | nxtCustomTranslate : 'Zoom Out' }}\">-</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomIn()\" title=\"{{ 'ZOOM_IN' | nxtCustomTranslate : 'Zoom In' }}\">+</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveLeft()\" title=\"{{ 'MOVE_LEFT' | nxtCustomTranslate : 'Move Left' }}\">\u2190</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveRight()\" title=\"{{ 'MOVE_RIGHT' | nxtCustomTranslate : 'Move Right' }}\">\u2192</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveUp()\" title=\"{{ 'MOVE_UP' | nxtCustomTranslate : 'Move Up' }}\">\u2191</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveDown()\" title=\"{{ 'MOVE_DOWN' | nxtCustomTranslate : 'Move Down' }}\">\u2193</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipHorizontal()\" [ngClass]=\"{'enabled': transform().flipH}\" title=\"{{ 'FLIP_HORIZONTALLY' | nxtCustomTranslate : 'Flip Horizontally' }}\">\u2194</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipVertical()\" [ngClass]=\"{'enabled': transform().flipV}\" title=\"{{ 'FLIP_VERTICALLY' | nxtCustomTranslate : 'Flip Vertically' }}\">\u2195</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"resetImage()\" title=\"{{ 'RESET' | nxtCustomTranslate : 'Reset' }}\">\u00D7</div>\n </div>\n }\n }\n @if (selectedElement()?.type === 'Book') {\n <div>\n <label class=\"text-sm\">{{ 'SEARCH_BOOK' | nxtCustomTranslate : 'Search Book' }}</label>\n <div style=\"display: flex; gap: 2px; align-items: center; justify-content: center;\">\n <nxt-search-box\n [question]=\"selectedElement()\"\n [apiMeta]=\"bookSubtext()\"\n [placeHolderText]=\"'SEARCH' | nxtCustomTranslate : 'Search...'\"\n (searchValueChange)=\"childEventCapture($event.value)\"\n ></nxt-search-box>\n <div class=\"link-icon\">\n <svg (click)=\"linkToggleDropdown($event)\" fill=\"#000000\" version=\"1.1\" id=\"Capa_1\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24px\" height=\"24px\"\n viewBox=\"0 0 450 450\" xml:space=\"preserve\">\n <g>\n <g>\n <g>\n <path d=\"M318.15,230.195l77.934-77.937c31.894-31.892,31.894-83.782-0.004-115.674l-12.66-12.66\n c-31.893-31.896-83.78-31.896-115.674-0.004l-77.937,77.934c-17.588,17.588-25.457,41.264-23.646,64.311\n c-23.045-1.813-46.722,6.056-64.308,23.647L23.92,267.748c-31.894,31.889-31.894,83.779,0,115.674l12.664,12.662\n c31.893,31.893,83.783,31.893,115.674,0l77.935-77.936c17.592-17.59,25.459-41.266,23.647-64.309\n C276.884,255.654,300.56,247.783,318.15,230.195z M202.653,290.605l-77.936,77.938c-16.705,16.703-43.889,16.703-60.59,0\n l-12.666-12.666c-16.705-16.701-16.703-43.885,0-60.594l77.936-77.932c14.14-14.141,35.779-16.306,52.226-6.516l-32.302,32.307\n c-7.606,7.604-7.606,19.938,0,27.541c7.605,7.607,19.937,7.607,27.541,0l32.306-32.303\n C218.959,254.828,216.795,276.469,202.653,290.605z M238.382,209.169l32.299-32.306c7.608-7.602,7.608-19.935,0-27.538\n c-7.604-7.61-19.936-7.61-27.541-0.004l-32.303,32.303c-9.791-16.446-7.627-38.087,6.514-52.226l77.935-77.935\n c16.707-16.707,43.89-16.707,60.594,0l12.664,12.664c16.705,16.705,16.705,43.886,0,60.591l-77.936,77.937\n C276.468,216.797,254.828,218.959,238.382,209.169z\" />\n <path d=\"M343.466,261.465c-45.287,0-82,36.713-82,82s36.713,82,82,82c45.286,0,82-36.713,82-82S388.753,261.465,343.466,261.465z\n M372.505,333.564l-56.046,56.104c-0.239,0.238-0.536,0.41-0.862,0.496l-22.315,5.85c-0.649,0.168-1.347-0.02-1.822-0.494\n c-0.477-0.479-0.666-1.172-0.496-1.824l5.826-22.318c0.084-0.326,0.256-0.627,0.494-0.863l56.047-56.104\n c0.742-0.742,1.945-0.744,2.688-0.002l4.548,4.541c0.739,0.74,0.741,1.943,0,2.688l-37.433,37.471l4.709,4.703l37.435-37.471\n c0.739-0.742,1.94-0.742,2.682-0.002l4.55,4.541C373.25,331.617,373.25,332.822,372.505,333.564z M395.472,310.574l-17,17.018\n c-0.739,0.744-1.942,0.744-2.685,0.002l-16.489-16.475c-0.744-0.74-0.744-1.943-0.002-2.688l17-17.02\n c0.741-0.74,1.944-0.74,2.688-0.002l16.487,16.477C396.216,308.629,396.216,309.832,395.472,310.574z\" />\n </g>\n </g>\n </g>\n </svg>\n @if (isLinkDropdownOpen()) {\n <div class=\"link-dropdown-menu\" #dropdown>\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().endpoint\" (ngModelChange)=\"updateBookSubtext('endpoint', $event)\" />\n <label>{{ 'VARIABLE' | nxtCustomTranslate : 'Variable' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().variable\" (ngModelChange)=\"updateBookSubtext('variable', $event)\" />\n <label>{{ 'FIELD' | nxtCustomTranslate : 'Field' }}:</label>\n <input type=\"text\" [ngModel]=\"fieldAsString()\" (ngModelChange)=\"updateField($event)\" />\n <label>{{ 'DEFAULT_FIELD' | nxtCustomTranslate : 'Default Field' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().defaultField\" (ngModelChange)=\"updateBookSubtext('defaultField', $event)\" />\n </div>\n }\n </div>\n </div>\n </div>\n }\n @for (prop of getProperties()?.elementProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'checkbox' && prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.isTranslate && formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if (((selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? selectColumn() : selectedElement().id) + '.' + prop.key | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n <!-- Copy Icon -->\n @if (!copied) {\n <svg\n (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" transform=\"rotate(0)\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#CCCCCC\" stroke-width=\"0.048\"></g><g id=\"SVGRepo_iconCarrier\"> <g id=\"style=stroke\"> <g id=\"copy\"> <path id=\"rec (Stroke)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 5.25C6.25 2.50265 8.43733 0.25 11.1667 0.25H17.8333C20.5627 0.25 22.75 2.50265 22.75 5.25V13.75C22.75 16.4974 20.5627 18.75 17.8333 18.75C17.4191 18.75 17.0833 18.4142 17.0833 18C17.0833 17.5858 17.4191 17.25 17.8333 17.25C19.7064 17.25 21.25 15.6971 21.25 13.75V5.25C21.25 3.30293 19.7064 1.75 17.8333 1.75H11.1667C9.29363 1.75 7.75 3.30293 7.75 5.25C7.75 5.66421 7.41421 6 7 6C6.58579 6 6.25 5.66421 6.25 5.25Z\" fill=\"#000000\"></path> <path id=\"rec (Stroke)_2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 10.25C1.25 7.50265 3.43733 5.25 6.16667 5.25H12.8333C15.5627 5.25 17.75 7.50265 17.75 10.25V18.75C17.75 21.4974 15.5627 23.75 12.8333 23.75H6.16667C3.43733 23.75 1.25 21.4974 1.25 18.75V10.25ZM6.16667 6.75C4.29363 6.75 2.75 8.30293 2.75 10.25V18.75C2.75 20.6971 4.29363 22.25 6.16667 22.25H12.8333C14.7064 22.25 16.25 20.6971 16.25 18.75V10.25C16.25 8.30293 14.7064 6.75 12.8333 6.75H6.16667Z\" fill=\"#000000\"></path> </g> </g> </g></svg>\n }\n <!-- Copied Message -->\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n @if (prop.key === 'helpText' && selectedElement()?.helpText) {\n <div>{{ selectedElement()?.helpText }}</div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'number') {\n <input\n type=\"number\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n }\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n <span class=\"toggle-label\" style=\"padding-left: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n </div>\n }\n @if (prop.type === 'subQuestion') {\n <div>\n <div style=\"display: flex; flex-direction: row; gap: 10px; align-items: center;\">\n <div>{{ prop.labelPath | nxtCustomTranslate : prop.label }}</div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n @if (selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)) {\n <div>\n @for (subProp of prop.subQuestion; track subProp) {\n <div style=\"background-color: #e7f2ff; padding: 8px; border-radius: 4px;\">\n <div class=\"form-group\">\n <label>{{ subProp.labelPath | nxtCustomTranslate : subProp.label }}</label>\n @if (subProp.type === 'array') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"subProp.operands ? subProp.operands.includes(column.apiName) : false\"\n (change)=\"onCheckboxChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName, $event.target.checked)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'radio') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"radio\"\n [name]=\"subProp.key\"\n [value]=\"column.apiName\"\n [checked]=\"getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) === column.apiName\"\n (change)=\"onRadioChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"subProp.placeholder\"\n [ngModel]=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) : (selectedElement() | getValueByPath : subProp.key)) : (selectedElement() | getValueByPath : subProp.key)\"\n (ngModelChange)=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event,false, prop.isTranslate) : setValueByPath(subProp.key, $event)) : setValueByPath(subProp.key, $event, prop.isTranslate)\"\n />\n }\n @if (subProp.type === 'boolean') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n @if (subProp.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? (getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, subProp.isTableColumn)) : (selectedElement() | getValueByPath : subProp.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event, subProp.isTableColumn, prop.isTranslate) : setValueByPath(subProp.key, $event, prop.isTranslate))\"\n >\n @for (option of subProp.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (subProp.type === 'checkbox') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n @if (prop.type === 'align') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onAlignSelect(option.value)\" [ngClass]=\"{'active': selectedElement()?.textAlign === option.value}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'style') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onStyleSelect(option.value)\" [ngClass]=\"{'active': isStyleActive(option.value)}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'color') {\n <div>\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n @if (prop.key === 'title') {\n <!-- MR 17NOV26 Compact Action Buttons in Sidebar -->\n <div class=\"action-buttons-sidebar-container\">\n <div class=\"action-buttons-sidebar-header\">\n <div class=\"action-buttons-sidebar-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <rect x=\"3\" y=\"6\" width=\"18\" height=\"12\" rx=\"3\"></rect>\n <path d=\"M7 12h10\"></path>\n </svg>\n <span>{{ 'ACTION_BUTTONS' | nxtCustomTranslate : 'Action Buttons' }}</span>\n </div>\n <button type=\"button\" (click)=\"openAddButtonModal()\" class=\"add-action-button-btn\">\n + {{ 'ADD_BUTTON' | nxtCustomTranslate : 'Add Button' }}\n </button>\n </div>\n\n <div class=\"action-buttons-card-list\">\n @for (btn of book()?.questionbook?.action || []; track btn.id || $index; let i = $index) {\n <div class=\"action-button-summary-card\">\n <div class=\"action-button-card-top\">\n <div class=\"action-button-card-info\">\n <span class=\"action-button-card-name\">{{ btn.name || ('UNNAMED' | nxtCustomTranslate : 'Unnamed') }}</span>\n <span class=\"action-button-card-event\">{{ btn.eventtoemit || 'default' }}</span>\n </div>\n <div class=\"action-button-card-actions\">\n <button type=\"button\" class=\"action-card-btn edit\" (click)=\"openEditButtonModal(i)\" title=\"Edit Button\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n </button>\n <button type=\"button\" class=\"action-card-btn remove\" (click)=\"removeButton(btn)\" title=\"Remove Button\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <polyline points=\"3 6 5 6 21 6\"></polyline>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path>\n </svg>\n </button>\n </div>\n </div>\n <div class=\"action-button-card-meta\">\n <span class=\"action-card-badge\">ID: {{ btn.id }}</span>\n @if (btn.method) {\n <span class=\"action-card-badge method\">{{ btn.method }}</span>\n }\n @if (btn.positionPercent !== undefined && btn.positionPercent !== null) {\n <span class=\"action-card-badge\">{{ btn.positionPercent }}%</span>\n }\n @if (btn.enableConfirm) {\n <span class=\"action-card-badge confirm\">Confirm</span>\n }\n @if (btn.rules && btn.rules.length > 0) {\n <span class=\"action-card-badge rules\">{{ btn.rules.length }} Rule{{ btn.rules.length > 1 ? 's' : '' }}</span>\n }\n </div>\n </div>\n }\n @if (!book()?.questionbook?.action?.length) {\n <div class=\"action-buttons-empty\">\n <span>{{ 'NO_BUTTONS_CONFIGURED' | nxtCustomTranslate : 'No footer buttons configured.' }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n @if (selectedElement()?.type === 'Date' || selectedElement()?.type === 'DateTime') {\n <div>\n <div class=\"text-sm\">\n {{ 'DATE_RANGE' | nxtCustomTranslate : 'Date Range' }}\n </div>\n <div style=\"display: flex; gap: 2px; align-items: center;\">\n <!-- Minimum Date -->\n <div>\n <label class=\"text-sm\">Minimum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'minDate') === 'today'\"\n (change)=\"setValueByPath('minDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'minDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'minDate') \n : null\"\n (ngModelChange)=\"setValueByPath('minDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'minDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n <!-- Maximum Date -->\n <div>\n <label class=\"text-sm\">Maximum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n (change)=\"setValueByPath('maxDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'maxDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'maxDate') \n : null\"\n (ngModelChange)=\"setValueByPath('maxDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (activeTab() === 'property') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n <label>Id</label>\n <div style=\"font-size: 13px; padding: 11px; border-radius: 5px; background-color: #f8f8f8; border: 1px solid #ddd;\">\n {{ headerSelect() ? bookId() : selectedElement()?.id }}\n </div>\n @for (prop of getProperties()?.fieldProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.type === 'toggleGroup') {\n <div class=\"toggle-group\">\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', true) : (selectedElement() | getValueByPath : 'isOptional')) : (selectedElement() | getValueByPath : 'isOptional')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', $event, true, prop.isTranslate) : onToggleChange('isOptional', $event)) : onToggleChange('isOptional', $event)\"\n />\n {{ 'REQUIRED' | nxtCustomTranslate : 'Required' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', true) : (selectedElement() | getValueByPath : 'isReadOnly')) : (selectedElement() | getValueByPath : 'isReadOnly')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', $event, true, prop.isTranslate) : onToggleChange('isReadOnly', $event)) : onToggleChange('isReadOnly', $event)\"\n />\n {{ 'READ_ONLY' | nxtCustomTranslate : 'Read Only' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', true) : (selectedElement() | getValueByPath : 'isHidden')) : (selectedElement() | getValueByPath : 'isHidden')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', $event, true, prop.isTranslate) : onToggleChange('isHidden', $event)) : onToggleChange('isHidden', $event)\"\n />\n {{ 'IS_HIDE' | nxtCustomTranslate : 'Is Hide' }}\n </label>\n </div>\n </div>\n }\n <!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n @if ( prop.type === 'checkbox' || prop.type === 'radio' || prop.key === 'options') {\n <div class=\"options-sidebar-trigger-wrapper\">\n <div class=\"options-trigger-header\">\n <div class=\"options-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <line x1=\"8\" y1=\"6\" x2=\"21\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"12\" x2=\"21\" y2=\"12\"></line>\n <line x1=\"8\" y1=\"18\" x2=\"21\" y2=\"18\"></line>\n <line x1=\"3\" y1=\"6\" x2=\"3.01\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"12\" x2=\"3.01\" y2=\"12\"></line>\n <line x1=\"3\" y1=\"18\" x2=\"3.01\" y2=\"18\"></line>\n </svg>\n <span>{{ prop.labelPath | nxtCustomTranslate : prop.label || 'Options' }}</span>\n </div>\n <span class=\"options-status-badge\" [class.configured]=\"getOptionsCount(prop.key) > 0\">\n {{ getOptionsCount(prop.key) }} {{ getOptionsCount(prop.key) === 1 ? 'Option' : 'Options' }}\n </span>\n </div>\n <p class=\"options-trigger-hint\">Manage choices, display labels, stored values, and option ordering.</p>\n <button type=\"button\" class=\"options-modal-open-btn\" (click)=\"openOptionsModal(prop.key)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Options ({{ getOptionsCount(prop.key) }})</span>\n </button>\n </div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'subQuestion') {\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n <div class=\"subtext-sidebar-trigger-wrapper\">\n <div class=\"subtext-trigger-header\">\n <div class=\"subtext-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>\n </svg>\n <span>Sub Text (API & Layout)</span>\n </div>\n @if (hasSubTextConfigured()) {\n <span class=\"subtext-status-badge configured\">Configured</span>\n } @else {\n <span class=\"subtext-status-badge\">Not Set</span>\n }\n </div>\n <p class=\"subtext-trigger-hint\">Configure API endpoint, live search queries, dependent fields, and card layout.</p>\n <button type=\"button\" class=\"subtext-modal-open-btn\" (click)=\"openSubTextModal(prop)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Sub Text</span>\n </button>\n </div>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <span class=\"toggle-label\" style=\"padding-right: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key , prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) :setValueByPath(prop.key, $event, prop.isTranslate) ) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n </div>\n }\n <!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n <div class=\"style-sidebar-trigger-wrapper\">\n <div class=\"style-trigger-header\">\n <div class=\"style-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <path d=\"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z\"></path>\n </svg>\n <span>{{ 'STYLE' | nxtCustomTranslate : 'Style' }}</span>\n </div>\n @if (hasStyleConfigured()) {\n <span class=\"style-status-badge configured\">Customized</span>\n } @else {\n <span class=\"style-status-badge\">Default</span>\n }\n </div>\n <p class=\"style-trigger-hint\">Configure CSS classes, inline styling, text direction, and label visibility.</p>\n <button type=\"button\" class=\"style-modal-open-btn\" (click)=\"openStyleModal()\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M12 20h9\"></path>\n <path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z\"></path>\n </svg>\n <span>Configure Style</span>\n </button>\n </div>\n </div>\n }\n </div>\n}\n\n@if (activeTab() === 'appearance') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @for (prop of getProperties()?.appearance; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n }\n <div class=\"flex-container\">\n @if (prop.type === 'color') {\n <div class=\"color-selector\">\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"selectedElement()?.color\"\n (ngModelChange)=\"setValueByPath('color', $event, prop.isTranslate)\"\n >\n </div>\n }\n @if (prop.type === 'color') {\n <div class=\"hex-input-container\">\n <span>{{ 'HEX_CODE' | nxtCustomTranslate : 'HEX Code' }}</span>\n <input\n type=\"text\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n </div>\n }\n </div>\n @if (prop.type === 'button-toggle') {\n <div class=\"button-toggle-wrapper\">\n <button\n type=\"button\"\n class=\"toggle-button\"\n (click)=\"duplicateField(selectedElement())\"\n >\n {{ 'ADD_DUPLICATE' | nxtCustomTranslate : 'Add Duplicate' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n}\n\n@if (!templateSelected) {\n <div class=\"button-container\">\n <button class=\"save-btn\" (click)=\"handleButtonClick()\">{{ 'SAVE' | nxtCustomTranslate : 'Save' }}</button>\n <button class=\"cancel-btn\" (click)=\"onCancel()\">{{ 'CANCEL' | nxtCustomTranslate : 'Cancel' }}</button>\n </div>\n}\n\n@if (templateSelected) {\n <div class=\"button-container\" style=\"margin-top: 20px;\">\n <button class=\"save-btn\" (click)=\"handleTemplateSave()\">{{ 'SAVE_TEMPLATE' | nxtCustomTranslate : 'Save Template' }}</button>\n </div>\n}\n\n<!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n@if (isSubTextModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeSubTextModal()\">\n <div class=\"subtext-modal-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Sub Text (API & Card Configuration)</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} &bull; {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeSubTextModal()\">&times;</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'api'\" (click)=\"activeSubTextTab = 'api'\">\n API & Data Source\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'dependencies'\" (click)=\"activeSubTextTab = 'dependencies'\">\n Dependencies & Queries\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'card'\" (click)=\"activeSubTextTab = 'card'\">\n Card Presentation\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'other'\" (click)=\"activeSubTextTab = 'other'\">\n Advanced / Files\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: API & Data Source -->\n @if (activeSubTextTab === 'api') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-row\">\n <label>End Point URL (endpoint)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.endpoint\" placeholder=\"/services/apexrest/FusionApiData?type=...\" />\n <small class=\"field-hint\">Base or relative endpoint URL to fetch records from</small>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Variable / Response Key (variable)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.variable\" placeholder=\"data or records (leave blank if root array)\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Default Field / Selected Value (defaultField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.defaultField\" placeholder=\"e.g. name, id\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Search & Display Fields (field)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextFieldsStr\" placeholder=\"e.g. name, code, city\" />\n <small class=\"field-hint\">Fields used for live searching and default two-line fallback display</small>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isObject\" />\n <span>Is Object (isObject - emit full record object instead of single scalar string)</span>\n </label>\n </div>\n </div>\n }\n\n <!-- Tab 2: Dependencies & Queries -->\n @if (activeSubTextTab === 'dependencies') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Source Question Id (sourceQuestionId)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.sourceQuestionId\" placeholder=\"Parent question ID\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Dependent Value (dependentValue)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.dependentValue\" placeholder=\"e.g. true or specific value\" />\n </div>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isDependentField\" />\n <span>Is Dependent Field (isDependentField - conditional rendering based on parent value)</span>\n </label>\n </div>\n <hr class=\"subtext-divider\" />\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Live Search Query Parameter (queryParameter)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextQueryParamStr\" placeholder=\"e.g. search, q\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Field in API URL (queryField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryField\" placeholder=\"e.g. customerId\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value / Reference Key (queryValue)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValue\" placeholder=\"e.g. selectedCustomer\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value Reference (queryValueReference)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValueReference\" placeholder=\"e.g. parentRef\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Unique Cache Key (uniqueKey)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.uniqueKey\" placeholder=\"Cache key for local storage\" />\n </div>\n </div>\n }\n\n <!-- Tab 3: Card Layout Presentation -->\n @if (activeSubTextTab === 'card') {\n <div class=\"subtext-tab-content\">\n <div class=\"card-config-header-row\">\n <label class=\"toggle-switch\">\n <input type=\"checkbox\" [(ngModel)]=\"isCardConfigEnabled\" (change)=\"toggleCardConfig(isCardConfigEnabled)\" />\n <span class=\"toggle-slider\"></span>\n </label>\n <div class=\"toggle-text\">\n <strong>Enable Card Layout (cardConfig)</strong>\n <p>Render suggestions as rich cards with thumbnail, primary title, subtitle, and badges</p>\n </div>\n </div>\n\n @if (isCardConfigEnabled) {\n <div class=\"card-config-body\">\n <div class=\"card-config-fields\">\n <div class=\"subtext-form-row\">\n <label>Image Field Name (cardConfig.imageUrl)</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.imageUrl\" placeholder=\"e.g. photoUrl, thumbnail, imageUrl\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Primary Title Field (cardConfig.primary)</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.primary\" placeholder=\"e.g. name, title, hotelName\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Subtitle Field (cardConfig.subTitle)</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.subTitle\" placeholder=\"e.g. summary, duration, description\" />\n </div>\n\n <!-- Badges Section -->\n <div class=\"badges-config-section\">\n <div class=\"badges-header\">\n <label>Badges (cardConfig.badges)</label>\n <button type=\"button\" class=\"add-badge-btn\" (click)=\"addModalBadge()\">+ Add Badge</button>\n </div>\n @for (badge of modalBadges; track $index; let bIdx = $index) {\n <div class=\"badge-item-row\">\n <input type=\"text\" [(ngModel)]=\"badge.field\" placeholder=\"Field name (e.g. city)\" class=\"badge-field-input\" />\n <select [(ngModel)]=\"badge.icon\" class=\"badge-icon-select\">\n <option value=\"\">No Icon</option>\n <option value=\"hotel\">Hotel</option>\n <option value=\"calendar\">Calendar</option>\n <option value=\"location\">Location</option>\n </select>\n <input type=\"text\" [(ngModel)]=\"badge.label\" placeholder=\"Prefix label (optional)\" class=\"badge-label-input\" />\n <button type=\"button\" class=\"remove-badge-btn\" (click)=\"removeModalBadge(bIdx)\">&times;</button>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Card Preview -->\n <div class=\"card-live-preview-box\">\n <span class=\"preview-tag\">LIVE PREVIEW</span>\n <div class=\"sample-card-container\">\n <div class=\"sample-card-image\">\n @if (modalCardConfig.imageUrl) {\n <div class=\"sample-img-placeholder has-img\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\"/>\n <polyline points=\"21 15 16 10 5 21\"/>\n </svg>\n <span class=\"img-field-label\">{{ modalCardConfig.imageUrl }}</span>\n </div>\n } @else {\n <div class=\"sample-img-placeholder\">Image</div>\n }\n </div>\n <div class=\"sample-card-content\">\n <div class=\"sample-card-title\">{{ modalCardConfig.primary || 'Hotel Booking' }}</div>\n <div class=\"sample-card-subtitle\">{{ modalCardConfig.subTitle || '3 nights at Atlantis, Dubai' }}</div>\n @if (modalBadges.length > 0) {\n <div class=\"sample-card-badges\">\n @for (badge of modalBadges; track $index) {\n @if (badge.field) {\n <span class=\"sample-badge-pill\">\n @if (badge.icon === 'hotel') { \uD83C\uDFE8 }\n @else if (badge.icon === 'calendar') { \uD83D\uDCC5 }\n @else if (badge.icon === 'location') { \uD83D\uDCCD }\n <span>{{ badge.label ? badge.label + ': ' : '' }}{{ badge.field }}</span>\n </span>\n }\n }\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Tab 4: Advanced / Files -->\n @if (activeSubTextTab === 'other') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Group Field (groupField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.groupField\" placeholder=\"groupField\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Child Group Field (childGroupField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.childGroupField\" placeholder=\"childGroupField\" />\n </div>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Allowed File Types (allowedTypes)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextAllowedTypesStr\" placeholder=\".jpg,.png,.pdf\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Max File Size in MB (maxFileSize)</label>\n <input type=\"number\" [(ngModel)]=\"modalSubText.maxFileSize\" placeholder=\"10\" />\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeSubTextModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveSubTextModal()\">Save Configuration</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n@if (isStyleModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeStyleModal()\">\n <div class=\"subtext-modal-container style-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Element Style Configuration</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} &bull; {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeStyleModal()\">&times;</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'classes'\" (click)=\"activeStyleTab = 'classes'\">\n Classes & Essentials\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'inline'\" (click)=\"activeStyleTab = 'inline'\">\n Inline Styles\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'custom'\" (click)=\"activeStyleTab = 'custom'\">\n Custom Keys & Live Preview\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: Classes & Essentials -->\n @if (activeStyleTab === 'classes') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputClass\"\n placeholder=\"e.g. form-control invoice-data custom-input\"\n />\n <span class=\"field-hint\">Classes applied directly to input/control element</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelClass\"\n placeholder=\"e.g. form-label fw-bold text-primary\"\n />\n <span class=\"field-hint\">Classes applied to the question/field label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Text / Layout Direction</label>\n <select [(ngModel)]=\"modalStyle.direction\">\n <option value=\"ltr\">LTR (Left to Right)</option>\n <option value=\"rtl\">RTL (Right to Left)</option>\n </select>\n <span class=\"field-hint\">Direction attribute for text flow and control layout</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Visibility</label>\n <div style=\"display: flex; align-items: center; gap: 8px; margin-top: 8px;\">\n <input\n type=\"checkbox\"\n id=\"modalStyleShowLabel\"\n style=\"width: 18px; height: 18px; cursor: pointer;\"\n [(ngModel)]=\"modalStyle.showLabel\"\n />\n <label for=\"modalStyleShowLabel\" style=\"cursor: pointer; font-size: 13px; font-weight: 500; margin: 0;\">\n Show Label ({{ modalStyle.showLabel ? 'Enabled' : 'Hidden' }})\n </label>\n </div>\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 2: Inline Styles -->\n @if (activeStyleTab === 'inline') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputStyle\"\n placeholder=\"e.g. background-color: #f8fafc; border-color: #3b82f6;\"\n />\n <span class=\"field-hint\">Inline styles applied to input control</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelStyle\"\n placeholder=\"e.g. font-size: 14px; color: #1e293b; font-weight: 600;\"\n />\n <span class=\"field-hint\">Inline styles applied to label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Label Value Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelValueStyle\"\n placeholder=\"e.g. color: #64748b; font-style: italic;\"\n />\n <span class=\"field-hint\">Inline styles applied to label value text</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Question Wrapper Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.questionStyle\"\n placeholder=\"e.g. margin-bottom: 16px; padding: 8px;\"\n />\n <span class=\"field-hint\">Inline styles applied to outer question wrapper</span>\n </div>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Book / Container Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.bookStyle\"\n placeholder=\"e.g. border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);\"\n />\n <span class=\"field-hint\">Inline styles applied to booklet / section wrapper</span>\n </div>\n </div>\n }\n\n <!-- Tab 3: Custom Keys & Live Preview -->\n @if (activeStyleTab === 'custom') {\n <div class=\"subtext-tab-content\">\n <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;\">\n <div>\n <h4 style=\"margin: 0; font-size: 14px; color: #0f172a;\">Dynamic / Custom Style Keys</h4>\n <p style=\"margin: 2px 0 0 0; font-size: 12px; color: #64748b;\">Add specialized style properties for custom rendering</p>\n </div>\n <button type=\"button\" class=\"btn-add-badge\" (click)=\"addCustomStyleKey()\">\n + Add Style Key\n </button>\n </div>\n\n @if (customStyleKeys.length === 0) {\n <div style=\"padding: 16px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 6px; text-align: center; font-size: 12px; color: #64748b; margin-bottom: 16px;\">\n No custom style keys added. All standard style properties are configured under Classes and Inline tabs.\n </div>\n } @else {\n <div style=\"display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px;\">\n @for (item of customStyleKeys; track $index) {\n <div class=\"subtext-badge-row\">\n <input type=\"text\" [(ngModel)]=\"item.key\" placeholder=\"Key (e.g. helperStyle)\" style=\"flex: 1;\" />\n <input type=\"text\" [(ngModel)]=\"item.value\" placeholder=\"Value (e.g. font-size: 11px;)\" style=\"flex: 1;\" />\n <button type=\"button\" class=\"btn-remove-badge\" (click)=\"removeCustomStyleKey($index)\">&times;</button>\n </div>\n }\n </div>\n }\n\n <!-- Live Interactive Preview -->\n <div style=\"margin-top: 16px; border-top: 1px solid #e2e8f0; padding-top: 16px;\">\n <div style=\"display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;\">\n <span style=\"font-size: 13px; font-weight: 600; color: #1e293b;\">Live Element Style Preview</span>\n <span style=\"font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 12px; background: #e0f2fe; color: #0369a1;\">Interactive</span>\n </div>\n <div [attr.dir]=\"modalStyle.direction\" style=\"background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 16px;\">\n @if (modalStyle.showLabel) {\n <div [class]=\"modalStyle.labelClass\" [style]=\"modalStyle.labelStyle\" style=\"font-weight: 600; margin-bottom: 6px; font-size: 13px;\">\n {{ selectedElement()?.questionText || selectedElement()?.label || 'Sample Question Label' }}\n </div>\n }\n <div [class]=\"modalStyle.inputClass\" [style]=\"modalStyle.inputStyle\" style=\"background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 8px 12px; font-size: 13px; color: #475569;\">\n Sample Input Value / Preview\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" style=\"margin-right: auto; color: #dc2626; border-color: #fca5a5;\" (click)=\"resetStyleToDefault()\">\n Reset to Defaults\n </button>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeStyleModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveStyleModal()\">Save Styles</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n@if (isOptionsModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeOptionsModal()\">\n <div class=\"subtext-modal-container options-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Options Configuration</h2>\n <span class=\"subtext-modal-element-tag\">\n {{ selectedElement()?.type }} &bull; {{ selectedElement()?.questionText || selectedElement()?.label || 'Choice Field' }}\n ({{ modalOptions.length }} {{ modalOptions.length === 1 ? 'choice' : 'choices' }})\n </span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeOptionsModal()\">&times;</button>\n </div>\n\n <!-- Modal Toolbar -->\n <div class=\"options-modal-toolbar\">\n <div class=\"options-search-box\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#64748b\" stroke-width=\"2\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n <input\n type=\"text\"\n [(ngModel)]=\"optionsFilterQuery\"\n placeholder=\"Filter options by value or label...\"\n class=\"options-filter-input\"\n />\n </div>\n <button type=\"button\" class=\"options-add-btn\" (click)=\"addModalOption()\">\n <span style=\"font-size: 15px; font-weight: bold; line-height: 1;\">+</span>\n <span>Add Option</span>\n </button>\n </div>\n\n <!-- Modal Body -->\n <div class=\"options-modal-body\">\n @if (modalOptions.length === 0) {\n <div class=\"options-empty-state\">\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#94a3b8\" stroke-width=\"1.5\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"8\" y1=\"12\" x2=\"16\" y2=\"12\"></line>\n </svg>\n <p class=\"empty-title\">No Options Configured</p>\n <p class=\"empty-desc\">Click \"Add Option\" above to create your first choice for this field.</p>\n <button type=\"button\" class=\"options-add-btn\" style=\"margin-top: 8px;\" (click)=\"addModalOption()\">\n + Add First Option\n </button>\n </div>\n } @else {\n <div class=\"options-table-wrapper\" (dragover)=\"onModalOptionDragOver($event)\" (drop)=\"onModalOptionDrop($event)\">\n <div class=\"options-table-header\">\n <span class=\"col-num\">#</span>\n <span class=\"col-reorder\">Reorder</span>\n <span class=\"col-value\">Stored Value (value)</span>\n <span class=\"col-label\">Display Label (label)</span>\n <span class=\"col-actions\">Action</span>\n </div>\n\n <div class=\"options-table-body\">\n @for (opt of getFilteredModalOptions(); track opt.id; let idx = $index) {\n <div\n class=\"modal-option-table-row\"\n [attr.data-id]=\"opt.id\"\n draggable=\"true\"\n (dragstart)=\"onModalOptionDragStart($event, opt.id)\"\n >\n <span class=\"col-num index-pill\">{{ idx + 1 }}</span>\n \n <div class=\"col-reorder reorder-buttons\">\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === 0\"\n (click)=\"moveModalOption(idx, 'up')\"\n title=\"Move Up\"\n >\n &#9650;\n </button>\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === modalOptions.length - 1\"\n (click)=\"moveModalOption(idx, 'down')\"\n title=\"Move Down\"\n >\n &#9660;\n </button>\n <span class=\"modal-drag-grip\" title=\"Drag to reorder\">&#9776;</span>\n </div>\n\n <div class=\"col-value\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.value\"\n placeholder=\"e.g. choice_1 or 01\"\n />\n </div>\n\n <div class=\"col-label\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.label\"\n placeholder=\"e.g. First Choice\"\n />\n </div>\n\n <div class=\"col-actions\">\n <button\n type=\"button\"\n class=\"btn-delete-option\"\n (click)=\"removeModalOption(idx)\"\n title=\"Delete Option\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <polyline points=\"3 6 5 6 21 6\"></polyline>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path>\n </svg>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Choices Preview -->\n <div class=\"options-live-preview-box\">\n <div class=\"preview-header\">\n <span class=\"preview-title\">Live Dropdown / Choice Preview</span>\n <span class=\"preview-tag\">{{ modalOptions.length }} Items</span>\n </div>\n <div class=\"preview-select-mock\">\n <select class=\"mock-dropdown-select\" disabled>\n <option value=\"\" selected disabled>--- Select an option ---</option>\n @for (opt of modalOptions; track opt.id) {\n <option [value]=\"opt.value\">{{ opt.label || opt.value }}</option>\n }\n </select>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <span style=\"font-size: 12px; color: #64748b; margin-right: auto; align-self: center;\">\n Total: <strong>{{ modalOptions.length }}</strong> {{ modalOptions.length === 1 ? 'choice' : 'choices' }}\n </span>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeOptionsModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveOptionsModal()\">Save Options</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 17NOV26 Action Button Configuration Pop-Up Modal with RuleMeta Support -->\n@if (isButtonModalOpen) {\n <div class=\"button-modal-backdrop\" (click)=\"closeButtonModal()\">\n <div class=\"button-modal-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"button-modal-header\">\n <div class=\"button-modal-title-group\">\n <h2 class=\"button-modal-title\">\n {{ (editingButtonIndex === -1 ? 'ADD_ACTION_BUTTON' : 'EDIT_ACTION_BUTTON') | nxtCustomTranslate : (editingButtonIndex === -1 ? 'Add Action Button' : 'Edit Action Button') }}\n </h2>\n <span class=\"button-modal-element-tag\">\n {{ editingButton.name || ('UNNAMED' | nxtCustomTranslate : 'Unnamed') }} &bull; ID: {{ editingButton.id }}\n </span>\n </div>\n <button type=\"button\" class=\"button-modal-close-btn\" (click)=\"closeButtonModal()\">&times;</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"button-modal-tabs\">\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'general'\" (click)=\"activeButtonTab = 'general'\">\n {{ 'GENERAL' | nxtCustomTranslate : 'General' }}\n </button>\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'api'\" (click)=\"activeButtonTab = 'api'\">\n {{ 'ACTION_API' | nxtCustomTranslate : 'Action & API' }}\n </button>\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'appearance'\" (click)=\"activeButtonTab = 'appearance'\">\n {{ 'APPEARANCE' | nxtCustomTranslate : 'Appearance' }}\n </button>\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'rules'\" (click)=\"activeButtonTab = 'rules'\">\n {{ 'RULES_AND_CONFIRM' | nxtCustomTranslate : 'Rules & Confirm' }}\n @if (editingButton.rules?.length) {\n <span class=\"tab-badge\">{{ editingButton.rules?.length }}</span>\n }\n </button>\n </div>\n\n <!-- Modal Body -->\n <div class=\"button-modal-body\">\n <!-- Tab 1: General -->\n @if (activeButtonTab === 'general') {\n <div class=\"button-modal-tab-content\">\n <div class=\"button-form-row\">\n <label>{{ 'BUTTON_ID' | nxtCustomTranslate : 'Button ID' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.id\" placeholder=\"Enter button id\" />\n </div>\n\n <div class=\"button-form-row\">\n <label>{{ 'BUTTON_NAME' | nxtCustomTranslate : 'Button Name' }}</label>\n @if (formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if ((editingButton.id + '.name' | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n @if (!copied) {\n <svg (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" stroke=\"currentColor\">\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" stroke-width=\"2\"></rect>\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" stroke-width=\"2\"></path>\n </svg>\n }\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n <input type=\"text\" [(ngModel)]=\"editingButton.name\" placeholder=\"Enter button name\" />\n </div>\n\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'EVENT_NAME' | nxtCustomTranslate : 'Event to Emit' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.eventtoemit\" placeholder=\"e.g. submit, close, print\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'ALT' | nxtCustomTranslate : 'Alt Text' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.alt\" placeholder=\"Button alt text\" />\n </div>\n </div>\n\n <div class=\"button-form-row\">\n <label>{{ 'ACTION_DATA' | nxtCustomTranslate : 'Action Data' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.actionData\" placeholder=\"Event to actionData\" />\n </div>\n </div>\n }\n\n <!-- Tab 2: Action / API -->\n @if (activeButtonTab === 'api') {\n <div class=\"button-modal-tab-content\">\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\" style=\"grid-column: 1 / -1;\">\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.endpoint\" placeholder=\"API endpoint URL\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'METHOD' | nxtCustomTranslate : 'Method' }}</label>\n <select [(ngModel)]=\"editingButton.method\">\n <option value=\"GET\">GET</option>\n <option value=\"POST\">POST</option>\n <option value=\"PUT\">PUT</option>\n <option value=\"DELETE\">DELETE</option>\n </select>\n </div>\n <div class=\"button-form-row\" style=\"align-self: center; margin-top: 22px;\">\n <label class=\"button-checkbox-label\">\n <input type=\"checkbox\" [(ngModel)]=\"editingButton.updateParentData\" />\n <span>{{ 'UPDATE_PARENTDATA' | nxtCustomTranslate : 'Update Parent Data' }}</span>\n </label>\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 3: Appearance -->\n @if (activeButtonTab === 'appearance') {\n <div class=\"button-modal-tab-content\">\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'BUTTON_WIDTH_PX' | nxtCustomTranslate : 'Button Width (px)' }}</label>\n <input type=\"number\" [(ngModel)]=\"editingButton.width\" min=\"50\" placeholder=\"Width in px\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'POSITION_PERCENT' | nxtCustomTranslate : 'Position (%)' }}: {{ editingButton.positionPercent || 0 }}%</label>\n <input type=\"range\" min=\"0\" max=\"100\" [(ngModel)]=\"editingButton.positionPercent\" />\n </div>\n </div>\n\n <div class=\"button-form-grid-3\">\n <div class=\"button-form-row\">\n <label>{{ 'BACKGROUND_COLOR' | nxtCustomTranslate : 'Background Color' }}</label>\n <input type=\"color\" [(ngModel)]=\"editingButton.bgColor\" class=\"button-color-input\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'TEXT_COLOR' | nxtCustomTranslate : 'Text Color' }}</label>\n <input type=\"color\" [(ngModel)]=\"editingButton.textColor\" class=\"button-color-input\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'BORDER_COLOR' | nxtCustomTranslate : 'Border Color' }}</label>\n <input type=\"color\" [(ngModel)]=\"editingButton.borderColor\" class=\"button-color-input\" />\n </div>\n </div>\n\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'BORDER_SIZE' | nxtCustomTranslate : 'Border Size' }}: {{ editingButton.borderSize || 0 }}px</label>\n <input type=\"range\" min=\"0\" max=\"20\" [(ngModel)]=\"editingButton.borderSize\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'BORDER_RADIUS' | nxtCustomTranslate : 'Border Radius' }}: {{ editingButton.borderRadius || 0 }}px</label>\n <input type=\"range\" min=\"0\" max=\"50\" [(ngModel)]=\"editingButton.borderRadius\" />\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 4: Rules & Confirm -->\n @if (activeButtonTab === 'rules') {\n <div class=\"button-modal-tab-content\">\n <!-- Confirmation Setting -->\n <div class=\"button-rules-section\">\n <label class=\"button-checkbox-label\" style=\"font-weight: 600;\">\n <input type=\"checkbox\" [(ngModel)]=\"editingButton.enableConfirm\" />\n <span>{{ 'ENABLE_CONFIRM' | nxtCustomTranslate : 'Enable Confirmation Prompt before execution' }}</span>\n </label>\n </div>\n\n <!-- Quick Visibility Expression with Google CEL validation -->\n <div class=\"button-form-row\">\n <div class=\"button-row-header-between\">\n <label>{{ 'VISIBILITY_RULE' | nxtCustomTranslate : 'Visibility Rule Expression' }}</label>\n <span class=\"cel-badge\">CEL</span>\n </div>\n <input\n type=\"text\"\n [(ngModel)]=\"editingButton.visibilityRule\"\n (ngModelChange)=\"onVisibilityRuleChange($event)\"\n [class.is-invalid]=\"!visibilityRuleValidation.isValid\"\n placeholder=\"e.g. status == 'Approved'\" />\n @if (editingButton.visibilityRule?.trim()) {\n @if (visibilityRuleValidation.isValid) {\n <div class=\"cel-feedback valid\">\n <span class=\"cel-icon\">\u2713</span>\n <span>{{ 'CEL_VALID' | nxtCustomTranslate : 'Valid CEL expression' }}</span>\n </div>\n } @else {\n <div class=\"cel-feedback invalid\">\n <span class=\"cel-icon\">\u26A0</span>\n <span>{{ visibilityRuleValidation.error }}</span>\n </div>\n }\n }\n </div>\n\n <!-- RuleMeta List Section -->\n <div class=\"button-rules-header\">\n <div class=\"button-rules-title\">\n <span>{{ 'BUTTON_RULES' | nxtCustomTranslate : 'Rules (RuleMeta)' }}</span>\n <span class=\"button-rules-count\">{{ editingButton.rules?.length || 0 }}</span>\n </div>\n <button type=\"button\" class=\"btn-add-rule\" (click)=\"addRuleToEditingButton()\">\n + {{ 'ADD_RULE' | nxtCustomTranslate : 'Add Rule' }}\n </button>\n </div>\n\n <div class=\"button-rules-list\">\n @for (rule of editingButton.rules || []; track rule.id || $index; let rIdx = $index) {\n <div class=\"button-rule-card\">\n <div class=\"button-rule-card-header\">\n <span class=\"button-rule-num\">#{{ rIdx + 1 }}</span>\n <div class=\"button-rule-type-select\">\n <label>{{ 'RULE_TYPE' | nxtCustomTranslate : 'Type' }}:</label>\n <select [(ngModel)]=\"rule.type\">\n @for (rt of ruleTypes; track rt) {\n <option [value]=\"rt\">{{ rt }}</option>\n }\n </select>\n </div>\n <button type=\"button\" class=\"btn-rule-remove\" (click)=\"removeRuleFromEditingButton(rIdx)\" title=\"Remove Rule\">\n &times;\n </button>\n </div>\n\n <!-- MR 17NOV26 Rule ID and Execution Order inputs -->\n <div class=\"button-form-grid-2\" style=\"margin-top: 8px;\">\n <div class=\"button-form-row\">\n <label>{{ 'RULE_ID' | nxtCustomTranslate : 'Rule ID' }}</label>\n <input type=\"text\" [(ngModel)]=\"rule.id\" placeholder=\"Rule ID\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'ORDER' | nxtCustomTranslate : 'Order' }}</label>\n <input type=\"number\" [(ngModel)]=\"rule.order\" min=\"1\" placeholder=\"Order (e.g. 1)\" />\n </div>\n </div>\n\n <!-- MR 17NOV26 Rule Expression Textarea with Google CEL syntax validation -->\n <div class=\"button-form-row\" style=\"margin-top: 8px;\">\n <div class=\"button-row-header-between\">\n <label>{{ 'EXPRESSION' | nxtCustomTranslate : 'Rule Expression (Google CEL)' }}</label>\n <span class=\"cel-badge\">CEL</span>\n </div>\n <textarea\n rows=\"3\"\n [(ngModel)]=\"rule.expression\"\n (ngModelChange)=\"onRuleExpressionChange(rule)\"\n class=\"button-form-textarea\"\n [class.is-invalid]=\"rule.id && ruleValidationMap[rule.id]?.isValid === false\"\n placeholder=\"Enter Google CEL expression, e.g. isValid == true && totalAmount > 0\"></textarea>\n @if (rule.expression?.trim()) {\n @if (rule.id && ruleValidationMap[rule.id]?.isValid) {\n <div class=\"cel-feedback valid\">\n <span class=\"cel-icon\">\u2713</span>\n <span>{{ 'CEL_VALID' | nxtCustomTranslate : 'Valid CEL expression' }}</span>\n </div>\n } @else if (rule.id && ruleValidationMap[rule.id]?.isValid === false) {\n <div class=\"cel-feedback invalid\">\n <span class=\"cel-icon\">\u26A0</span>\n <span>{{ ruleValidationMap[rule.id]?.error }}</span>\n </div>\n }\n }\n </div>\n\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'MESSAGE' | nxtCustomTranslate : 'Message / Notification' }}</label>\n <input type=\"text\" [(ngModel)]=\"rule.message\" placeholder=\"Optional notification or validation message\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'TARGET_FIELD' | nxtCustomTranslate : 'Target Field' }}</label>\n <input type=\"text\" [(ngModel)]=\"rule.targetField\" placeholder=\"Optional target field\" />\n </div>\n </div>\n </div>\n }\n @if (!editingButton.rules?.length) {\n <div class=\"button-rules-empty\">\n <span>{{ 'NO_RULES_CONFIGURED' | nxtCustomTranslate : 'No rules configured for this button.' }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"button-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeButtonModal()\">\n {{ 'CANCEL' | nxtCustomTranslate : 'Cancel' }}\n </button>\n <button\n type=\"button\"\n class=\"btn-save\"\n [disabled]=\"hasCelValidationErrors()\"\n (click)=\"saveButtonModal()\">\n {{ 'SAVE_BUTTON' | nxtCustomTranslate : 'Save Button' }}\n </button>\n </div>\n </div>\n </div>\n}\n</div>", styles: ["*{margin:0;padding:0;box-sizing:border-box;font-family:Roboto,sans-serif}.properties{height:calc(100vh - 20px);overflow-y:auto}.container{width:100%;max-width:500px;margin:0 auto;background:#fff;box-shadow:0 2px 10px #0000001a;overflow:hidden;font-family:Arial,sans-serif}.design-header{display:flex;justify-content:center;align-items:center;padding:15px 20px;background:#fff;border-radius:8px;box-shadow:0 2px 10px #0000001a;margin-bottom:20px}.header-title{font-size:20px;font-weight:400;color:#222}.toggle-header,.style-toggle-header{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:10px;background:#f8f8f8;border:1px solid #ddd;border-radius:6px;margin-bottom:6px}.tabs{display:flex;background:#f0f2f5;border-bottom:2px solid #0052cc}.tab{flex:1;padding:15px 10px;text-align:center;cursor:pointer}.tab.active{background:#0052cc;color:#fff;font-weight:700}.tab-content{padding:5px;max-height:80vh;overflow-y:auto;overflow-x:hidden}.form-group{margin-bottom:15px}label{display:block;font-size:14px;font-weight:500;color:#444;margin-bottom:8px}.required:before{content:\"*\";color:red;margin-right:3px}input[type=text],input[type=number],select,textarea{width:100%;padding:10px;font-size:14px;border:1px solid #ccc;border-radius:6px;outline:none;transition:all .3s;background:#f8f8f8}input:focus,select:focus,textarea:focus{border-color:#007bff;background:#fff;box-shadow:0 0 5px #007bff4d}textarea{min-height:55px;resize:vertical}button,.btn{padding:10px 15px;border:none;border-radius:6px;background:#007bff;color:#fff;font-size:15px;cursor:pointer;transition:all .3s}button:hover,.btn:hover{background:#0056b3;transform:translateY(-2px)}.add-button{padding:8px 14px;background:#0954c5;border-radius:8px}.remove-button{background:#e74c3c;padding:6px 12px;margin-top:10px}.remove-button:hover{background:#c0392b}.cancel-btn{background:#fff;color:#666;border:1px solid #ddd}.save-btn{background:#0052cc;margin-right:10px}.toggle-group{display:grid;grid-template-columns:1fr 1fr;gap:10px}.toggle-item{display:flex;align-items:center;gap:10px;padding:8px}.switch{position:relative;width:42px;height:22px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background:#ccc;transition:.4s;border-radius:24px}.slider:before{position:absolute;content:\"\";height:20px;width:20px;left:1px;bottom:1px;background:#fff;transition:.4s;border-radius:50%}input:checked+.slider{background:#2196f3}input:checked+.slider:before{transform:translate(18px)}.radio-item{display:flex;align-items:center;gap:20px}.radio-item input{accent-color:#007bff}.checkbox-row{display:flex;margin-bottom:10px}.checkbox-group{display:flex;align-items:center;margin-right:20px;min-width:120px}.checkbox-group input[type=checkbox]{margin-right:5px}.color-picker-row,.color-picker-container{display:flex;align-items:center}.color-picker-container{border:1px solid #ddd;border-radius:4px;margin-right:10px}.color-box,.color-selector input[type=color]{width:78px!important;height:40px;border:none;border-radius:4px;cursor:pointer}.hex-input-container{display:flex;gap:20px;align-items:center;font-size:12px;color:#b0b0b0}.hex-input-container span{font-size:14px;margin-top:10px}.hex-input,.hex-input-container input[type=text]{width:120px;padding:10px 12px;border:1px solid #d1d1d1;color:#28343e}.hex-label{color:#999;margin-right:5px}.select-container,.input-box-field{position:relative;width:100%}.dropdown-arrow,.input-box-field:after{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none;color:#666;font-size:12px}.input-box-field:after{content:\"\\25bc\";color:#1c1b1f;font-size:10px}.input-box-field select{background:#28343e;color:#fff;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none}.input-box-field select::-ms-expand{display:none}.all-properties details{background:#fff;border:1px solid #ddd;border-radius:8px;margin-bottom:12px;padding:12px;box-shadow:0 2px 8px #0000000d}.all-properties summary{font-size:15px;font-weight:400;cursor:pointer;padding:6px;transition:color .3s}.all-properties summary:hover{color:#007bff}.inner-content{padding:12px 0}.head-elements{font-size:14px;font-weight:500;color:#444}.options-container{display:flex;flex-direction:column;gap:12px}.field-size-controls,.flex-container{display:flex;align-items:center;gap:12px}.flex-container{margin-bottom:1rem}.size-input{width:110px;text-align:center}.input-container{display:flex;flex-direction:column;align-items:flex-start;gap:10px;width:100%}.subtext-textarea{width:100%;margin-left:auto}.arrow-icon{width:19px;height:23px;transition:transform .3s ease}.icon{display:inline-block;width:18px;height:18px;border-radius:50%;text-align:center;line-height:18px;color:#fff;font-size:12px;margin-left:5px}.edit-icon{background:#4caf50}.view-icon{background:#2196f3}.delete-icon{background:#f44336}.logo-icon{width:20px;height:20px;width:35px;display:flex;justify-content:center;background:#d0d9ff;border-radius:4px}.link-icon{background:#e7f2ff;padding:5px;border-radius:5px;margin:5px;display:inline-block;cursor:pointer;position:relative;transition:all .3s}.link-icon:hover{background:#d0e5ff}.link-icon:active{background:#a8d0ff}.link-dropdown-menu{position:absolute;top:100%;right:0;background:#fff;border:1px solid #ccc;padding:10px;width:200px;box-shadow:0 4px 6px #0000001a}.link-dropdown-menu input{width:100%;margin-bottom:5px;padding:5px;border:1px solid #ccc;border-radius:3px}.option-items{display:flex;align-items:center;padding:5px;gap:5px;border:1px solid #ccc;margin-bottom:10px;cursor:grab;background:#fff}.option-items:active{opacity:.5}.drag-handle{cursor:grab}.button-toggle-wrapper{margin-top:8px}.toggle-button{padding:8px 16px;border:1px solid #cbd2d9;border-radius:6px;font-size:14px;cursor:pointer;transition:all .2s ease-in-out}.toggle-button.active:hover{background:#2c6dd5}.button-config-card{background:#fff;padding:15px;border-radius:12px;border:1px solid #ccc;margin-top:20px;box-shadow:0 2px 8px #0000000d}.design-footer{display:flex;justify-content:space-between;margin-top:20px}.button-container{display:flex;padding:15px;background:#f9f9f9;border-top:1px solid #eee}.button-container .cancel-btn,.button-container .save-btn{flex:1;padding:12px;font-weight:700}.divider{border-top:1px dashed #ddd;margin:20px 0}input{width:auto}@media screen and (max-width:768px){.container{height:calc(100vh - 20px);min-height:calc(100vh - 20px)}.tabs{flex-direction:column}.tab{padding:1rem;font-size:.9rem}.form-group,.tab-content[aria-label=attributes] .form-group,.tab-content[aria-label=property] .form-group,.tab-content[aria-label=appearance] .form-group{flex-direction:column;grid-template-columns:1fr}.toggle-group{flex-direction:column;align-items:flex-start}}@media screen and (max-width:480px){.container{padding:0 10px}.tabs{flex-direction:column}.tab{padding:1rem;border-bottom:1px solid #dee2e6}input[type=text],input[type=number],select,textarea{font-size:.9rem}}.translation-fallback label,.translation-input-group label{font-weight:500;font-size:13px;margin-bottom:4px;display:block;color:#666}.readonly-box{font-size:14px;padding:4px;border:1px solid #ddd;border-radius:5px;-webkit-user-select:text;user-select:text;cursor:text;color:#7a7a7a;margin-bottom:3px}.copied-msg{font-size:12px;color:green;opacity:0;animation:fadeInOut 1.5s ease}@keyframes fadeInOut{0%{opacity:0;transform:translateY(-2px)}20%{opacity:1;transform:translateY(0)}80%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-2px)}}.subtext-sidebar-trigger-wrapper{background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:10px 12px;margin:10px 0;box-shadow:0 1px 3px #0000000a}.subtext-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.subtext-trigger-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#1e293b}.subtext-status-badge{font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:#f1f5f9;color:#64748b}.subtext-status-badge.configured{background:#e0f2fe;color:#0369a1}.subtext-trigger-hint{font-size:11px;color:#64748b;margin:2px 0 8px;line-height:1.3}.subtext-modal-open-btn{width:100%;background:#2563eb;color:#fff;border:none;border-radius:5px;padding:7px 12px;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:background .15s ease}.subtext-modal-open-btn:hover{background:#1d4ed8}.subtext-modal-backdrop{position:fixed;inset:0;background:#0f172a99;backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:10000}.subtext-modal-container{background:#fff;border-radius:10px;box-shadow:0 20px 45px #00000040;width:90%;max-width:780px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;animation:modalFadeIn .2s ease-out}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.subtext-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.subtext-modal-title{font-size:16px;font-weight:700;color:#0f172a;margin:0}.subtext-modal-element-tag{font-size:11px;font-weight:500;color:#475569;background:#e2e8f0;padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px}.subtext-modal-close-btn{background:none;border:none;font-size:24px;line-height:1;color:#64748b;cursor:pointer;padding:0 4px}.subtext-modal-close-btn:hover{color:#0f172a}.subtext-modal-tabs{display:flex;background:#f1f5f9;padding:4px 16px 0;border-bottom:1px solid #e2e8f0;gap:4px}.subtext-tab-btn{border:none;background:transparent;padding:9px 14px;font-size:13px;font-weight:500;color:#64748b;border-bottom:2px solid transparent;cursor:pointer;transition:all .15s ease}.subtext-tab-btn:hover{color:#0f172a}.subtext-tab-btn.active{color:#2563eb;border-bottom:2px solid #2563eb;font-weight:600;background:#fff;border-radius:6px 6px 0 0}.subtext-modal-body{padding:18px 20px;overflow-y:auto;flex:1}.subtext-form-row{margin-bottom:12px;display:flex;flex-direction:column;gap:4px}.subtext-form-row label{font-size:12px;font-weight:600;color:#334155}.subtext-form-row input,.subtext-form-row select{padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;width:100%;box-sizing:border-box}.subtext-form-row input:focus,.subtext-form-row select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.subtext-form-row-checkbox{margin:10px 0;display:flex;align-items:center}.subtext-form-row-checkbox label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#334155;cursor:pointer}.subtext-form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-hint{font-size:11px;color:#64748b}.subtext-divider{border:none;border-top:1px solid #e2e8f0;margin:14px 0}.card-config-header-row{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-bottom:14px}.card-config-body{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.badges-config-section{border:1px solid #e2e8f0;border-radius:6px;padding:10px;background:#f8fafc;margin-top:8px}.badges-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.badges-header label{font-size:12px;font-weight:600;color:#334155}.add-badge-btn{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0;padding:3px 8px;font-size:11px;border-radius:4px;font-weight:600;cursor:pointer}.add-badge-btn:hover{background:#dcfce7}.badge-item-row{display:flex;gap:6px;align-items:center;margin-bottom:6px}.badge-field-input{flex:1.2;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-icon-select{flex:.9;padding:5px 6px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-label-input{flex:.9;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.remove-badge-btn{background:none;border:none;color:#ef4444;font-size:18px;line-height:1;cursor:pointer;padding:0 4px}.card-live-preview-box{border:1px solid #e2e8f0;border-radius:8px;padding:12px;background:#f8fafc;display:flex;flex-direction:column;gap:8px;align-self:flex-start}.preview-tag{font-size:10px;font-weight:700;letter-spacing:.5px;color:#64748b}.sample-card-container{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:10px;display:flex;gap:12px;box-shadow:0 2px 6px #0000000d}.sample-card-image{width:76px;height:52px;border-radius:6px;background:#f1f5f9;border:1px solid #e2e8f0;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}.sample-img-placeholder{font-size:10px;color:#94a3b8;text-align:center}.sample-img-placeholder.has-img{display:flex;flex-direction:column;align-items:center;gap:2px}.img-field-label{font-size:9px;color:#2563eb;font-weight:600;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sample-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.sample-card-title{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.2}.sample-card-subtitle{font-size:11px;color:#556987;line-height:1.2}.sample-card-badges{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}.sample-badge-pill{background:#f0f4f9;color:#27406b;font-size:9px;font-weight:600;padding:2px 5px;border-radius:3px;display:inline-flex;align-items:center;gap:2px}.subtext-modal-footer{display:flex;justify-content:flex-end;gap:10px;padding:12px 20px;border-top:1px solid #e2e8f0;background:#f8fafc}.btn-cancel{background:#fff;border:1px solid #cbd5e1;padding:7px 16px;border-radius:6px;font-size:13px;font-weight:500;color:#475569;cursor:pointer}.btn-cancel:hover{background:#f1f5f9}.btn-save{background:#2563eb;border:1px solid #2563eb;padding:7px 18px;border-radius:6px;font-size:13px;font-weight:600;color:#fff;cursor:pointer}.btn-save:hover{background:#1d4ed8}.style-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0f7ff;border:1px solid #bfdbfe;border-radius:8px}.style-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.style-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#1e3a8a}.style-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.style-status-badge.configured{background:#dcfce7;color:#15803d}.style-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.style-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.style-modal-open-btn:hover{background:#1d4ed8}.style-modal-container{max-width:680px}.options-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px}.options-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.options-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#166534}.options-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.options-status-badge.configured{background:#dcfce7;color:#15803d}.options-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.options-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#16a34a;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.options-modal-open-btn:hover{background:#15803d}.options-modal-container{max-width:760px}.options-modal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.options-search-box{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #cbd5e1;border-radius:6px;padding:6px 10px;flex:1;max-width:380px}.options-filter-input{border:none;outline:none;background:transparent;font-size:13px;color:#0f172a;width:100%}.options-add-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:background .15s ease}.options-add-btn:hover{background:#1d4ed8}.options-modal-body{padding:16px 20px;overflow-y:auto;max-height:520px}.options-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.empty-title{margin:12px 0 4px;font-size:15px;font-weight:600;color:#1e293b}.empty-desc{margin:0;font-size:13px;color:#64748b}.options-table-wrapper{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;background:#fff}.options-table-header{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:10px 14px;background:#f1f5f9;font-size:11px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #e2e8f0}.options-table-body{display:flex;flex-direction:column}.modal-option-table-row{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid #f1f5f9;transition:background .12s ease}.modal-option-table-row:last-child{border-bottom:none}.modal-option-table-row:hover{background:#f8fafc}.index-pill{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#475569;font-size:11px;font-weight:600}.reorder-buttons{display:flex;align-items:center;gap:4px}.btn-arrow{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:4px;font-size:9px;color:#475569;cursor:pointer;transition:all .12s ease}.btn-arrow:hover:not(:disabled){background:#2563eb;color:#fff;border-color:#2563eb}.btn-arrow:disabled{opacity:.35;cursor:not-allowed}.modal-drag-grip{font-size:14px;color:#94a3b8;cursor:grab;padding:0 4px;-webkit-user-select:none;user-select:none}.modal-drag-grip:active{cursor:grabbing}.options-input{width:100%;padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;box-sizing:border-box}.options-input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb1a}.btn-delete-option{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:transparent;border:none;border-radius:4px;color:#94a3b8;cursor:pointer;transition:all .12s ease}.btn-delete-option:hover{background:#fee2e2;color:#dc2626}.options-live-preview-box{margin-top:16px;padding:14px 16px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.preview-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.preview-title{font-size:12px;font-weight:600;color:#334155}.preview-tag{font-size:10px;font-weight:600;padding:2px 7px;border-radius:10px;background:#e2e8f0;color:#475569}.preview-select-mock{width:100%}.mock-dropdown-select{width:100%;padding:8px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:13px;color:#334155;box-sizing:border-box}.action-buttons-sidebar-container{margin-top:15px;border:1px solid var(--fb-border-default, #e2e8f0);padding:14px;border-radius:10px;background-color:var(--fb-surface-secondary, #f8fafc)}.action-buttons-sidebar-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.action-buttons-sidebar-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--fb-text-primary, #0f172a)}.action-buttons-sidebar-title svg{stroke:var(--fb-action-surface, #0275ff)}.add-action-button-btn{display:inline-flex;align-items:center;gap:4px;background-color:var(--fb-action-surface, #0275ff);color:var(--fb-text-on-action, #ffffff);border:1px solid var(--fb-action-border, #0275ff);padding:5px 10px;border-radius:6px;font-size:11px;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.add-action-button-btn:hover{background-color:var(--fb-action-surface-hover, #0056b3);border-color:var(--fb-action-surface-hover, #0056b3)}.action-buttons-card-list{display:flex;flex-direction:column;gap:8px}.action-button-summary-card{background-color:var(--fb-surface-elevated, #ffffff);border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:6px;transition:border-color .15s ease,box-shadow .15s ease}.action-button-summary-card:hover{border-color:var(--fb-action-surface, #0275ff);box-shadow:0 2px 8px #0000000d}.action-button-card-top{display:flex;align-items:center;justify-content:space-between}.action-button-card-info{display:flex;align-items:center;gap:8px}.action-button-card-name{font-size:13px;font-weight:600;color:var(--fb-text-primary, #0f172a)}.action-button-card-event{font-size:11px;color:var(--fb-text-secondary, #64748b);background-color:var(--fb-surface-tertiary, #f1f5f9);padding:2px 6px;border-radius:4px}.action-button-card-actions{display:flex;align-items:center;gap:4px}.action-card-btn{background:none;border:1px solid transparent;border-radius:4px;padding:4px 6px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background-color .15s ease,color .15s ease}.action-card-btn.edit{color:var(--fb-action-surface, #0275ff)}.action-card-btn.edit:hover{background-color:var(--fb-selected-bg, #eff6ff);border-color:var(--fb-selected-border, #bfdbfe)}.action-card-btn.remove{color:var(--fb-error-text, #ef4444)}.action-card-btn.remove:hover{background-color:var(--fb-error-surface, #fef2f2);border-color:var(--fb-error-border, #fecaca)}.action-button-card-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.action-card-badge{font-size:10px;font-weight:500;padding:2px 6px;border-radius:4px;background-color:var(--fb-surface-tertiary, #f1f5f9);color:var(--fb-text-secondary, #475569);border:1px solid var(--fb-border-subtle, #e2e8f0)}.action-card-badge.method{background-color:var(--fb-info-surface, #eff6ff);color:var(--fb-info-text, #1d4ed8);border-color:var(--fb-info-border, #bfdbfe);font-weight:600}.action-card-badge.confirm{background-color:var(--fb-warning-surface, #fffbeb);color:var(--fb-warning-text, #b45309);border-color:var(--fb-warning-border, #fef08a)}.action-card-badge.rules{background-color:var(--fb-success-surface, #f0fdf4);color:var(--fb-success-text, #15803d);border-color:var(--fb-success-border, #bbf7d0);font-weight:600}.action-buttons-empty{text-align:center;padding:16px;font-size:12px;color:var(--fb-text-muted, #94a3b8);border:1px dashed var(--fb-border-default, #cbd5e1);border-radius:6px;background:var(--fb-surface-elevated, #ffffff)}.button-modal-backdrop{position:fixed;inset:0;background:var(--fb-backdrop, rgba(15, 23, 42, .6));backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:10000}.button-modal-container{background:var(--fb-surface-elevated, #ffffff);border-radius:10px;box-shadow:0 20px 45px #00000040;width:90%;max-width:680px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;animation:modalFadeIn .2s ease-out}.button-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid var(--fb-border-default, #e2e8f0);background:var(--fb-surface-secondary, #f8fafc)}.button-modal-title{font-size:16px;font-weight:700;color:var(--fb-text-primary, #0f172a);margin:0}.button-modal-element-tag{font-size:11px;font-weight:500;color:var(--fb-text-secondary, #475569);background:var(--fb-surface-tertiary, #e2e8f0);padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px}.button-modal-close-btn{background:none;border:none;font-size:24px;line-height:1;color:var(--fb-text-muted, #64748b);cursor:pointer;padding:0 4px;transition:color .15s ease}.button-modal-close-btn:hover{color:var(--fb-text-primary, #0f172a)}.button-modal-tabs{display:flex;background:var(--fb-surface-tertiary, #f1f5f9);border-bottom:1px solid var(--fb-border-default, #e2e8f0);padding:0 16px;gap:4px;overflow-x:auto}.button-tab-btn{background:none;border:none;border-bottom:2px solid transparent;padding:10px 14px;font-size:12px;font-weight:600;color:var(--fb-text-secondary, #475569);cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:all .15s ease;white-space:nowrap}.button-tab-btn:hover{color:var(--fb-text-primary, #0f172a);background:var(--fb-nav-hover, rgba(0, 0, 0, .03))}.button-tab-btn.active{color:var(--fb-action-surface, #0275ff);border-bottom-color:var(--fb-action-surface, #0275ff);background:var(--fb-surface-elevated, #ffffff)}.tab-badge{font-size:10px;font-weight:700;background:var(--fb-action-surface, #0275ff);color:var(--fb-text-on-action, #ffffff);padding:1px 6px;border-radius:10px}.button-modal-body{padding:20px;overflow-y:auto;flex:1;background:var(--fb-surface-elevated, #ffffff)}.button-modal-tab-content{display:flex;flex-direction:column;gap:14px}.button-form-row{display:flex;flex-direction:column;gap:5px}.button-form-row label{font-size:12px;font-weight:600;color:var(--fb-text-primary, #1e293b)}.button-form-row input[type=text],.button-form-row input[type=number],.button-form-row select{padding:8px 10px;border:1px solid var(--fb-input-border, #cbd5e1);border-radius:6px;font-size:13px;color:var(--fb-text-primary, #0f172a);background:var(--fb-input-bg, #ffffff);box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.button-form-row input[type=text]:focus,.button-form-row input[type=number]:focus,.button-form-row select:focus{outline:none;border-color:var(--fb-input-focus, #0275ff);box-shadow:0 0 0 3px var(--fb-focus-ring, rgba(2, 117, 255, .15))}.button-form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.button-form-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}.button-checkbox-label{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;color:var(--fb-text-primary, #1e293b)}.button-checkbox-label input[type=checkbox]{width:16px;height:16px;cursor:pointer;accent-color:var(--fb-action-surface, #0275ff)}.button-color-input{width:100%;height:38px;padding:2px 4px;border:1px solid var(--fb-input-border, #cbd5e1);border-radius:6px;cursor:pointer;background:var(--fb-input-bg, #ffffff);box-sizing:border-box}.button-rules-section{padding:10px 14px;background:var(--fb-surface-secondary, #f8fafc);border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px}.button-rules-header{display:flex;align-items:center;justify-content:space-between;margin-top:10px;padding-bottom:8px;border-bottom:1px solid var(--fb-border-default, #e2e8f0)}.button-rules-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--fb-text-primary, #0f172a)}.button-rules-count{font-size:11px;background:var(--fb-surface-tertiary, #e2e8f0);color:var(--fb-text-secondary, #475569);padding:1px 7px;border-radius:10px}.btn-add-rule{background:var(--fb-action-surface, #0275ff);color:var(--fb-text-on-action, #ffffff);border:1px solid var(--fb-action-border, #0275ff);padding:5px 12px;border-radius:6px;font-size:11px;font-weight:600;cursor:pointer;transition:background-color .15s ease}.btn-add-rule:hover{background:var(--fb-action-surface-hover, #0056b3)}.button-rules-list{display:flex;flex-direction:column;gap:10px;margin-top:10px}.button-rule-card{background:var(--fb-surface-secondary, #f8fafc);border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px;padding:12px}.button-rule-card-header{display:flex;align-items:center;gap:10px}.button-rule-num{font-size:12px;font-weight:700;color:var(--fb-text-muted, #64748b)}.button-rule-type-select{display:flex;align-items:center;gap:6px;flex:1}.button-rule-type-select label{font-size:11px;font-weight:600;color:var(--fb-text-secondary, #475569)}.button-rule-type-select select{padding:4px 8px;font-size:12px;border-radius:4px;border:1px solid var(--fb-input-border, #cbd5e1);background:var(--fb-input-bg, #ffffff);color:var(--fb-text-primary, #0f172a)}.btn-rule-remove{background:none;border:none;font-size:18px;line-height:1;color:var(--fb-error-text, #ef4444);cursor:pointer;padding:2px 6px;border-radius:4px;transition:background-color .15s ease}.btn-rule-remove:hover{background:var(--fb-error-surface, #fef2f2)}.button-rules-empty{text-align:center;padding:16px;font-size:12px;color:var(--fb-text-muted, #94a3b8);border:1px dashed var(--fb-border-default, #cbd5e1);border-radius:6px;background:var(--fb-surface-secondary, #f8fafc)}.button-modal-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:12px 20px;background:var(--fb-surface-secondary, #f8fafc);border-top:1px solid var(--fb-border-default, #e2e8f0)}.button-modal-footer .btn-cancel{background:var(--fb-surface-elevated, #ffffff);border:1px solid var(--fb-border-default, #cbd5e1);color:var(--fb-text-primary, #334155);padding:8px 16px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.button-modal-footer .btn-cancel:hover{background:var(--fb-surface-tertiary, #f1f5f9);border-color:var(--fb-border-strong, #94a3b8)}.button-modal-footer .btn-save{background:var(--fb-action-surface, #0275ff);border:1px solid var(--fb-action-border, #0275ff);color:var(--fb-text-on-action, #ffffff);padding:8px 18px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.button-modal-footer .btn-save:hover{background:var(--fb-action-surface-hover, #0056b3);border-color:var(--fb-action-surface-hover, #0056b3)}.button-modal-footer .btn-save:disabled{opacity:.5;cursor:not-allowed;background:var(--fb-action-disabled, #94a3b8);border-color:var(--fb-action-disabled, #94a3b8)}.button-row-header-between{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.cel-badge{font-size:10px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:var(--fb-text-muted, #64748b);background:var(--fb-surface-tertiary, #f1f5f9);border:1px solid var(--fb-border-subtle, #e2e8f0);padding:1px 6px;border-radius:4px}.button-form-textarea{width:100%;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;line-height:1.45;padding:8px 10px;border:1px solid var(--fb-input-border, #cbd5e1);border-radius:6px;background:var(--fb-input-bg, #ffffff);color:var(--fb-text-primary, #1e293b);outline:none;resize:vertical;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.button-form-textarea:focus{border-color:var(--fb-input-focus, #0275ff);box-shadow:0 0 0 2px var(--fb-focus-ring, rgba(2, 117, 255, .2))}.button-form-textarea.is-invalid,.button-form-row input.is-invalid{border-color:var(--fb-error-border, #ef4444)!important;background-color:var(--fb-error-surface, #fef2f2)}.cel-feedback{display:flex;align-items:center;gap:6px;font-size:11px;line-height:1.3;margin-top:4px}.cel-feedback.valid{color:var(--fb-success-text, #16a34a)}.cel-feedback.invalid{color:var(--fb-error-text, #dc2626);font-weight:500}.cel-icon{font-size:12px;font-weight:700}\n"] }]
69240
+ args: [{ selector: 'app-properties', standalone: true, imports: [CommonModule, FormsModule, ImageCropperComponent, NxtSearchBox, NgClass, GetValueByPathPipe, NxtCustomTranslatePipe, FormulaInputComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- AP 22JAN25 - Field and Element Properties -->\n\n<div class=\"container\">\n <div class=\"tabs\">\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'attributes'}\" (click)=\"setActiveTab('attributes')\">{{ 'ATTRIBUTES' | nxtCustomTranslate : 'Attributes' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'property'}\" (click)=\"setActiveTab('property')\">{{ 'PROPERTY' | nxtCustomTranslate : 'Property' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'appearance'}\" (click)=\"setActiveTab('appearance')\">{{ 'APPEARANCE' | nxtCustomTranslate : 'Appearance' }}</div>\n </div>\n @if (activeTab() === 'attributes') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @defer (when selectedElement()?.type === 'Image') {\n @if (selectedElement().imageData) {\n <image-cropper\n [imageBase64]=\"selectedElement().orgImageData\"\n [disabled]=\"false\"\n [alignImage]=\"alignImage\"\n [roundCropper]=\"roundCropper\"\n [backgroundColor]=\"'white'\"\n imageAltText=\"Alternative image text\"\n [allowMoveImage]=\"false\"\n [hideResizeSquares]=\"false\"\n [canvasRotation]=\"canvasRotation()\"\n [aspectRatio]=\"aspectRatio\"\n [containWithinAspectRatio]=\"false\"\n [maintainAspectRatio]=\"false\"\n [cropperStaticWidth]=\"cropperStaticWidth\"\n [cropperStaticHeight]=\"cropperStaticHeight\"\n [cropperMinWidth]=\"cropperMinWidth\"\n [cropperMinHeight]=\"cropperMinHeight\"\n [cropperMaxWidth]=\"cropperMaxWidth\"\n [cropperMaxHeight]=\"cropperMaxHeight\"\n [resetCropOnAspectRatioChange]=\"true\"\n [(cropper)]=\"cropper\"\n [(transform)]=\"transform\"\n [onlyScaleDown]=\"true\"\n output=\"blob\"\n format=\"png\"\n (imageCropped)=\"imageCropped($event)\"\n (cropperReady)=\"cropperReady($event)\"\n ></image-cropper>\n }\n @if (selectedElement().imageData) {\n <div style=\"display: flex; gap: 2px;\">\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateLeft()\" title=\"{{ 'ROTATE_LEFT' | nxtCustomTranslate : 'Rotate Left' }}\">\u27F2</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateRight()\" title=\"{{ 'ROTATE_RIGHT' | nxtCustomTranslate : 'Rotate Right' }}\">\u27F3</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomOut()\" title=\"{{ 'ZOOM_OUT' | nxtCustomTranslate : 'Zoom Out' }}\">-</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomIn()\" title=\"{{ 'ZOOM_IN' | nxtCustomTranslate : 'Zoom In' }}\">+</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveLeft()\" title=\"{{ 'MOVE_LEFT' | nxtCustomTranslate : 'Move Left' }}\">\u2190</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveRight()\" title=\"{{ 'MOVE_RIGHT' | nxtCustomTranslate : 'Move Right' }}\">\u2192</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveUp()\" title=\"{{ 'MOVE_UP' | nxtCustomTranslate : 'Move Up' }}\">\u2191</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveDown()\" title=\"{{ 'MOVE_DOWN' | nxtCustomTranslate : 'Move Down' }}\">\u2193</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipHorizontal()\" [ngClass]=\"{'enabled': transform().flipH}\" title=\"{{ 'FLIP_HORIZONTALLY' | nxtCustomTranslate : 'Flip Horizontally' }}\">\u2194</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipVertical()\" [ngClass]=\"{'enabled': transform().flipV}\" title=\"{{ 'FLIP_VERTICALLY' | nxtCustomTranslate : 'Flip Vertically' }}\">\u2195</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"resetImage()\" title=\"{{ 'RESET' | nxtCustomTranslate : 'Reset' }}\">\u00D7</div>\n </div>\n }\n }\n @if (selectedElement()?.type === 'Book') {\n <div>\n <label class=\"text-sm\">{{ 'SEARCH_BOOK' | nxtCustomTranslate : 'Search Book' }}</label>\n <div style=\"display: flex; gap: 2px; align-items: center; justify-content: center;\">\n <nxt-search-box\n [question]=\"selectedElement()\"\n [apiMeta]=\"bookSubtext()\"\n [placeHolderText]=\"'SEARCH' | nxtCustomTranslate : 'Search...'\"\n (searchValueChange)=\"childEventCapture($event.value)\"\n ></nxt-search-box>\n <div class=\"link-icon\">\n <svg (click)=\"linkToggleDropdown($event)\" fill=\"#000000\" version=\"1.1\" id=\"Capa_1\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24px\" height=\"24px\"\n viewBox=\"0 0 450 450\" xml:space=\"preserve\">\n <g>\n <g>\n <g>\n <path d=\"M318.15,230.195l77.934-77.937c31.894-31.892,31.894-83.782-0.004-115.674l-12.66-12.66\n c-31.893-31.896-83.78-31.896-115.674-0.004l-77.937,77.934c-17.588,17.588-25.457,41.264-23.646,64.311\n c-23.045-1.813-46.722,6.056-64.308,23.647L23.92,267.748c-31.894,31.889-31.894,83.779,0,115.674l12.664,12.662\n c31.893,31.893,83.783,31.893,115.674,0l77.935-77.936c17.592-17.59,25.459-41.266,23.647-64.309\n C276.884,255.654,300.56,247.783,318.15,230.195z M202.653,290.605l-77.936,77.938c-16.705,16.703-43.889,16.703-60.59,0\n l-12.666-12.666c-16.705-16.701-16.703-43.885,0-60.594l77.936-77.932c14.14-14.141,35.779-16.306,52.226-6.516l-32.302,32.307\n c-7.606,7.604-7.606,19.938,0,27.541c7.605,7.607,19.937,7.607,27.541,0l32.306-32.303\n C218.959,254.828,216.795,276.469,202.653,290.605z M238.382,209.169l32.299-32.306c7.608-7.602,7.608-19.935,0-27.538\n c-7.604-7.61-19.936-7.61-27.541-0.004l-32.303,32.303c-9.791-16.446-7.627-38.087,6.514-52.226l77.935-77.935\n c16.707-16.707,43.89-16.707,60.594,0l12.664,12.664c16.705,16.705,16.705,43.886,0,60.591l-77.936,77.937\n C276.468,216.797,254.828,218.959,238.382,209.169z\" />\n <path d=\"M343.466,261.465c-45.287,0-82,36.713-82,82s36.713,82,82,82c45.286,0,82-36.713,82-82S388.753,261.465,343.466,261.465z\n M372.505,333.564l-56.046,56.104c-0.239,0.238-0.536,0.41-0.862,0.496l-22.315,5.85c-0.649,0.168-1.347-0.02-1.822-0.494\n c-0.477-0.479-0.666-1.172-0.496-1.824l5.826-22.318c0.084-0.326,0.256-0.627,0.494-0.863l56.047-56.104\n c0.742-0.742,1.945-0.744,2.688-0.002l4.548,4.541c0.739,0.74,0.741,1.943,0,2.688l-37.433,37.471l4.709,4.703l37.435-37.471\n c0.739-0.742,1.94-0.742,2.682-0.002l4.55,4.541C373.25,331.617,373.25,332.822,372.505,333.564z M395.472,310.574l-17,17.018\n c-0.739,0.744-1.942,0.744-2.685,0.002l-16.489-16.475c-0.744-0.74-0.744-1.943-0.002-2.688l17-17.02\n c0.741-0.74,1.944-0.74,2.688-0.002l16.487,16.477C396.216,308.629,396.216,309.832,395.472,310.574z\" />\n </g>\n </g>\n </g>\n </svg>\n @if (isLinkDropdownOpen()) {\n <div class=\"link-dropdown-menu\" #dropdown>\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().endpoint\" (ngModelChange)=\"updateBookSubtext('endpoint', $event)\" />\n <label>{{ 'VARIABLE' | nxtCustomTranslate : 'Variable' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().variable\" (ngModelChange)=\"updateBookSubtext('variable', $event)\" />\n <label>{{ 'FIELD' | nxtCustomTranslate : 'Field' }}:</label>\n <input type=\"text\" [ngModel]=\"fieldAsString()\" (ngModelChange)=\"updateField($event)\" />\n <label>{{ 'DEFAULT_FIELD' | nxtCustomTranslate : 'Default Field' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().defaultField\" (ngModelChange)=\"updateBookSubtext('defaultField', $event)\" />\n </div>\n }\n </div>\n </div>\n </div>\n }\n @for (prop of getProperties()?.elementProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'checkbox' && prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.isTranslate && formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if (((selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? selectColumn() : selectedElement().id) + '.' + prop.key | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n <!-- Copy Icon -->\n @if (!copied) {\n <svg\n (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" transform=\"rotate(0)\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#CCCCCC\" stroke-width=\"0.048\"></g><g id=\"SVGRepo_iconCarrier\"> <g id=\"style=stroke\"> <g id=\"copy\"> <path id=\"rec (Stroke)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 5.25C6.25 2.50265 8.43733 0.25 11.1667 0.25H17.8333C20.5627 0.25 22.75 2.50265 22.75 5.25V13.75C22.75 16.4974 20.5627 18.75 17.8333 18.75C17.4191 18.75 17.0833 18.4142 17.0833 18C17.0833 17.5858 17.4191 17.25 17.8333 17.25C19.7064 17.25 21.25 15.6971 21.25 13.75V5.25C21.25 3.30293 19.7064 1.75 17.8333 1.75H11.1667C9.29363 1.75 7.75 3.30293 7.75 5.25C7.75 5.66421 7.41421 6 7 6C6.58579 6 6.25 5.66421 6.25 5.25Z\" fill=\"#000000\"></path> <path id=\"rec (Stroke)_2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 10.25C1.25 7.50265 3.43733 5.25 6.16667 5.25H12.8333C15.5627 5.25 17.75 7.50265 17.75 10.25V18.75C17.75 21.4974 15.5627 23.75 12.8333 23.75H6.16667C3.43733 23.75 1.25 21.4974 1.25 18.75V10.25ZM6.16667 6.75C4.29363 6.75 2.75 8.30293 2.75 10.25V18.75C2.75 20.6971 4.29363 22.25 6.16667 22.25H12.8333C14.7064 22.25 16.25 20.6971 16.25 18.75V10.25C16.25 8.30293 14.7064 6.75 12.8333 6.75H6.16667Z\" fill=\"#000000\"></path> </g> </g> </g></svg>\n }\n <!-- Copied Message -->\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n @if (prop.key === 'helpText' && selectedElement()?.helpText) {\n <div>{{ selectedElement()?.helpText }}</div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'number') {\n <input\n type=\"number\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n }\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n <span class=\"toggle-label\" style=\"padding-left: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n </div>\n }\n @if (prop.type === 'subQuestion') {\n <div>\n <div style=\"display: flex; flex-direction: row; gap: 10px; align-items: center;\">\n <div>{{ prop.labelPath | nxtCustomTranslate : prop.label }}</div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n @if (selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)) {\n <div>\n @for (subProp of prop.subQuestion; track subProp) {\n <div style=\"background-color: #e7f2ff; padding: 8px; border-radius: 4px;\">\n <div class=\"form-group\">\n <label>{{ subProp.labelPath | nxtCustomTranslate : subProp.label }}</label>\n @if (subProp.type === 'array') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"subProp.operands ? subProp.operands.includes(column.apiName) : false\"\n (change)=\"onCheckboxChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName, $event.target.checked)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'radio') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"radio\"\n [name]=\"subProp.key\"\n [value]=\"column.apiName\"\n [checked]=\"getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) === column.apiName\"\n (change)=\"onRadioChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"subProp.placeholder\"\n [ngModel]=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) : (selectedElement() | getValueByPath : subProp.key)) : (selectedElement() | getValueByPath : subProp.key)\"\n (ngModelChange)=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event,false, prop.isTranslate) : setValueByPath(subProp.key, $event)) : setValueByPath(subProp.key, $event, prop.isTranslate)\"\n />\n }\n @if (subProp.type === 'boolean') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n @if (subProp.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? (getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, subProp.isTableColumn)) : (selectedElement() | getValueByPath : subProp.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event, subProp.isTableColumn, prop.isTranslate) : setValueByPath(subProp.key, $event, prop.isTranslate))\"\n >\n @for (option of subProp.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (subProp.type === 'checkbox') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n @if (prop.type === 'align') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onAlignSelect(option.value)\" [ngClass]=\"{'active': selectedElement()?.textAlign === option.value}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'style') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onStyleSelect(option.value)\" [ngClass]=\"{'active': isStyleActive(option.value)}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'color') {\n <div>\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n @if (prop.key === 'title') {\n <!-- MR 17NOV26 Compact Action Buttons in Sidebar -->\n <div class=\"action-buttons-sidebar-container\">\n <div class=\"action-buttons-sidebar-header\">\n <div class=\"action-buttons-sidebar-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <rect x=\"3\" y=\"6\" width=\"18\" height=\"12\" rx=\"3\"></rect>\n <path d=\"M7 12h10\"></path>\n </svg>\n <span>{{ 'ACTION_BUTTONS' | nxtCustomTranslate : 'Action Buttons' }}</span>\n </div>\n <button type=\"button\" (click)=\"openAddButtonModal()\" class=\"add-action-button-btn\">\n + {{ 'ADD_BUTTON' | nxtCustomTranslate : 'Add Button' }}\n </button>\n </div>\n\n <div class=\"action-buttons-card-list\">\n @for (btn of book()?.questionbook?.action || []; track btn.id || $index; let i = $index) {\n <div class=\"action-button-summary-card\">\n <div class=\"action-button-card-top\">\n <div class=\"action-button-card-info\">\n <span class=\"action-button-card-name\">{{ btn.name || ('UNNAMED' | nxtCustomTranslate : 'Unnamed') }}</span>\n <span class=\"action-button-card-event\">{{ btn.eventtoemit || 'default' }}</span>\n </div>\n <div class=\"action-button-card-actions\">\n <button type=\"button\" class=\"action-card-btn edit\" (click)=\"openEditButtonModal(i)\" title=\"Edit Button\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n </button>\n <button type=\"button\" class=\"action-card-btn remove\" (click)=\"removeButton(btn)\" title=\"Remove Button\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <polyline points=\"3 6 5 6 21 6\"></polyline>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path>\n </svg>\n </button>\n </div>\n </div>\n <div class=\"action-button-card-meta\">\n <span class=\"action-card-badge\">ID: {{ btn.id }}</span>\n @if (btn.method) {\n <span class=\"action-card-badge method\">{{ btn.method }}</span>\n }\n @if (btn.positionPercent !== undefined && btn.positionPercent !== null) {\n <span class=\"action-card-badge\">{{ btn.positionPercent }}%</span>\n }\n @if (btn.enableConfirm) {\n <span class=\"action-card-badge confirm\">Confirm</span>\n }\n @if (btn.rules && btn.rules.length > 0) {\n <span class=\"action-card-badge rules\">{{ btn.rules.length }} Rule{{ btn.rules.length > 1 ? 's' : '' }}</span>\n }\n </div>\n </div>\n }\n @if (!book()?.questionbook?.action?.length) {\n <div class=\"action-buttons-empty\">\n <span>{{ 'NO_BUTTONS_CONFIGURED' | nxtCustomTranslate : 'No footer buttons configured.' }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n @if (selectedElement()?.type === 'Date' || selectedElement()?.type === 'DateTime') {\n <div>\n <div class=\"text-sm\">\n {{ 'DATE_RANGE' | nxtCustomTranslate : 'Date Range' }}\n </div>\n <div style=\"display: flex; gap: 2px; align-items: center;\">\n <!-- Minimum Date -->\n <div>\n <label class=\"text-sm\">Minimum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'minDate') === 'today'\"\n (change)=\"setValueByPath('minDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'minDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'minDate') \n : null\"\n (ngModelChange)=\"setValueByPath('minDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'minDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n <!-- Maximum Date -->\n <div>\n <label class=\"text-sm\">Maximum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n (change)=\"setValueByPath('maxDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'maxDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'maxDate') \n : null\"\n (ngModelChange)=\"setValueByPath('maxDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (activeTab() === 'property') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n <label>Id</label>\n <div style=\"font-size: 13px; padding: 11px; border-radius: 5px; background-color: #f8f8f8; border: 1px solid #ddd;\">\n {{ headerSelect() ? bookId() : selectedElement()?.id }}\n </div>\n @for (prop of getProperties()?.fieldProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.type === 'toggleGroup') {\n <div class=\"toggle-group\">\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', true) : (selectedElement() | getValueByPath : 'isOptional')) : (selectedElement() | getValueByPath : 'isOptional')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', $event, true, prop.isTranslate) : onToggleChange('isOptional', $event)) : onToggleChange('isOptional', $event)\"\n />\n {{ 'REQUIRED' | nxtCustomTranslate : 'Required' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', true) : (selectedElement() | getValueByPath : 'isReadOnly')) : (selectedElement() | getValueByPath : 'isReadOnly')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', $event, true, prop.isTranslate) : onToggleChange('isReadOnly', $event)) : onToggleChange('isReadOnly', $event)\"\n />\n {{ 'READ_ONLY' | nxtCustomTranslate : 'Read Only' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', true) : (selectedElement() | getValueByPath : 'isHidden')) : (selectedElement() | getValueByPath : 'isHidden')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', $event, true, prop.isTranslate) : onToggleChange('isHidden', $event)) : onToggleChange('isHidden', $event)\"\n />\n {{ 'IS_HIDE' | nxtCustomTranslate : 'Is Hide' }}\n </label>\n </div>\n </div>\n }\n <!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n @if ( prop.type === 'checkbox' || prop.type === 'radio' || prop.key === 'options') {\n <div class=\"options-sidebar-trigger-wrapper\">\n <div class=\"options-trigger-header\">\n <div class=\"options-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <line x1=\"8\" y1=\"6\" x2=\"21\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"12\" x2=\"21\" y2=\"12\"></line>\n <line x1=\"8\" y1=\"18\" x2=\"21\" y2=\"18\"></line>\n <line x1=\"3\" y1=\"6\" x2=\"3.01\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"12\" x2=\"3.01\" y2=\"12\"></line>\n <line x1=\"3\" y1=\"18\" x2=\"3.01\" y2=\"18\"></line>\n </svg>\n <span>{{ prop.labelPath | nxtCustomTranslate : prop.label || 'Options' }}</span>\n </div>\n <span class=\"options-status-badge\" [class.configured]=\"getOptionsCount(prop.key) > 0\">\n {{ getOptionsCount(prop.key) }} {{ getOptionsCount(prop.key) === 1 ? 'Option' : 'Options' }}\n </span>\n </div>\n <p class=\"options-trigger-hint\">Manage choices, display labels, stored values, and option ordering.</p>\n <button type=\"button\" class=\"options-modal-open-btn\" (click)=\"openOptionsModal(prop.key)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Options ({{ getOptionsCount(prop.key) }})</span>\n </button>\n </div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'subQuestion') {\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n <div class=\"subtext-sidebar-trigger-wrapper\">\n <div class=\"subtext-trigger-header\">\n <div class=\"subtext-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>\n </svg>\n <span>Sub Text (API & Layout)</span>\n </div>\n @if (hasSubTextConfigured()) {\n <span class=\"subtext-status-badge configured\">Configured</span>\n } @else {\n <span class=\"subtext-status-badge\">Not Set</span>\n }\n </div>\n <p class=\"subtext-trigger-hint\">Configure API endpoint, live search queries, dependent fields, and card layout.</p>\n <button type=\"button\" class=\"subtext-modal-open-btn\" (click)=\"openSubTextModal(prop)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Sub Text</span>\n </button>\n </div>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <span class=\"toggle-label\" style=\"padding-right: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key , prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) :setValueByPath(prop.key, $event, prop.isTranslate) ) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n </div>\n }\n <!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n <div class=\"style-sidebar-trigger-wrapper\">\n <div class=\"style-trigger-header\">\n <div class=\"style-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <path d=\"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z\"></path>\n </svg>\n <span>{{ 'STYLE' | nxtCustomTranslate : 'Style' }}</span>\n </div>\n @if (hasStyleConfigured()) {\n <span class=\"style-status-badge configured\">Customized</span>\n } @else {\n <span class=\"style-status-badge\">Default</span>\n }\n </div>\n <p class=\"style-trigger-hint\">Configure CSS classes, inline styling, text direction, and label visibility.</p>\n <button type=\"button\" class=\"style-modal-open-btn\" (click)=\"openStyleModal()\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M12 20h9\"></path>\n <path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z\"></path>\n </svg>\n <span>Configure Style</span>\n </button>\n </div>\n </div>\n }\n </div>\n}\n\n@if (activeTab() === 'appearance') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @for (prop of getProperties()?.appearance; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n }\n <div class=\"flex-container\">\n @if (prop.type === 'color') {\n <div class=\"color-selector\">\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"selectedElement()?.color\"\n (ngModelChange)=\"setValueByPath('color', $event, prop.isTranslate)\"\n >\n </div>\n }\n @if (prop.type === 'color') {\n <div class=\"hex-input-container\">\n <span>{{ 'HEX_CODE' | nxtCustomTranslate : 'HEX Code' }}</span>\n <input\n type=\"text\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n </div>\n }\n </div>\n @if (prop.type === 'button-toggle') {\n <div class=\"button-toggle-wrapper\">\n <button\n type=\"button\"\n class=\"toggle-button\"\n (click)=\"duplicateField(selectedElement())\"\n >\n {{ 'ADD_DUPLICATE' | nxtCustomTranslate : 'Add Duplicate' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n}\n\n@if (!templateSelected) {\n <div class=\"button-container\">\n <button class=\"save-btn\" (click)=\"handleButtonClick()\">{{ 'SAVE' | nxtCustomTranslate : 'Save' }}</button>\n <button class=\"cancel-btn\" (click)=\"onCancel()\">{{ 'CANCEL' | nxtCustomTranslate : 'Cancel' }}</button>\n </div>\n}\n\n@if (templateSelected) {\n <div class=\"button-container\" style=\"margin-top: 20px;\">\n <button class=\"save-btn\" (click)=\"handleTemplateSave()\">{{ 'SAVE_TEMPLATE' | nxtCustomTranslate : 'Save Template' }}</button>\n </div>\n}\n\n<!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n@if (isSubTextModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeSubTextModal()\">\n <div class=\"subtext-modal-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Sub Text (API & Card Configuration)</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} &bull; {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeSubTextModal()\">&times;</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'api'\" (click)=\"activeSubTextTab = 'api'\">\n API & Data Source\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'dependencies'\" (click)=\"activeSubTextTab = 'dependencies'\">\n Dependencies & Queries\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'card'\" (click)=\"activeSubTextTab = 'card'\">\n Card Presentation\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'other'\" (click)=\"activeSubTextTab = 'other'\">\n Advanced / Files\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: API & Data Source -->\n @if (activeSubTextTab === 'api') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-row\">\n <label>End Point URL (endpoint)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.endpoint\" placeholder=\"/services/apexrest/FusionApiData?type=...\" />\n <small class=\"field-hint\">Base or relative endpoint URL to fetch records from</small>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Variable / Response Key (variable)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.variable\" placeholder=\"data or records (leave blank if root array)\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Default Field / Selected Value (defaultField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.defaultField\" placeholder=\"e.g. name, id\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Search & Display Fields (field)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextFieldsStr\" placeholder=\"e.g. name, code, city\" />\n <small class=\"field-hint\">Fields used for live searching and default two-line fallback display</small>\n </div>\n <!-- MR 05DEC26 Add missing API/reference subText fields -->\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Label Field (labelField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.labelField\" placeholder=\"e.g. name, label\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Value Field (valueField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.valueField\" placeholder=\"e.g. id, _id, code\" />\n </div>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Post Reference Field (postReferenceField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.postReferenceField\" placeholder=\"e.g. workinfo.designation\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Save To Backend (saveToBackend)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.saveToBackend\" placeholder=\"Save To Backend\" />\n </div>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isObject\" />\n <span>Is Object (isObject - emit full record object instead of single scalar string)</span>\n </label>\n </div>\n </div>\n }\n\n <!-- Tab 2: Dependencies & Queries -->\n @if (activeSubTextTab === 'dependencies') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Source Question Id (sourceQuestionId)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.sourceQuestionId\" placeholder=\"Parent question ID\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Dependent Value (dependentValue)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.dependentValue\" placeholder=\"e.g. true or specific value\" />\n </div>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isDependentField\" />\n <span>Is Dependent Field (isDependentField - conditional rendering based on parent value)</span>\n </label>\n </div>\n <hr class=\"subtext-divider\" />\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Live Search Query Parameter (queryParameter)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextQueryParamStr\" placeholder=\"e.g. search, q\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Field in API URL (queryField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryField\" placeholder=\"e.g. customerId\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value / Reference Key (queryValue)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValue\" placeholder=\"e.g. selectedCustomer\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value Reference (queryValueReference)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValueReference\" placeholder=\"e.g. parentRef\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Unique Cache Key (uniqueKey)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.uniqueKey\" placeholder=\"Cache key for local storage\" />\n </div>\n </div>\n }\n\n <!-- Tab 3: Card Layout Presentation -->\n @if (activeSubTextTab === 'card') {\n <div class=\"subtext-tab-content\">\n <div class=\"card-config-header-row\">\n <label class=\"toggle-switch\">\n <input type=\"checkbox\" [(ngModel)]=\"isCardConfigEnabled\" (change)=\"toggleCardConfig(isCardConfigEnabled)\" />\n <span class=\"toggle-slider\"></span>\n </label>\n <div class=\"toggle-text\">\n <strong>Enable Card Layout (cardConfig)</strong>\n <p>Render suggestions as rich cards with thumbnail, primary title, subtitle, and badges</p>\n </div>\n </div>\n\n @if (isCardConfigEnabled) {\n <div class=\"card-config-body\">\n <div class=\"card-config-fields\">\n <div class=\"subtext-form-row\">\n <label>Image Field Name (cardConfig.imageUrl)</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.imageUrl\" placeholder=\"e.g. photoUrl, thumbnail, imageUrl\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Primary Title Field (cardConfig.primary)</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.primary\" placeholder=\"e.g. name, title, hotelName\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Subtitle Field (cardConfig.subTitle)</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.subTitle\" placeholder=\"e.g. summary, duration, description\" />\n </div>\n\n <!-- Badges Section -->\n <div class=\"badges-config-section\">\n <div class=\"badges-header\">\n <label>Badges (cardConfig.badges)</label>\n <button type=\"button\" class=\"add-badge-btn\" (click)=\"addModalBadge()\">+ Add Badge</button>\n </div>\n @for (badge of modalBadges; track $index; let bIdx = $index) {\n <div class=\"badge-item-row\">\n <input type=\"text\" [(ngModel)]=\"badge.field\" placeholder=\"Field name (e.g. city)\" class=\"badge-field-input\" />\n <select [(ngModel)]=\"badge.icon\" class=\"badge-icon-select\">\n <option value=\"\">No Icon</option>\n <option value=\"hotel\">Hotel</option>\n <option value=\"calendar\">Calendar</option>\n <option value=\"location\">Location</option>\n </select>\n <input type=\"text\" [(ngModel)]=\"badge.label\" placeholder=\"Prefix label (optional)\" class=\"badge-label-input\" />\n <button type=\"button\" class=\"remove-badge-btn\" (click)=\"removeModalBadge(bIdx)\">&times;</button>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Card Preview -->\n <div class=\"card-live-preview-box\">\n <span class=\"preview-tag\">LIVE PREVIEW</span>\n <div class=\"sample-card-container\">\n <div class=\"sample-card-image\">\n @if (modalCardConfig.imageUrl) {\n <div class=\"sample-img-placeholder has-img\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\"/>\n <polyline points=\"21 15 16 10 5 21\"/>\n </svg>\n <span class=\"img-field-label\">{{ modalCardConfig.imageUrl }}</span>\n </div>\n } @else {\n <div class=\"sample-img-placeholder\">Image</div>\n }\n </div>\n <div class=\"sample-card-content\">\n <div class=\"sample-card-title\">{{ modalCardConfig.primary || 'Hotel Booking' }}</div>\n <div class=\"sample-card-subtitle\">{{ modalCardConfig.subTitle || '3 nights at Atlantis, Dubai' }}</div>\n @if (modalBadges.length > 0) {\n <div class=\"sample-card-badges\">\n @for (badge of modalBadges; track $index) {\n @if (badge.field) {\n <span class=\"sample-badge-pill\">\n @if (badge.icon === 'hotel') { \uD83C\uDFE8 }\n @else if (badge.icon === 'calendar') { \uD83D\uDCC5 }\n @else if (badge.icon === 'location') { \uD83D\uDCCD }\n <span>{{ badge.label ? badge.label + ': ' : '' }}{{ badge.field }}</span>\n </span>\n }\n }\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Tab 4: Advanced / Files -->\n @if (activeSubTextTab === 'other') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Group Field (groupField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.groupField\" placeholder=\"groupField\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Child Group Field (childGroupField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.childGroupField\" placeholder=\"childGroupField\" />\n </div>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Allowed File Types (allowedTypes)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextAllowedTypesStr\" placeholder=\".jpg,.png,.pdf\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Max File Size in MB (maxFileSize)</label>\n <input type=\"number\" [(ngModel)]=\"modalSubText.maxFileSize\" placeholder=\"10\" />\n </div>\n </div>\n <!-- MR 05DEC26 Add missing file and advanced boolean subText fields -->\n <div class=\"subtext-form-row\">\n <label>Max Files (maxFiles)</label>\n <input type=\"number\" [(ngModel)]=\"modalSubText.maxFiles\" placeholder=\"Max files\" />\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.dragAndDrop\" />\n <span>Drag And Drop (dragAndDrop)</span>\n </label>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.onlyFileId\" />\n <span>Only File ID (onlyFileId)</span>\n </label>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isCurrencyField\" />\n <span>Is Currency Field (isCurrencyField)</span>\n </label>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.singleFieldDisable\" />\n <span>Single Field Disable (singleFieldDisable)</span>\n </label>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeSubTextModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveSubTextModal()\">Save Configuration</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n@if (isStyleModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeStyleModal()\">\n <div class=\"subtext-modal-container style-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Element Style Configuration</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} &bull; {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeStyleModal()\">&times;</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'classes'\" (click)=\"activeStyleTab = 'classes'\">\n Classes & Essentials\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'inline'\" (click)=\"activeStyleTab = 'inline'\">\n Inline Styles\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'custom'\" (click)=\"activeStyleTab = 'custom'\">\n Custom Keys & Live Preview\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: Classes & Essentials -->\n @if (activeStyleTab === 'classes') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputClass\"\n placeholder=\"e.g. form-control invoice-data custom-input\"\n />\n <span class=\"field-hint\">Classes applied directly to input/control element</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelClass\"\n placeholder=\"e.g. form-label fw-bold text-primary\"\n />\n <span class=\"field-hint\">Classes applied to the question/field label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Text / Layout Direction</label>\n <select [(ngModel)]=\"modalStyle.direction\">\n <option value=\"ltr\">LTR (Left to Right)</option>\n <option value=\"rtl\">RTL (Right to Left)</option>\n </select>\n <span class=\"field-hint\">Direction attribute for text flow and control layout</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Visibility</label>\n <div style=\"display: flex; align-items: center; gap: 8px; margin-top: 8px;\">\n <input\n type=\"checkbox\"\n id=\"modalStyleShowLabel\"\n style=\"width: 18px; height: 18px; cursor: pointer;\"\n [(ngModel)]=\"modalStyle.showLabel\"\n />\n <label for=\"modalStyleShowLabel\" style=\"cursor: pointer; font-size: 13px; font-weight: 500; margin: 0;\">\n Show Label ({{ modalStyle.showLabel ? 'Enabled' : 'Hidden' }})\n </label>\n </div>\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 2: Inline Styles -->\n @if (activeStyleTab === 'inline') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputStyle\"\n placeholder=\"e.g. background-color: #f8fafc; border-color: #3b82f6;\"\n />\n <span class=\"field-hint\">Inline styles applied to input control</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelStyle\"\n placeholder=\"e.g. font-size: 14px; color: #1e293b; font-weight: 600;\"\n />\n <span class=\"field-hint\">Inline styles applied to label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Label Value Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelValueStyle\"\n placeholder=\"e.g. color: #64748b; font-style: italic;\"\n />\n <span class=\"field-hint\">Inline styles applied to label value text</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Question Wrapper Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.questionStyle\"\n placeholder=\"e.g. margin-bottom: 16px; padding: 8px;\"\n />\n <span class=\"field-hint\">Inline styles applied to outer question wrapper</span>\n </div>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Book / Container Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.bookStyle\"\n placeholder=\"e.g. border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);\"\n />\n <span class=\"field-hint\">Inline styles applied to booklet / section wrapper</span>\n </div>\n </div>\n }\n\n <!-- Tab 3: Custom Keys & Live Preview -->\n @if (activeStyleTab === 'custom') {\n <div class=\"subtext-tab-content\">\n <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;\">\n <div>\n <h4 style=\"margin: 0; font-size: 14px; color: #0f172a;\">Dynamic / Custom Style Keys</h4>\n <p style=\"margin: 2px 0 0 0; font-size: 12px; color: #64748b;\">Add specialized style properties for custom rendering</p>\n </div>\n <button type=\"button\" class=\"btn-add-badge\" (click)=\"addCustomStyleKey()\">\n + Add Style Key\n </button>\n </div>\n\n @if (customStyleKeys.length === 0) {\n <div style=\"padding: 16px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 6px; text-align: center; font-size: 12px; color: #64748b; margin-bottom: 16px;\">\n No custom style keys added. All standard style properties are configured under Classes and Inline tabs.\n </div>\n } @else {\n <div style=\"display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px;\">\n @for (item of customStyleKeys; track $index) {\n <div class=\"subtext-badge-row\">\n <input type=\"text\" [(ngModel)]=\"item.key\" placeholder=\"Key (e.g. helperStyle)\" style=\"flex: 1;\" />\n <input type=\"text\" [(ngModel)]=\"item.value\" placeholder=\"Value (e.g. font-size: 11px;)\" style=\"flex: 1;\" />\n <button type=\"button\" class=\"btn-remove-badge\" (click)=\"removeCustomStyleKey($index)\">&times;</button>\n </div>\n }\n </div>\n }\n\n <!-- Live Interactive Preview -->\n <div style=\"margin-top: 16px; border-top: 1px solid #e2e8f0; padding-top: 16px;\">\n <div style=\"display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;\">\n <span style=\"font-size: 13px; font-weight: 600; color: #1e293b;\">Live Element Style Preview</span>\n <span style=\"font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 12px; background: #e0f2fe; color: #0369a1;\">Interactive</span>\n </div>\n <div [attr.dir]=\"modalStyle.direction\" style=\"background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 16px;\">\n @if (modalStyle.showLabel) {\n <div [class]=\"modalStyle.labelClass\" [style]=\"modalStyle.labelStyle\" style=\"font-weight: 600; margin-bottom: 6px; font-size: 13px;\">\n {{ selectedElement()?.questionText || selectedElement()?.label || 'Sample Question Label' }}\n </div>\n }\n <div [class]=\"modalStyle.inputClass\" [style]=\"modalStyle.inputStyle\" style=\"background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 8px 12px; font-size: 13px; color: #475569;\">\n Sample Input Value / Preview\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" style=\"margin-right: auto; color: #dc2626; border-color: #fca5a5;\" (click)=\"resetStyleToDefault()\">\n Reset to Defaults\n </button>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeStyleModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveStyleModal()\">Save Styles</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n@if (isOptionsModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeOptionsModal()\">\n <div class=\"subtext-modal-container options-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Options Configuration</h2>\n <span class=\"subtext-modal-element-tag\">\n {{ selectedElement()?.type }} &bull; {{ selectedElement()?.questionText || selectedElement()?.label || 'Choice Field' }}\n ({{ modalOptions.length }} {{ modalOptions.length === 1 ? 'choice' : 'choices' }})\n </span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeOptionsModal()\">&times;</button>\n </div>\n\n <!-- Modal Toolbar -->\n <div class=\"options-modal-toolbar\">\n <div class=\"options-search-box\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#64748b\" stroke-width=\"2\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n <input\n type=\"text\"\n [(ngModel)]=\"optionsFilterQuery\"\n placeholder=\"Filter options by value or label...\"\n class=\"options-filter-input\"\n />\n </div>\n <button type=\"button\" class=\"options-add-btn\" (click)=\"addModalOption()\">\n <span style=\"font-size: 15px; font-weight: bold; line-height: 1;\">+</span>\n <span>Add Option</span>\n </button>\n </div>\n\n <!-- Modal Body -->\n <div class=\"options-modal-body\">\n @if (modalOptions.length === 0) {\n <div class=\"options-empty-state\">\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#94a3b8\" stroke-width=\"1.5\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"8\" y1=\"12\" x2=\"16\" y2=\"12\"></line>\n </svg>\n <p class=\"empty-title\">No Options Configured</p>\n <p class=\"empty-desc\">Click \"Add Option\" above to create your first choice for this field.</p>\n <button type=\"button\" class=\"options-add-btn\" style=\"margin-top: 8px;\" (click)=\"addModalOption()\">\n + Add First Option\n </button>\n </div>\n } @else {\n <div class=\"options-table-wrapper\" (dragover)=\"onModalOptionDragOver($event)\" (drop)=\"onModalOptionDrop($event)\">\n <div class=\"options-table-header\">\n <span class=\"col-num\">#</span>\n <span class=\"col-reorder\">Reorder</span>\n <span class=\"col-value\">Stored Value (value)</span>\n <span class=\"col-label\">Display Label (label)</span>\n <span class=\"col-actions\">Action</span>\n </div>\n\n <div class=\"options-table-body\">\n @for (opt of getFilteredModalOptions(); track opt.id; let idx = $index) {\n <div\n class=\"modal-option-table-row\"\n [attr.data-id]=\"opt.id\"\n draggable=\"true\"\n (dragstart)=\"onModalOptionDragStart($event, opt.id)\"\n >\n <span class=\"col-num index-pill\">{{ idx + 1 }}</span>\n \n <div class=\"col-reorder reorder-buttons\">\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === 0\"\n (click)=\"moveModalOption(idx, 'up')\"\n title=\"Move Up\"\n >\n &#9650;\n </button>\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === modalOptions.length - 1\"\n (click)=\"moveModalOption(idx, 'down')\"\n title=\"Move Down\"\n >\n &#9660;\n </button>\n <span class=\"modal-drag-grip\" title=\"Drag to reorder\">&#9776;</span>\n </div>\n\n <div class=\"col-value\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.value\"\n placeholder=\"e.g. choice_1 or 01\"\n />\n </div>\n\n <div class=\"col-label\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.label\"\n placeholder=\"e.g. First Choice\"\n />\n </div>\n\n <div class=\"col-actions\">\n <button\n type=\"button\"\n class=\"btn-delete-option\"\n (click)=\"removeModalOption(idx)\"\n title=\"Delete Option\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <polyline points=\"3 6 5 6 21 6\"></polyline>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path>\n </svg>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Choices Preview -->\n <div class=\"options-live-preview-box\">\n <div class=\"preview-header\">\n <span class=\"preview-title\">Live Dropdown / Choice Preview</span>\n <span class=\"preview-tag\">{{ modalOptions.length }} Items</span>\n </div>\n <div class=\"preview-select-mock\">\n <select class=\"mock-dropdown-select\" disabled>\n <option value=\"\" selected disabled>--- Select an option ---</option>\n @for (opt of modalOptions; track opt.id) {\n <option [value]=\"opt.value\">{{ opt.label || opt.value }}</option>\n }\n </select>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <span style=\"font-size: 12px; color: #64748b; margin-right: auto; align-self: center;\">\n Total: <strong>{{ modalOptions.length }}</strong> {{ modalOptions.length === 1 ? 'choice' : 'choices' }}\n </span>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeOptionsModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveOptionsModal()\">Save Options</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 17NOV26 Action Button Configuration Pop-Up Modal with RuleMeta Support -->\n@if (isButtonModalOpen) {\n <div class=\"button-modal-backdrop\" (click)=\"closeButtonModal()\">\n <div class=\"button-modal-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"button-modal-header\">\n <div class=\"button-modal-title-group\">\n <h2 class=\"button-modal-title\">\n {{ (editingButtonIndex === -1 ? 'ADD_ACTION_BUTTON' : 'EDIT_ACTION_BUTTON') | nxtCustomTranslate : (editingButtonIndex === -1 ? 'Add Action Button' : 'Edit Action Button') }}\n </h2>\n <span class=\"button-modal-element-tag\">\n {{ editingButton.name || ('UNNAMED' | nxtCustomTranslate : 'Unnamed') }} &bull; ID: {{ editingButton.id }}\n </span>\n </div>\n <button type=\"button\" class=\"button-modal-close-btn\" (click)=\"closeButtonModal()\">&times;</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"button-modal-tabs\">\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'general'\" (click)=\"activeButtonTab = 'general'\">\n {{ 'GENERAL' | nxtCustomTranslate : 'General' }}\n </button>\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'api'\" (click)=\"activeButtonTab = 'api'\">\n {{ 'ACTION_API' | nxtCustomTranslate : 'Action & API' }}\n </button>\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'appearance'\" (click)=\"activeButtonTab = 'appearance'\">\n {{ 'APPEARANCE' | nxtCustomTranslate : 'Appearance' }}\n </button>\n <button type=\"button\" class=\"button-tab-btn\" [class.active]=\"activeButtonTab === 'rules'\" (click)=\"activeButtonTab = 'rules'\">\n {{ 'RULES_AND_CONFIRM' | nxtCustomTranslate : 'Rules & Confirm' }}\n @if (editingButton.rules?.length) {\n <span class=\"tab-badge\">{{ editingButton.rules?.length }}</span>\n }\n </button>\n </div>\n\n <!-- Modal Body -->\n <div class=\"button-modal-body\">\n <!-- Tab 1: General -->\n @if (activeButtonTab === 'general') {\n <div class=\"button-modal-tab-content\">\n <div class=\"button-form-row\">\n <label>{{ 'BUTTON_ID' | nxtCustomTranslate : 'Button ID' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.id\" placeholder=\"Enter button id\" />\n </div>\n\n <div class=\"button-form-row\">\n <label>{{ 'BUTTON_NAME' | nxtCustomTranslate : 'Button Name' }}</label>\n @if (formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if ((editingButton.id + '.name' | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n @if (!copied) {\n <svg (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" stroke=\"currentColor\">\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" stroke-width=\"2\"></rect>\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" stroke-width=\"2\"></path>\n </svg>\n }\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n <input type=\"text\" [(ngModel)]=\"editingButton.name\" placeholder=\"Enter button name\" />\n </div>\n\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'EVENT_NAME' | nxtCustomTranslate : 'Event to Emit' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.eventtoemit\" placeholder=\"e.g. submit, close, print\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'ALT' | nxtCustomTranslate : 'Alt Text' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.alt\" placeholder=\"Button alt text\" />\n </div>\n </div>\n\n <div class=\"button-form-row\">\n <label>{{ 'ACTION_DATA' | nxtCustomTranslate : 'Action Data' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.actionData\" placeholder=\"Event to actionData\" />\n </div>\n </div>\n }\n\n <!-- Tab 2: Action / API -->\n @if (activeButtonTab === 'api') {\n <div class=\"button-modal-tab-content\">\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\" style=\"grid-column: 1 / -1;\">\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}</label>\n <input type=\"text\" [(ngModel)]=\"editingButton.endpoint\" placeholder=\"API endpoint URL\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'METHOD' | nxtCustomTranslate : 'Method' }}</label>\n <select [(ngModel)]=\"editingButton.method\">\n <option value=\"GET\">GET</option>\n <option value=\"POST\">POST</option>\n <option value=\"PUT\">PUT</option>\n <option value=\"DELETE\">DELETE</option>\n </select>\n </div>\n <div class=\"button-form-row\" style=\"align-self: center; margin-top: 22px;\">\n <label class=\"button-checkbox-label\">\n <input type=\"checkbox\" [(ngModel)]=\"editingButton.updateParentData\" />\n <span>{{ 'UPDATE_PARENTDATA' | nxtCustomTranslate : 'Update Parent Data' }}</span>\n </label>\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 3: Appearance -->\n @if (activeButtonTab === 'appearance') {\n <div class=\"button-modal-tab-content\">\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'BUTTON_WIDTH_PX' | nxtCustomTranslate : 'Button Width (px)' }}</label>\n <input type=\"number\" [(ngModel)]=\"editingButton.width\" min=\"50\" placeholder=\"Width in px\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'POSITION_PERCENT' | nxtCustomTranslate : 'Position (%)' }}: {{ editingButton.positionPercent || 0 }}%</label>\n <input type=\"range\" min=\"0\" max=\"100\" [(ngModel)]=\"editingButton.positionPercent\" />\n </div>\n </div>\n\n <div class=\"button-form-grid-3\">\n <div class=\"button-form-row\">\n <label>{{ 'BACKGROUND_COLOR' | nxtCustomTranslate : 'Background Color' }}</label>\n <input type=\"color\" [(ngModel)]=\"editingButton.bgColor\" class=\"button-color-input\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'TEXT_COLOR' | nxtCustomTranslate : 'Text Color' }}</label>\n <input type=\"color\" [(ngModel)]=\"editingButton.textColor\" class=\"button-color-input\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'BORDER_COLOR' | nxtCustomTranslate : 'Border Color' }}</label>\n <input type=\"color\" [(ngModel)]=\"editingButton.borderColor\" class=\"button-color-input\" />\n </div>\n </div>\n\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'BORDER_SIZE' | nxtCustomTranslate : 'Border Size' }}: {{ editingButton.borderSize || 0 }}px</label>\n <input type=\"range\" min=\"0\" max=\"20\" [(ngModel)]=\"editingButton.borderSize\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'BORDER_RADIUS' | nxtCustomTranslate : 'Border Radius' }}: {{ editingButton.borderRadius || 0 }}px</label>\n <input type=\"range\" min=\"0\" max=\"50\" [(ngModel)]=\"editingButton.borderRadius\" />\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 4: Rules & Confirm -->\n @if (activeButtonTab === 'rules') {\n <div class=\"button-modal-tab-content\">\n <!-- Confirmation Setting -->\n <div class=\"button-rules-section\">\n <label class=\"button-checkbox-label\" style=\"font-weight: 600;\">\n <input type=\"checkbox\" [(ngModel)]=\"editingButton.enableConfirm\" />\n <span>{{ 'ENABLE_CONFIRM' | nxtCustomTranslate : 'Enable Confirmation Prompt before execution' }}</span>\n </label>\n </div>\n\n <!-- Quick Visibility Expression with Google CEL validation -->\n <div class=\"button-form-row\">\n <div class=\"button-row-header-between\">\n <label>{{ 'VISIBILITY_RULE' | nxtCustomTranslate : 'Visibility Rule Expression' }}</label>\n <span class=\"cel-badge\">CEL</span>\n </div>\n <input\n type=\"text\"\n [(ngModel)]=\"editingButton.visibilityRule\"\n (ngModelChange)=\"onVisibilityRuleChange($event)\"\n [class.is-invalid]=\"!visibilityRuleValidation.isValid\"\n placeholder=\"e.g. status == 'Approved'\" />\n @if (editingButton.visibilityRule?.trim()) {\n @if (visibilityRuleValidation.isValid) {\n <div class=\"cel-feedback valid\">\n <span class=\"cel-icon\">\u2713</span>\n <span>{{ 'CEL_VALID' | nxtCustomTranslate : 'Valid CEL expression' }}</span>\n </div>\n } @else {\n <div class=\"cel-feedback invalid\">\n <span class=\"cel-icon\">\u26A0</span>\n <span>{{ visibilityRuleValidation.error }}</span>\n </div>\n }\n }\n </div>\n\n <!-- RuleMeta List Section -->\n <div class=\"button-rules-header\">\n <div class=\"button-rules-title\">\n <span>{{ 'BUTTON_RULES' | nxtCustomTranslate : 'Rules (RuleMeta)' }}</span>\n <span class=\"button-rules-count\">{{ editingButton.rules?.length || 0 }}</span>\n </div>\n <button type=\"button\" class=\"btn-add-rule\" (click)=\"addRuleToEditingButton()\">\n + {{ 'ADD_RULE' | nxtCustomTranslate : 'Add Rule' }}\n </button>\n </div>\n\n <div class=\"button-rules-list\">\n @for (rule of editingButton.rules || []; track rule.id || $index; let rIdx = $index) {\n <div class=\"button-rule-card\">\n <div class=\"button-rule-card-header\">\n <span class=\"button-rule-num\">#{{ rIdx + 1 }}</span>\n <div class=\"button-rule-type-select\">\n <label>{{ 'RULE_TYPE' | nxtCustomTranslate : 'Type' }}:</label>\n <select [(ngModel)]=\"rule.type\">\n @for (rt of ruleTypes; track rt) {\n <option [value]=\"rt\">{{ rt }}</option>\n }\n </select>\n </div>\n <button type=\"button\" class=\"btn-rule-remove\" (click)=\"removeRuleFromEditingButton(rIdx)\" title=\"Remove Rule\">\n &times;\n </button>\n </div>\n\n <!-- MR 17NOV26 Rule ID and Execution Order inputs -->\n <div class=\"button-form-grid-2\" style=\"margin-top: 8px;\">\n <div class=\"button-form-row\">\n <label>{{ 'RULE_ID' | nxtCustomTranslate : 'Rule ID' }}</label>\n <input type=\"text\" [(ngModel)]=\"rule.id\" placeholder=\"Rule ID\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'ORDER' | nxtCustomTranslate : 'Order' }}</label>\n <input type=\"number\" [(ngModel)]=\"rule.order\" min=\"1\" placeholder=\"Order (e.g. 1)\" />\n </div>\n </div>\n\n <!-- MR 17NOV26 Rule Expression Textarea with Google CEL syntax validation -->\n <div class=\"button-form-row\" style=\"margin-top: 8px;\">\n <div class=\"button-row-header-between\">\n <label>{{ 'EXPRESSION' | nxtCustomTranslate : 'Rule Expression (Google CEL)' }}</label>\n <span class=\"cel-badge\">CEL</span>\n </div>\n <textarea\n rows=\"3\"\n [(ngModel)]=\"rule.expression\"\n (ngModelChange)=\"onRuleExpressionChange(rule)\"\n class=\"button-form-textarea\"\n [class.is-invalid]=\"rule.id && ruleValidationMap[rule.id]?.isValid === false\"\n placeholder=\"Enter Google CEL expression, e.g. isValid == true && totalAmount > 0\"></textarea>\n @if (rule.expression?.trim()) {\n @if (rule.id && ruleValidationMap[rule.id]?.isValid) {\n <div class=\"cel-feedback valid\">\n <span class=\"cel-icon\">\u2713</span>\n <span>{{ 'CEL_VALID' | nxtCustomTranslate : 'Valid CEL expression' }}</span>\n </div>\n } @else if (rule.id && ruleValidationMap[rule.id]?.isValid === false) {\n <div class=\"cel-feedback invalid\">\n <span class=\"cel-icon\">\u26A0</span>\n <span>{{ ruleValidationMap[rule.id]?.error }}</span>\n </div>\n }\n }\n </div>\n\n <div class=\"button-form-grid-2\">\n <div class=\"button-form-row\">\n <label>{{ 'MESSAGE' | nxtCustomTranslate : 'Message / Notification' }}</label>\n <input type=\"text\" [(ngModel)]=\"rule.message\" placeholder=\"Optional notification or validation message\" />\n </div>\n <div class=\"button-form-row\">\n <label>{{ 'TARGET_FIELD' | nxtCustomTranslate : 'Target Field' }}</label>\n <input type=\"text\" [(ngModel)]=\"rule.targetField\" placeholder=\"Optional target field\" />\n </div>\n </div>\n </div>\n }\n @if (!editingButton.rules?.length) {\n <div class=\"button-rules-empty\">\n <span>{{ 'NO_RULES_CONFIGURED' | nxtCustomTranslate : 'No rules configured for this button.' }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"button-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeButtonModal()\">\n {{ 'CANCEL' | nxtCustomTranslate : 'Cancel' }}\n </button>\n <button\n type=\"button\"\n class=\"btn-save\"\n [disabled]=\"hasCelValidationErrors()\"\n (click)=\"saveButtonModal()\">\n {{ 'SAVE_BUTTON' | nxtCustomTranslate : 'Save Button' }}\n </button>\n </div>\n </div>\n </div>\n}\n</div>", styles: ["*{margin:0;padding:0;box-sizing:border-box;font-family:Roboto,sans-serif}.properties{height:calc(100vh - 20px);overflow-y:auto}.container{width:100%;max-width:500px;margin:0 auto;background:#fff;box-shadow:0 2px 10px #0000001a;overflow:hidden;font-family:Arial,sans-serif}.design-header{display:flex;justify-content:center;align-items:center;padding:15px 20px;background:#fff;border-radius:8px;box-shadow:0 2px 10px #0000001a;margin-bottom:20px}.header-title{font-size:20px;font-weight:400;color:#222}.toggle-header,.style-toggle-header{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:10px;background:#f8f8f8;border:1px solid #ddd;border-radius:6px;margin-bottom:6px}.tabs{display:flex;background:#f0f2f5;border-bottom:2px solid #0052cc}.tab{flex:1;padding:15px 10px;text-align:center;cursor:pointer}.tab.active{background:#0052cc;color:#fff;font-weight:700}.tab-content{padding:5px;max-height:80vh;overflow-y:auto;overflow-x:hidden}.form-group{margin-bottom:15px}label{display:block;font-size:14px;font-weight:500;color:#444;margin-bottom:8px}.required:before{content:\"*\";color:red;margin-right:3px}input[type=text],input[type=number],select,textarea{width:100%;padding:10px;font-size:14px;border:1px solid #ccc;border-radius:6px;outline:none;transition:all .3s;background:#f8f8f8}input:focus,select:focus,textarea:focus{border-color:#007bff;background:#fff;box-shadow:0 0 5px #007bff4d}textarea{min-height:55px;resize:vertical}button,.btn{padding:10px 15px;border:none;border-radius:6px;background:#007bff;color:#fff;font-size:15px;cursor:pointer;transition:all .3s}button:hover,.btn:hover{background:#0056b3;transform:translateY(-2px)}.add-button{padding:8px 14px;background:#0954c5;border-radius:8px}.remove-button{background:#e74c3c;padding:6px 12px;margin-top:10px}.remove-button:hover{background:#c0392b}.cancel-btn{background:#fff;color:#666;border:1px solid #ddd}.save-btn{background:#0052cc;margin-right:10px}.toggle-group{display:grid;grid-template-columns:1fr 1fr;gap:10px}.toggle-item{display:flex;align-items:center;gap:10px;padding:8px}.switch{position:relative;width:42px;height:22px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background:#ccc;transition:.4s;border-radius:24px}.slider:before{position:absolute;content:\"\";height:20px;width:20px;left:1px;bottom:1px;background:#fff;transition:.4s;border-radius:50%}input:checked+.slider{background:#2196f3}input:checked+.slider:before{transform:translate(18px)}.radio-item{display:flex;align-items:center;gap:20px}.radio-item input{accent-color:#007bff}.checkbox-row{display:flex;margin-bottom:10px}.checkbox-group{display:flex;align-items:center;margin-right:20px;min-width:120px}.checkbox-group input[type=checkbox]{margin-right:5px}.color-picker-row,.color-picker-container{display:flex;align-items:center}.color-picker-container{border:1px solid #ddd;border-radius:4px;margin-right:10px}.color-box,.color-selector input[type=color]{width:78px!important;height:40px;border:none;border-radius:4px;cursor:pointer}.hex-input-container{display:flex;gap:20px;align-items:center;font-size:12px;color:#b0b0b0}.hex-input-container span{font-size:14px;margin-top:10px}.hex-input,.hex-input-container input[type=text]{width:120px;padding:10px 12px;border:1px solid #d1d1d1;color:#28343e}.hex-label{color:#999;margin-right:5px}.select-container,.input-box-field{position:relative;width:100%}.dropdown-arrow,.input-box-field:after{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none;color:#666;font-size:12px}.input-box-field:after{content:\"\\25bc\";color:#1c1b1f;font-size:10px}.input-box-field select{background:#28343e;color:#fff;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none}.input-box-field select::-ms-expand{display:none}.all-properties details{background:#fff;border:1px solid #ddd;border-radius:8px;margin-bottom:12px;padding:12px;box-shadow:0 2px 8px #0000000d}.all-properties summary{font-size:15px;font-weight:400;cursor:pointer;padding:6px;transition:color .3s}.all-properties summary:hover{color:#007bff}.inner-content{padding:12px 0}.head-elements{font-size:14px;font-weight:500;color:#444}.options-container{display:flex;flex-direction:column;gap:12px}.field-size-controls,.flex-container{display:flex;align-items:center;gap:12px}.flex-container{margin-bottom:1rem}.size-input{width:110px;text-align:center}.input-container{display:flex;flex-direction:column;align-items:flex-start;gap:10px;width:100%}.subtext-textarea{width:100%;margin-left:auto}.arrow-icon{width:19px;height:23px;transition:transform .3s ease}.icon{display:inline-block;width:18px;height:18px;border-radius:50%;text-align:center;line-height:18px;color:#fff;font-size:12px;margin-left:5px}.edit-icon{background:#4caf50}.view-icon{background:#2196f3}.delete-icon{background:#f44336}.logo-icon{width:20px;height:20px;width:35px;display:flex;justify-content:center;background:#d0d9ff;border-radius:4px}.link-icon{background:#e7f2ff;padding:5px;border-radius:5px;margin:5px;display:inline-block;cursor:pointer;position:relative;transition:all .3s}.link-icon:hover{background:#d0e5ff}.link-icon:active{background:#a8d0ff}.link-dropdown-menu{position:absolute;top:100%;right:0;background:#fff;border:1px solid #ccc;padding:10px;width:200px;box-shadow:0 4px 6px #0000001a}.link-dropdown-menu input{width:100%;margin-bottom:5px;padding:5px;border:1px solid #ccc;border-radius:3px}.option-items{display:flex;align-items:center;padding:5px;gap:5px;border:1px solid #ccc;margin-bottom:10px;cursor:grab;background:#fff}.option-items:active{opacity:.5}.drag-handle{cursor:grab}.button-toggle-wrapper{margin-top:8px}.toggle-button{padding:8px 16px;border:1px solid #cbd2d9;border-radius:6px;font-size:14px;cursor:pointer;transition:all .2s ease-in-out}.toggle-button.active:hover{background:#2c6dd5}.button-config-card{background:#fff;padding:15px;border-radius:12px;border:1px solid #ccc;margin-top:20px;box-shadow:0 2px 8px #0000000d}.design-footer{display:flex;justify-content:space-between;margin-top:20px}.button-container{display:flex;padding:15px;background:#f9f9f9;border-top:1px solid #eee}.button-container .cancel-btn,.button-container .save-btn{flex:1;padding:12px;font-weight:700}.divider{border-top:1px dashed #ddd;margin:20px 0}input{width:auto}@media screen and (max-width:768px){.container{height:calc(100vh - 20px);min-height:calc(100vh - 20px)}.tabs{flex-direction:column}.tab{padding:1rem;font-size:.9rem}.form-group,.tab-content[aria-label=attributes] .form-group,.tab-content[aria-label=property] .form-group,.tab-content[aria-label=appearance] .form-group{flex-direction:column;grid-template-columns:1fr}.toggle-group{flex-direction:column;align-items:flex-start}}@media screen and (max-width:480px){.container{padding:0 10px}.tabs{flex-direction:column}.tab{padding:1rem;border-bottom:1px solid #dee2e6}input[type=text],input[type=number],select,textarea{font-size:.9rem}}.translation-fallback label,.translation-input-group label{font-weight:500;font-size:13px;margin-bottom:4px;display:block;color:#666}.readonly-box{font-size:14px;padding:4px;border:1px solid #ddd;border-radius:5px;-webkit-user-select:text;user-select:text;cursor:text;color:#7a7a7a;margin-bottom:3px}.copied-msg{font-size:12px;color:green;opacity:0;animation:fadeInOut 1.5s ease}@keyframes fadeInOut{0%{opacity:0;transform:translateY(-2px)}20%{opacity:1;transform:translateY(0)}80%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-2px)}}.subtext-sidebar-trigger-wrapper{background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:10px 12px;margin:10px 0;box-shadow:0 1px 3px #0000000a}.subtext-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.subtext-trigger-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#1e293b}.subtext-status-badge{font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:#f1f5f9;color:#64748b}.subtext-status-badge.configured{background:#e0f2fe;color:#0369a1}.subtext-trigger-hint{font-size:11px;color:#64748b;margin:2px 0 8px;line-height:1.3}.subtext-modal-open-btn{width:100%;background:#2563eb;color:#fff;border:none;border-radius:5px;padding:7px 12px;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:background .15s ease}.subtext-modal-open-btn:hover{background:#1d4ed8}.subtext-modal-backdrop{position:fixed;inset:0;background:#0f172a99;backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:10000}.subtext-modal-container{background:#fff;border-radius:10px;box-shadow:0 20px 45px #00000040;width:90%;max-width:780px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;animation:modalFadeIn .2s ease-out}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.subtext-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.subtext-modal-title{font-size:16px;font-weight:700;color:#0f172a;margin:0}.subtext-modal-element-tag{font-size:11px;font-weight:500;color:#475569;background:#e2e8f0;padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px}.subtext-modal-close-btn{background:none;border:none;font-size:24px;line-height:1;color:#64748b;cursor:pointer;padding:0 4px}.subtext-modal-close-btn:hover{color:#0f172a}.subtext-modal-tabs{display:flex;background:#f1f5f9;padding:4px 16px 0;border-bottom:1px solid #e2e8f0;gap:4px}.subtext-tab-btn{border:none;background:transparent;padding:9px 14px;font-size:13px;font-weight:500;color:#64748b;border-bottom:2px solid transparent;cursor:pointer;transition:all .15s ease}.subtext-tab-btn:hover{color:#0f172a}.subtext-tab-btn.active{color:#2563eb;border-bottom:2px solid #2563eb;font-weight:600;background:#fff;border-radius:6px 6px 0 0}.subtext-modal-body{padding:18px 20px;overflow-y:auto;flex:1}.subtext-form-row{margin-bottom:12px;display:flex;flex-direction:column;gap:4px}.subtext-form-row label{font-size:12px;font-weight:600;color:#334155}.subtext-form-row input,.subtext-form-row select{padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;width:100%;box-sizing:border-box}.subtext-form-row input:focus,.subtext-form-row select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.subtext-form-row-checkbox{margin:10px 0;display:flex;align-items:center}.subtext-form-row-checkbox label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#334155;cursor:pointer}.subtext-form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-hint{font-size:11px;color:#64748b}.subtext-divider{border:none;border-top:1px solid #e2e8f0;margin:14px 0}.card-config-header-row{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-bottom:14px}.card-config-body{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.badges-config-section{border:1px solid #e2e8f0;border-radius:6px;padding:10px;background:#f8fafc;margin-top:8px}.badges-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.badges-header label{font-size:12px;font-weight:600;color:#334155}.add-badge-btn{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0;padding:3px 8px;font-size:11px;border-radius:4px;font-weight:600;cursor:pointer}.add-badge-btn:hover{background:#dcfce7}.badge-item-row{display:flex;gap:6px;align-items:center;margin-bottom:6px}.badge-field-input{flex:1.2;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-icon-select{flex:.9;padding:5px 6px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-label-input{flex:.9;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.remove-badge-btn{background:none;border:none;color:#ef4444;font-size:18px;line-height:1;cursor:pointer;padding:0 4px}.card-live-preview-box{border:1px solid #e2e8f0;border-radius:8px;padding:12px;background:#f8fafc;display:flex;flex-direction:column;gap:8px;align-self:flex-start}.preview-tag{font-size:10px;font-weight:700;letter-spacing:.5px;color:#64748b}.sample-card-container{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:10px;display:flex;gap:12px;box-shadow:0 2px 6px #0000000d}.sample-card-image{width:76px;height:52px;border-radius:6px;background:#f1f5f9;border:1px solid #e2e8f0;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}.sample-img-placeholder{font-size:10px;color:#94a3b8;text-align:center}.sample-img-placeholder.has-img{display:flex;flex-direction:column;align-items:center;gap:2px}.img-field-label{font-size:9px;color:#2563eb;font-weight:600;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sample-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.sample-card-title{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.2}.sample-card-subtitle{font-size:11px;color:#556987;line-height:1.2}.sample-card-badges{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}.sample-badge-pill{background:#f0f4f9;color:#27406b;font-size:9px;font-weight:600;padding:2px 5px;border-radius:3px;display:inline-flex;align-items:center;gap:2px}.subtext-modal-footer{display:flex;justify-content:flex-end;gap:10px;padding:12px 20px;border-top:1px solid #e2e8f0;background:#f8fafc}.btn-cancel{background:#fff;border:1px solid #cbd5e1;padding:7px 16px;border-radius:6px;font-size:13px;font-weight:500;color:#475569;cursor:pointer}.btn-cancel:hover{background:#f1f5f9}.btn-save{background:#2563eb;border:1px solid #2563eb;padding:7px 18px;border-radius:6px;font-size:13px;font-weight:600;color:#fff;cursor:pointer}.btn-save:hover{background:#1d4ed8}.style-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0f7ff;border:1px solid #bfdbfe;border-radius:8px}.style-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.style-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#1e3a8a}.style-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.style-status-badge.configured{background:#dcfce7;color:#15803d}.style-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.style-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.style-modal-open-btn:hover{background:#1d4ed8}.style-modal-container{max-width:680px}.options-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px}.options-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.options-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#166534}.options-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.options-status-badge.configured{background:#dcfce7;color:#15803d}.options-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.options-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#16a34a;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.options-modal-open-btn:hover{background:#15803d}.options-modal-container{max-width:760px}.options-modal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.options-search-box{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #cbd5e1;border-radius:6px;padding:6px 10px;flex:1;max-width:380px}.options-filter-input{border:none;outline:none;background:transparent;font-size:13px;color:#0f172a;width:100%}.options-add-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:background .15s ease}.options-add-btn:hover{background:#1d4ed8}.options-modal-body{padding:16px 20px;overflow-y:auto;max-height:520px}.options-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.empty-title{margin:12px 0 4px;font-size:15px;font-weight:600;color:#1e293b}.empty-desc{margin:0;font-size:13px;color:#64748b}.options-table-wrapper{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;background:#fff}.options-table-header{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:10px 14px;background:#f1f5f9;font-size:11px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #e2e8f0}.options-table-body{display:flex;flex-direction:column}.modal-option-table-row{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid #f1f5f9;transition:background .12s ease}.modal-option-table-row:last-child{border-bottom:none}.modal-option-table-row:hover{background:#f8fafc}.index-pill{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#475569;font-size:11px;font-weight:600}.reorder-buttons{display:flex;align-items:center;gap:4px}.btn-arrow{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:4px;font-size:9px;color:#475569;cursor:pointer;transition:all .12s ease}.btn-arrow:hover:not(:disabled){background:#2563eb;color:#fff;border-color:#2563eb}.btn-arrow:disabled{opacity:.35;cursor:not-allowed}.modal-drag-grip{font-size:14px;color:#94a3b8;cursor:grab;padding:0 4px;-webkit-user-select:none;user-select:none}.modal-drag-grip:active{cursor:grabbing}.options-input{width:100%;padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;box-sizing:border-box}.options-input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb1a}.btn-delete-option{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:transparent;border:none;border-radius:4px;color:#94a3b8;cursor:pointer;transition:all .12s ease}.btn-delete-option:hover{background:#fee2e2;color:#dc2626}.options-live-preview-box{margin-top:16px;padding:14px 16px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.preview-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.preview-title{font-size:12px;font-weight:600;color:#334155}.preview-tag{font-size:10px;font-weight:600;padding:2px 7px;border-radius:10px;background:#e2e8f0;color:#475569}.preview-select-mock{width:100%}.mock-dropdown-select{width:100%;padding:8px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:13px;color:#334155;box-sizing:border-box}.action-buttons-sidebar-container{margin-top:15px;border:1px solid var(--fb-border-default, #e2e8f0);padding:14px;border-radius:10px;background-color:var(--fb-surface-secondary, #f8fafc)}.action-buttons-sidebar-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.action-buttons-sidebar-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--fb-text-primary, #0f172a)}.action-buttons-sidebar-title svg{stroke:var(--fb-action-surface, #0275ff)}.add-action-button-btn{display:inline-flex;align-items:center;gap:4px;background-color:var(--fb-action-surface, #0275ff);color:var(--fb-text-on-action, #ffffff);border:1px solid var(--fb-action-border, #0275ff);padding:5px 10px;border-radius:6px;font-size:11px;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.add-action-button-btn:hover{background-color:var(--fb-action-surface-hover, #0056b3);border-color:var(--fb-action-surface-hover, #0056b3)}.action-buttons-card-list{display:flex;flex-direction:column;gap:8px}.action-button-summary-card{background-color:var(--fb-surface-elevated, #ffffff);border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:6px;transition:border-color .15s ease,box-shadow .15s ease}.action-button-summary-card:hover{border-color:var(--fb-action-surface, #0275ff);box-shadow:0 2px 8px #0000000d}.action-button-card-top{display:flex;align-items:center;justify-content:space-between}.action-button-card-info{display:flex;align-items:center;gap:8px}.action-button-card-name{font-size:13px;font-weight:600;color:var(--fb-text-primary, #0f172a)}.action-button-card-event{font-size:11px;color:var(--fb-text-secondary, #64748b);background-color:var(--fb-surface-tertiary, #f1f5f9);padding:2px 6px;border-radius:4px}.action-button-card-actions{display:flex;align-items:center;gap:4px}.action-card-btn{background:none;border:1px solid transparent;border-radius:4px;padding:4px 6px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background-color .15s ease,color .15s ease}.action-card-btn.edit{color:var(--fb-action-surface, #0275ff)}.action-card-btn.edit:hover{background-color:var(--fb-selected-bg, #eff6ff);border-color:var(--fb-selected-border, #bfdbfe)}.action-card-btn.remove{color:var(--fb-error-text, #ef4444)}.action-card-btn.remove:hover{background-color:var(--fb-error-surface, #fef2f2);border-color:var(--fb-error-border, #fecaca)}.action-button-card-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.action-card-badge{font-size:10px;font-weight:500;padding:2px 6px;border-radius:4px;background-color:var(--fb-surface-tertiary, #f1f5f9);color:var(--fb-text-secondary, #475569);border:1px solid var(--fb-border-subtle, #e2e8f0)}.action-card-badge.method{background-color:var(--fb-info-surface, #eff6ff);color:var(--fb-info-text, #1d4ed8);border-color:var(--fb-info-border, #bfdbfe);font-weight:600}.action-card-badge.confirm{background-color:var(--fb-warning-surface, #fffbeb);color:var(--fb-warning-text, #b45309);border-color:var(--fb-warning-border, #fef08a)}.action-card-badge.rules{background-color:var(--fb-success-surface, #f0fdf4);color:var(--fb-success-text, #15803d);border-color:var(--fb-success-border, #bbf7d0);font-weight:600}.action-buttons-empty{text-align:center;padding:16px;font-size:12px;color:var(--fb-text-muted, #94a3b8);border:1px dashed var(--fb-border-default, #cbd5e1);border-radius:6px;background:var(--fb-surface-elevated, #ffffff)}.button-modal-backdrop{position:fixed;inset:0;background:var(--fb-backdrop, rgba(15, 23, 42, .6));backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:10000}.button-modal-container{background:var(--fb-surface-elevated, #ffffff);border-radius:10px;box-shadow:0 20px 45px #00000040;width:90%;max-width:680px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;animation:modalFadeIn .2s ease-out}.button-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid var(--fb-border-default, #e2e8f0);background:var(--fb-surface-secondary, #f8fafc)}.button-modal-title{font-size:16px;font-weight:700;color:var(--fb-text-primary, #0f172a);margin:0}.button-modal-element-tag{font-size:11px;font-weight:500;color:var(--fb-text-secondary, #475569);background:var(--fb-surface-tertiary, #e2e8f0);padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px}.button-modal-close-btn{background:none;border:none;font-size:24px;line-height:1;color:var(--fb-text-muted, #64748b);cursor:pointer;padding:0 4px;transition:color .15s ease}.button-modal-close-btn:hover{color:var(--fb-text-primary, #0f172a)}.button-modal-tabs{display:flex;background:var(--fb-surface-tertiary, #f1f5f9);border-bottom:1px solid var(--fb-border-default, #e2e8f0);padding:0 16px;gap:4px;overflow-x:auto}.button-tab-btn{background:none;border:none;border-bottom:2px solid transparent;padding:10px 14px;font-size:12px;font-weight:600;color:var(--fb-text-secondary, #475569);cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:all .15s ease;white-space:nowrap}.button-tab-btn:hover{color:var(--fb-text-primary, #0f172a);background:var(--fb-nav-hover, rgba(0, 0, 0, .03))}.button-tab-btn.active{color:var(--fb-action-surface, #0275ff);border-bottom-color:var(--fb-action-surface, #0275ff);background:var(--fb-surface-elevated, #ffffff)}.tab-badge{font-size:10px;font-weight:700;background:var(--fb-action-surface, #0275ff);color:var(--fb-text-on-action, #ffffff);padding:1px 6px;border-radius:10px}.button-modal-body{padding:20px;overflow-y:auto;flex:1;background:var(--fb-surface-elevated, #ffffff)}.button-modal-tab-content{display:flex;flex-direction:column;gap:14px}.button-form-row{display:flex;flex-direction:column;gap:5px}.button-form-row label{font-size:12px;font-weight:600;color:var(--fb-text-primary, #1e293b)}.button-form-row input[type=text],.button-form-row input[type=number],.button-form-row select{padding:8px 10px;border:1px solid var(--fb-input-border, #cbd5e1);border-radius:6px;font-size:13px;color:var(--fb-text-primary, #0f172a);background:var(--fb-input-bg, #ffffff);box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.button-form-row input[type=text]:focus,.button-form-row input[type=number]:focus,.button-form-row select:focus{outline:none;border-color:var(--fb-input-focus, #0275ff);box-shadow:0 0 0 3px var(--fb-focus-ring, rgba(2, 117, 255, .15))}.button-form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.button-form-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}.button-checkbox-label{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;color:var(--fb-text-primary, #1e293b)}.button-checkbox-label input[type=checkbox]{width:16px;height:16px;cursor:pointer;accent-color:var(--fb-action-surface, #0275ff)}.button-color-input{width:100%;height:38px;padding:2px 4px;border:1px solid var(--fb-input-border, #cbd5e1);border-radius:6px;cursor:pointer;background:var(--fb-input-bg, #ffffff);box-sizing:border-box}.button-rules-section{padding:10px 14px;background:var(--fb-surface-secondary, #f8fafc);border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px}.button-rules-header{display:flex;align-items:center;justify-content:space-between;margin-top:10px;padding-bottom:8px;border-bottom:1px solid var(--fb-border-default, #e2e8f0)}.button-rules-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--fb-text-primary, #0f172a)}.button-rules-count{font-size:11px;background:var(--fb-surface-tertiary, #e2e8f0);color:var(--fb-text-secondary, #475569);padding:1px 7px;border-radius:10px}.btn-add-rule{background:var(--fb-action-surface, #0275ff);color:var(--fb-text-on-action, #ffffff);border:1px solid var(--fb-action-border, #0275ff);padding:5px 12px;border-radius:6px;font-size:11px;font-weight:600;cursor:pointer;transition:background-color .15s ease}.btn-add-rule:hover{background:var(--fb-action-surface-hover, #0056b3)}.button-rules-list{display:flex;flex-direction:column;gap:10px;margin-top:10px}.button-rule-card{background:var(--fb-surface-secondary, #f8fafc);border:1px solid var(--fb-border-default, #e2e8f0);border-radius:8px;padding:12px}.button-rule-card-header{display:flex;align-items:center;gap:10px}.button-rule-num{font-size:12px;font-weight:700;color:var(--fb-text-muted, #64748b)}.button-rule-type-select{display:flex;align-items:center;gap:6px;flex:1}.button-rule-type-select label{font-size:11px;font-weight:600;color:var(--fb-text-secondary, #475569)}.button-rule-type-select select{padding:4px 8px;font-size:12px;border-radius:4px;border:1px solid var(--fb-input-border, #cbd5e1);background:var(--fb-input-bg, #ffffff);color:var(--fb-text-primary, #0f172a)}.btn-rule-remove{background:none;border:none;font-size:18px;line-height:1;color:var(--fb-error-text, #ef4444);cursor:pointer;padding:2px 6px;border-radius:4px;transition:background-color .15s ease}.btn-rule-remove:hover{background:var(--fb-error-surface, #fef2f2)}.button-rules-empty{text-align:center;padding:16px;font-size:12px;color:var(--fb-text-muted, #94a3b8);border:1px dashed var(--fb-border-default, #cbd5e1);border-radius:6px;background:var(--fb-surface-secondary, #f8fafc)}.button-modal-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:12px 20px;background:var(--fb-surface-secondary, #f8fafc);border-top:1px solid var(--fb-border-default, #e2e8f0)}.button-modal-footer .btn-cancel{background:var(--fb-surface-elevated, #ffffff);border:1px solid var(--fb-border-default, #cbd5e1);color:var(--fb-text-primary, #334155);padding:8px 16px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.button-modal-footer .btn-cancel:hover{background:var(--fb-surface-tertiary, #f1f5f9);border-color:var(--fb-border-strong, #94a3b8)}.button-modal-footer .btn-save{background:var(--fb-action-surface, #0275ff);border:1px solid var(--fb-action-border, #0275ff);color:var(--fb-text-on-action, #ffffff);padding:8px 18px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.button-modal-footer .btn-save:hover{background:var(--fb-action-surface-hover, #0056b3);border-color:var(--fb-action-surface-hover, #0056b3)}.button-modal-footer .btn-save:disabled{opacity:.5;cursor:not-allowed;background:var(--fb-action-disabled, #94a3b8);border-color:var(--fb-action-disabled, #94a3b8)}.button-row-header-between{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.cel-badge{font-size:10px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:var(--fb-text-muted, #64748b);background:var(--fb-surface-tertiary, #f1f5f9);border:1px solid var(--fb-border-subtle, #e2e8f0);padding:1px 6px;border-radius:4px}.button-form-textarea{width:100%;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;line-height:1.45;padding:8px 10px;border:1px solid var(--fb-input-border, #cbd5e1);border-radius:6px;background:var(--fb-input-bg, #ffffff);color:var(--fb-text-primary, #1e293b);outline:none;resize:vertical;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}.button-form-textarea:focus{border-color:var(--fb-input-focus, #0275ff);box-shadow:0 0 0 2px var(--fb-focus-ring, rgba(2, 117, 255, .2))}.button-form-textarea.is-invalid,.button-form-row input.is-invalid{border-color:var(--fb-error-border, #ef4444)!important;background-color:var(--fb-error-surface, #fef2f2)}.cel-feedback{display:flex;align-items:center;gap:6px;font-size:11px;line-height:1.3;margin-top:4px}.cel-feedback.valid{color:var(--fb-success-text, #16a34a)}.cel-feedback.invalid{color:var(--fb-error-text, #dc2626);font-weight:500}.cel-icon{font-size:12px;font-weight:700}\n"] }]
69241
69241
  }], ctorParameters: () => [{ type: FormBuilderService }, { type: TemplateService }, { type: TranslationService }, { type: i0.ChangeDetectorRef }, { type: DataService }, { type: CelValidatorService }], propDecorators: { templateSelected: [{
69242
69242
  type: Input
69243
69243
  }], selectedElementType: [{