import { inject } from 'vue';
import { assertUiAdapterContract, uiAdapterKey } from './contracts';
export function installUiAdapter(app, adapter) {
    assertUiAdapterContract(adapter);
    app.provide(uiAdapterKey, adapter);
}
export function useUiAdapter() {
    const adapter = inject(uiAdapterKey);
    if (!adapter) {
        throw new Error('UI adapter is not installed. Install a validated provider during app bootstrap.');
    }
    return adapter;
}
