/*!
 * KoliBri - The accessible HTML-Standard
 */
import { b as watchValidator } from './common-DEEjER7G.js';
import { v as validateSpellCheck } from './spell-check-CSnDB95u.js';
import { v as validateSuggestions } from './suggestions-Cnn1r8zc.js';
import { I as InputPasswordController } from './controller-eoW_d0fK.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=controller-DR9zGh9W.js.map

//# sourceMappingURL=controller-DR9zGh9W.js.map