/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
package com.runicgateway.app.ui

import androidx.compose.runtime.staticCompositionLocalOf

/**
 * Resolves possibly site-relative asset paths (post images, branding) to
 * absolute URLs against the configured base URL. Provided at the app root from
 * [AppViewModel.resolveAsset] so any screen or CMS block can turn a stored path
 * into a loadable URL without reaching into the network layer.
 */
val LocalAssetResolver = staticCompositionLocalOf<(String?) -> String?> {
    // Default: identity. Overridden at the app root; this fallback keeps previews
    // and tests from crashing if the provider is missing.
    { it }
}
