// seekora-ui-sdk/packages/react/src/layout/theme-injector.tsx
import * as React from "react";
import { ALLOWED_THEME_VARS } from "./allowed-theme-vars";
export function ThemeInjector({ theme, surface, }) {
    if (!theme)
        return null;
    const lines = Object.entries(theme)
        .filter(([k]) => ALLOWED_THEME_VARS.has(k))
        .map(([k, v]) => `${k}: ${v};`);
    if (lines.length === 0)
        return null;
    const css = `.seekora-layout[data-seekora-surface="${surface}"] { ${lines.join(" ")} }`;
    return React.createElement("style", { "data-seekora-theme-for": surface }, css);
}
