"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_STYLE = void 0;
const field_1 = require("../../../../../client/field");
exports.DEFAULT_STYLE = {
    width: '100%',
    height: '100%',
    textAlign: 'left',
    wordWrap: 'break-word',
    wordBreak: 'break-word',
    whiteSpace: 'pre-wrap',
    fontSize: '21px',
    display: 'flex',
    justifyContent: 'center',
    background: 'none',
    backgroundColor: '#00000000',
    padding: '0',
    border: 'none',
    overflowX: 'hidden',
    overflowY: 'auto',
    resize: 'none',
    // outline: 'none',
    boxSizing: 'border-box',
    color: 'currentColor',
};
class TextArea extends field_1.Field {
    constructor($props, $system) {
        super($props, $system, $system.api.document.createElement('textarea'), {
            valueKey: 'value',
            defaultStyle: exports.DEFAULT_STYLE,
        });
        const { placeholder = '', maxLength = undefined } = $props;
        this.$element.spellcheck = false;
        this.$element.autocomplete = 'off';
        // this.$element.autocorrect = 'off'
        this.$element.autocapitalize = 'off';
        this.$element.inputMode = 'none';
        this.$element.placeholder = placeholder;
        if (maxLength !== undefined) {
            this.$element.maxLength = maxLength;
        }
    }
}
exports.default = TextArea;
//# sourceMappingURL=Component.js.map