import { createIconResolver, } from "@stack-scribe/core";
import { createAwsIconRegistry } from "./index.js";
import { getAwsBrowserSvgByAssetPath } from "./browser-assets.generated.js";
const registry = createAwsIconRegistry();
export function createAwsBrowserIconAssetLoader() {
    return {
        getIconSvg(type) {
            const resolution = registry.resolveType(type);
            if (!resolution || resolution.kind === "ambiguous") {
                return undefined;
            }
            return getAwsBrowserSvgByAssetPath(resolution.definition.assetPath);
        },
        getGroupIconSvg(styleOrType) {
            const definition = registry.getGroupIcon(styleOrType);
            return definition ? getAwsBrowserSvgByAssetPath(definition.assetPath) : undefined;
        },
    };
}
export function createAwsBrowserIconResolver() {
    return createIconResolver(registry, createAwsBrowserIconAssetLoader());
}
export const awsBrowserIconResolver = createAwsBrowserIconResolver();
export const awsBrowserRenderOptions = {
    iconResolver: awsBrowserIconResolver,
    trustedIconResolver: true,
};
//# sourceMappingURL=browser.js.map