---
// MC-GUI slot + copy button. variant "ip" = big gold mono (server address);
// "url" = smaller, wraps (auth / packwiz URLs). Copy handled by the global
// [data-copy] script in [...lang].astro; data-label / data-copied drive the
// (localized) button text and transient feedback.
interface Props {
  value: string;
  variant?: "ip" | "url";
  label?: string;
  copiedLabel?: string;
}
const { value, variant = "ip", label = "Copy", copiedLabel = "Copied!" } = Astro.props;
---
<div class:list={["ip-chip", variant === "url" && "url"]}>
  <span class="ip-val"><span class="pin">▸</span>{value}</span>
  <button type="button" data-copy={value} data-label={label} data-copied={copiedLabel}>{label}</button>
</div>
