/**
 * `<icon-ui>` — auto-registers the tag on import.
 *
 * For non-side-effect class import (test isolation, tag override), use
 * the `class` subpath:
 *
 *   import { UIIcon } from '@adia-ai/web-components/components/icon/class';
 *
 * @see ../../USAGE.md#registration--auto-vs-explicit
 */

import { defineIfFree } from '../../core/register.js';
import { UIIcon } from './icon.class.js';

// Side-effect: wires the full @phosphor-icons/core asset tree into the icon
// registry so that any Phosphor name resolves without pre-registration.
// icon-ui is a glyph renderer — the icon loader is required for it to paint.
// The barrel (components/index.js) and core barrel both carry this import
// already; this import ensures standalone usage of the icon component
// (e.g. `import '@adia-ai/web-components/components/icon'`) also works.
// Apps with bundle-size SLOs that manage their own icon registration should
// import the class subpath directly and call installIconLoaders() themselves:
//   import { UIIcon } from '@adia-ai/web-components/components/icon/class';
import '../../core/icons-phosphor.js';

defineIfFree('icon-ui', UIIcon);

export { UIIcon };
