import React from "react";
import { Select } from "../../form/select/index.js";
const ROW_DENSITY_OPTIONS = {
    tight: "Tett",
    standard: "Standard",
    loose: "Løs",
};
function DataGridPreferencesRowDensitySettings({ value, onChange, }) {
    return (React.createElement(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.createElement("option", { key: key, value: key }, label)))));
}
function isRowDensityOption(value) {
    return value in ROW_DENSITY_OPTIONS;
}
export { DataGridPreferencesRowDensitySettings };
//# sourceMappingURL=DataGridPreferencesRowDensitySettings.js.map