"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CopyableValueField = void 0;
var react_1 = __importDefault(require("react"));
var Typography_1 = __importDefault(require("@mui/material/Typography"));
var SmallIconButton_1 = require("../../../SmallIconButton");
var Copy_1 = __importDefault(require("../../../icons/Copy"));
var styles_1 = require("./styles");
var CopyableValueField = function (_a) {
    var value = _a.value;
    var styles = (0, styles_1.useStyles)();
    return (react_1.default.createElement("div", { className: styles.root },
        react_1.default.createElement(Typography_1.default, { className: styles.text, variant: 'body2' }, value),
        react_1.default.createElement(SmallIconButton_1.SmallIconButton, { size: "XXS", icon: Copy_1.default, color: "primary", className: styles.button, onClick: function () { return navigator.clipboard.writeText(value); } })));
};
exports.CopyableValueField = CopyableValueField;
