"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataGridPreferencesRowDensitySettings = DataGridPreferencesRowDensitySettings;
const react_1 = __importDefault(require("react"));
const select_1 = require("../../form/select");
const ROW_DENSITY_OPTIONS = {
    tight: "Tett",
    standard: "Standard",
    loose: "Løs",
};
function DataGridPreferencesRowDensitySettings({ value, onChange, }) {
    return (react_1.default.createElement(select_1.Select, { label: "Radtetthet", size: "small", onChange: (event) => {
            const newValue = event.target.value;
            if (isRowDensityOption(newValue)) {
                onChange(newValue);
            }
        }, value: value, style: { width: "auto" } }, Object.entries(ROW_DENSITY_OPTIONS).map(([key, label]) => (react_1.default.createElement("option", { key: key, value: key }, label)))));
}
function isRowDensityOption(value) {
    return value in ROW_DENSITY_OPTIONS;
}
//# sourceMappingURL=DataGridPreferencesRowDensitySettings.js.map