"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_STYLE = void 0;
const field_1 = require("../../../../../client/field");
exports.DEFAULT_STYLE = {
    display: 'block',
    height: '100%',
    width: '100%',
    color: 'inherit',
    backgroundColor: '#00000000',
    padding: '0',
    fontSize: '12px',
    // outline: 'none',
    border: 'none',
    borderRadius: '0',
};
class Color extends field_1.Field {
    constructor($props, $system) {
        super($props, $system, $system.api.document.createElement('input'), {
            valueKey: 'value',
            defaultStyle: exports.DEFAULT_STYLE,
        });
        const { value = '#000000', tabIndex = -1 } = $props;
        this.$element.value = value;
        this.$element.type = 'color';
        this.$element.tabIndex = tabIndex;
    }
    setSelectionRange(start, end, direction) {
        this.$element.setSelectionRange(start, end, direction);
    }
    focus(options = { preventScroll: true }) {
        this.$element.focus(options);
    }
    blur() {
        this.$element.blur();
    }
}
exports.default = Color;
//# sourceMappingURL=Component.js.map