"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Value = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const personalDataSecurity_1 = require("../../personalDataSecurity");
const styles_1 = require("./styles");
const useLogic_1 = require("./useLogic");
const Value = (props) => {
    const { valueToRender, isDefaultValueRender, leader, direction } = (0, useLogic_1.useLogic)(props);
    const { copyPosition = 'right', copyText, canCopy, children, stub, isHidePersonalData = false, ...restProps } = props;
    const hidePersonalDataClassname = (0, personalDataSecurity_1.useHidePersonalData)({
        isEnabled: isHidePersonalData,
    });
    if (isDefaultValueRender) {
        return ((0, jsx_runtime_1.jsx)(styles_1.StyledTypography, { "$direction": direction, component: "dd", children: valueToRender, "$leader": leader, className: hidePersonalDataClassname, ...restProps }));
    }
    return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { children: (0, jsx_runtime_1.jsx)(styles_1.StyledCopyTypography, { copyPosition: copyPosition, copyText: copyText, "$direction": direction, "$leader": leader, component: "div", className: hidePersonalDataClassname, ...restProps, children: valueToRender }) }));
};
exports.Value = Value;
