import { type RefObject } from 'react'; type Ref = RefObject; /** * Copy text to the clipboard. Uses the modern Clipboard API in secure contexts and falls back * to a hidden `