"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataGridPreferencesRowPropertiesSettings = DataGridPreferencesRowPropertiesSettings;
const react_1 = __importDefault(require("react"));
const checkbox_1 = require("../../form/checkbox");
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_1.default.createElement(checkbox_1.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_1.default.createElement(checkbox_1.Checkbox, { value: "truncateContent", description: "Kutter innhold som ikke f\u00E5r plass i cellen p\u00E5 \u00E9n linje" }, "Kutt innhold")),
        showZebraStripes && (react_1.default.createElement(checkbox_1.Checkbox, { value: "zebraStripes", description: "Legger p\u00E5 en bakgrunnsfarge for annenhver rad" }, "Zebra-striper"))));
}
//# sourceMappingURL=DataGridPreferencesRowPropertiesSettings.js.map