/*!
 * KoliBri - The accessible HTML-Standard
 */
import './common.js';
import { a as watchValidator } from './prop.validators.js';
import { v as validateSpellCheck } from './spell-check.js';
import { v as validateSuggestions } from './suggestions.js';
import { I as InputPasswordController } from './controller6.js';

const inputTextTypeOptions = ['text', 'search', 'url', 'tel'];
const isInputTextTypePropType = (value) => {
    return typeof value === 'string' && inputTextTypeOptions.includes(value);
};
const validateTypeInputText = (component, value) => {
    watchValidator(component, '_type', isInputTextTypePropType, new Set(inputTextTypeOptions), value);
};

class InputTextEmailController extends InputPasswordController {
    constructor(component, name, host) {
        super(component, name, host);
        this.component = component;
    }
    validateSuggestions(value) {
        validateSuggestions(this.component, value);
    }
    componentWillLoad() {
        super.componentWillLoad();
        this.validateSuggestions(this.component._suggestions);
    }
}
class InputTextController extends InputTextEmailController {
    constructor(component, name, host) {
        super(component, name, host);
        this.hasError = false;
        this.component = component;
    }
    validateSpellCheck(value) {
        validateSpellCheck(this.component, value);
    }
    validateType(value) {
        validateTypeInputText(this.component, value);
    }
    componentWillLoad() {
        super.componentWillLoad();
        this.validateSpellCheck(this.component._spellCheck);
        this.validateType(this.component._type);
    }
}

export { InputTextEmailController as I, InputTextController as a };
//# sourceMappingURL=controller5.js.map

//# sourceMappingURL=controller5.js.map