// Small platform globals that are real (not engine-specific). Grown in Phase 1.

/** Show a transient toast notification. */
export const toast = (msg: string): void => _creatorUI.toast(msg)

/** Open `url` in the system browser / external handler (fire-and-forget, like `share`). Silent
 *  no-op on hosts without one (headless). */
export const openURL = (url: string): void => _creatorUtils.openUrl?.(url)

export type SvgSourceValue = {
  readonly svg: string
  tintColor: string | null
}

/** Wrap raw SVG XML so it can be used as an image source. */
export const SvgSource = (svg: string): SvgSourceValue => ({ svg, tintColor: null })
