import { Input } from '../Input' import { InputType } from '../Input' export class Selector extends Input { private options: string[]; constructor(name: string, options: string[]) { super(InputType.Selector, name); this.options = options; } getOptionPos(option: string) { for (let i; i < this.options.length; i++) { if (this.options[i] == option) return i } return -1; } get Options(): string[] { return this.options; } toJSON(): any { return { type: this.Type, name: this.Name, value: this.Value, importance: this.Importance, attributes: { options: this.options } } } }