import { jsxs as t, jsx as r } from "react/jsx-runtime";
import { Icon as c } from "./index-Icon.js";
import { IconNames as l } from "./index-IconNames.js";
import { snackbarService as a } from "./index-SnackBarService.js";
import { Text as o, FontWeights as n } from "./index-Text.js";
import "react";
import i from "./index-ClipboardText.module.scss.js";
const b = (e) => {
  const {
    label: m,
    value: d
  } = e;
  return t("div", {
    className: i.copyGroup,
    children: [r("div", {
      className: i.copy,
      onClick: () => {
        navigator.clipboard.writeText(e.value), a.openSuccessSnackbar("Copied to clipboard");
      },
      children: r(c, {
        color: "--n700",
        children: l.duplicate
      })
    }), t("div", {
      children: [r(o, {
        textTight: !0,
        color: "--n400",
        children: e.label
      }), r(o, {
        textTight: !0,
        fontWeight: n.medium,
        translate: !1,
        children: e.value ?? " "
      })]
    })]
  });
};
export {
  b as ClipboardText
};
