import React from 'react';
import { shouldDisableTimestampLocalizationForAttribute } from '@reltio/mdm-sdk';
import { DCRValueEditorFactory } from '../DCRValueEditorFactory';
import { useMdmDisableTimestampLocalization } from '../../../../../contexts/MdmModuleContext';
import styles from './DCRValueEditor.module.css';
export var DCRValueEditor = function (_a) {
    var attributeType = _a.attributeType, value = _a.value, onChange = _a.onChange, _b = _a.disabled, disabled = _b === void 0 ? false : _b;
    var disableTimestampLocalizationFlag = useMdmDisableTimestampLocalization();
    var disableTimestampLocalization = shouldDisableTimestampLocalizationForAttribute(attributeType, {
        disableTimestampLocalization: disableTimestampLocalizationFlag
    });
    return (React.createElement("div", { className: styles.editor }, DCRValueEditorFactory.build({
        attributeType: attributeType,
        value: value,
        onChange: onChange,
        disabled: disabled,
        disableTimestampLocalization: disableTimestampLocalization
    })));
};
