import React from "react";
import { Checkbox, CheckboxGroup } from "../../form/checkbox/index.js";
function DataGridPreferencesRowPropertiesSettings({ value, onChange = () => null, fields, }) {
    const showTruncateContent = (fields === null || fields === void 0 ? void 0 : fields.truncateContent) !== false;
    const showZebraStripes = (fields === null || fields === void 0 ? void 0 : fields.zebraStripes) !== false;
    if (!showTruncateContent && !showZebraStripes) {
        return null;
    }
    const checkboxValues = [
        ...(value.truncateContent ? ["truncateContent"] : []),
        ...(value.zebraStripes ? ["zebraStripes"] : []),
    ];
    return (React.createElement(CheckboxGroup, { legend: "Radegenskaper", size: "small", value: checkboxValues, onChange: (values) => {
            onChange({
                truncateContent: showTruncateContent
                    ? values.includes("truncateContent")
                    : value.truncateContent,
                zebraStripes: showZebraStripes
                    ? values.includes("zebraStripes")
                    : value.zebraStripes,
            });
        } },
        showTruncateContent && (React.createElement(Checkbox, { value: "truncateContent", description: "Kutter innhold som ikke f\u00E5r plass i cellen p\u00E5 \u00E9n linje" }, "Kutt innhold")),
        showZebraStripes && (React.createElement(Checkbox, { value: "zebraStripes", description: "Legger p\u00E5 en bakgrunnsfarge for annenhver rad" }, "Zebra-striper"))));
}
export { DataGridPreferencesRowPropertiesSettings };
//# sourceMappingURL=DataGridPreferencesRowPropertiesSettings.js.map