import { UiElement } from "./ui-element"; import { TranslatorService } from '../hmg-common/services/translator/translator.service'; export class SelectInput extends UiElement { public direction: string; constructor( private label: string, private elementId: string, private value: any, private containerId: string, private disabled: string, private hidden: string, private required: string) { super(elementId, containerId, ''); this.direction = TranslatorService.getCurrentLanguageName(); this.createElement(this.getTemplate()); } public getTemplate() { let template :string = ""; let requiredClass: string = ""; if (this.required == 'Y') requiredClass = "requiredClass" if (this.disabled == "N") { this.disabled = "disabled" } else { this.disabled = "" } if (this.hidden == "N") { this.hidden = "display:none;" } else { this.hidden = "" } // const template = // "
" + // " " + // " "+ // "
"; if(this.direction == 'en'){ template = "
" + " " + " "+ "
"; } else{ template = "
" + " " + " "+ "
"; } //[ngClass]=\"{\'daynamicForm-Select\': !ar,\'daynamicForm-Selects\':ar}\ // [ngClass]= direction == 'en'? 'daynamicForm-Select' : 'daynamicForm-Selects' // [ngClass]=" direction === 'rtl' ? 'daynamicForm-Selects' : 'daynamicForm-Select'" // class='daynamicForm-Select' id='" + this.elementId + "' // "" + // "" + this.label + "" + // "" + // "" + // " "; return template; } }