/**
 * Resolves a static asset path. In local dev the path is served by Storybook's
 * staticDirs; when STORYBOOK_ASSET_BASE is set (e.g. Chromatic builds) it
 * prepends the external host URL so images load from Gitea.
 */
export const assetUrl = (path: string): string => {
  const base =
    typeof import.meta !== 'undefined' ? (import.meta.env?.STORYBOOK_ASSET_BASE ?? '') : '';
  return `${base}${path}`;
};
