/** Resolve the current site from a request hostname. */
export async function resolveSite(hostname, _db) {
    void hostname;
    // TODO: query actuate_sites by domain
    throw new Error('Not implemented');
}
/** Get the default site configuration. */
export async function getDefaultSite(_db) {
    throw new Error('Not implemented');
}
/** List all configured sites. */
export async function listSites(_db) {
    throw new Error('Not implemented');
}
/** Create a site context from a request, falling back to the default site. */
export async function createSiteContext(hostname, _db) {
    const currentSite = await resolveSite(hostname, _db);
    if (!currentSite) {
        const defaultSite = await getDefaultSite(_db);
        if (!defaultSite)
            throw new Error('No site configured');
        return { currentSite: defaultSite, allSites: await listSites(_db) };
    }
    return { currentSite, allSites: await listSites(_db) };
}
//# sourceMappingURL=index.js.map