"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataGridPreferencesTextSizeSettings = DataGridPreferencesTextSizeSettings;
const react_1 = __importDefault(require("react"));
const select_1 = require("../../form/select");
const TEXT_SIZE_OPTIONS = {
    small: "Liten",
    medium: "Medium",
};
function DataGridPreferencesTextSizeSettings({ value, onChange, }) {
    return (react_1.default.createElement(select_1.Select, { label: "Tekstst\u00F8rrelse", size: "small", onChange: (event) => {
            const newValue = event.target.value;
            if (isTextSizeOption(newValue)) {
                onChange(newValue);
            }
        }, value: value, style: { width: "auto" } }, Object.entries(TEXT_SIZE_OPTIONS).map(([key, label]) => (react_1.default.createElement("option", { key: key, value: key }, label)))));
}
function isTextSizeOption(value) {
    return value in TEXT_SIZE_OPTIONS;
}
//# sourceMappingURL=DataGridPreferencesTextSizeSettings.js.map