/**
 * Custom-element registration helpers.
 *
 * @see ../USAGE.md#registration--auto-vs-explicit
 */

/**
 * Register a custom element. Same semantics as `customElements.define` — throws
 * if `tagName` is already registered.
 */
export function register(tagName: string, ctor: CustomElementConstructor): void;

/**
 * Register a custom element only if the tag isn't already taken. Useful when
 * multiple sources may try to register the same tag (e.g. when a host page
 * imports the AdiaUI bundle AND a downstream consumer imports per-component
 * subpaths). Without this, the second `customElements.define` throws.
 *
 * Returns `true` if registration happened, `false` if the tag was already
 * registered.
 */
export function defineIfFree(tagName: string, ctor: CustomElementConstructor): boolean;

/** Returns true if the given tag is already registered. */
export function isRegistered(tagName: string): boolean;
