import { Signal } from '@tempots/dom';
/**
 * Creates a reactive translation system that dynamically loads locale-specific messages.
 *
 * Features:
 * - Type-safe translation functions with parameter validation
 * - Dynamic loading of locale-specific message bundles
 * - Reactive translations that update when locale changes
 * - Automatic fallback to default locale on loading errors
 * - Proper cleanup and memory management
 *
 * @param config Configuration object for the translation system
 * @param config.locale Reactive signal containing the current locale
 * @param config.defaultLocale Default locale to fall back to (default: 'en-US')
 * @param config.defaultMessages Default message functions used as fallback
 * @param config.localeLoader Async function to load locale-specific messages
 *
 * @returns Object containing translation functions (`t`) and cleanup (`dispose`)
 *
 * @example
 * ```typescript
 * import { prop, Use } from '@tempots/dom'
 * import { Locale, makeMessages } from '@tempots/beatui'
 *
 * const defaultMessages = {
 *   welcome: () => 'Welcome!',
 *   userGreeting: (name: string) => `Hello, ${name}!`,
 *   itemCount: (count: number) => `${count} item${count !== 1 ? 's' : ''}`
 * }
 *
 * const { locale } = Use(Locale, ({ locale }) => {
 *   // Create translation system
 *   const { t, dispose } = makeMessages({
 *     locale,
 *     defaultMessages,
 *     localeLoader: locale => import(`./locales/${locale}.js`)
 *   })
 *
 *   return html.div(
 *     html.h1(t.welcome()),
 *     html.p(t.userGreeting(prop('User')))
 *   )
 * })
 *
 * // Use reactive translations
 * const greeting = t.greeting(prop('John')) // Signal<string>
 * const count = t.itemCount(prop(5)) // Signal<string>
 *
 * // Clean up when done
 * dispose()
 * ```
 */
export declare function makeMessages<M extends object>({ locale, defaultLocale, defaultMessages, localeLoader, }: {
    /** Reactive signal containing the current locale string */
    locale: Signal<string>;
    /** Default locale to use as fallback (default: 'en-US') */
    defaultLocale: string;
    /** Default message functions used as fallback and type reference */
    defaultMessages: M;
    /** Async function that loads locale-specific message bundles */
    localeLoader: (locale: string) => Promise<M>;
}): {
    /** Clean up all resources and event listeners */
    dispose: () => void;
    /** Translation functions that return reactive signals */
    t: import("@tempots/dom").Prop<M>;
};
